pub struct TransferPlan {
pub mode: ModeTrue,
pub message: Option<TransferPlanMessage>,
pub timeout: Option<f64>,
pub sip_verb: Option<SipVerbTrue>,
pub hold_audio_url: Option<String>,
pub transfer_complete_audio_url: Option<String>,
pub twiml: Option<String>,
pub summary_plan: Option<SummaryPlan>,
pub sip_headers_in_refer_to_enabled: Option<bool>,
pub fallback_plan: Option<TransferFallbackPlan>,
}
Fields§
§mode: ModeTrue
This configures how transfer is executed and the experience of the destination party receiving the call. Usage: - blind-transfer
: The assistant forwards the call to the destination without any message or summary. - blind-transfer-add-summary-to-sip-header
: The assistant forwards the call to the destination and adds a SIP header X-Transfer-Summary to the call to include the summary. - warm-transfer-say-message
: The assistant dials the destination, delivers the message
to the destination party, connects the customer, and leaves the call. - warm-transfer-say-summary
: The assistant dials the destination, provides a summary of the call to the destination party, connects the customer, and leaves the call. - warm-transfer-wait-for-operator-to-speak-first-and-then-say-message
: The assistant dials the destination, waits for the operator to speak, delivers the message
to the destination party, and then connects the customer. - warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary
: The assistant dials the destination, waits for the operator to speak, provides a summary of the call to the destination party, and then connects the customer. - warm-transfer-twiml
: The assistant dials the destination, executes the twiml instructions on the destination call leg, connects the customer, and leaves the call. - warm-transfer-experimental
: The assistant puts the customer on hold, dials the destination, and if the destination answers (and is human), delivers a message or summary before connecting the customer. If the destination is unreachable or not human (e.g., with voicemail detection), the assistant delivers the fallbackMessage
to the customer and optionally ends the call. @default ‘blind-transfer’
message: Option<TransferPlanMessage>
§timeout: Option<f64>
This is the timeout in seconds for the warm-transfer-wait-for-operator-to-speak-first-and-then-say-message/summary @default 60
sip_verb: Option<SipVerbTrue>
This specifies the SIP verb to use while transferring the call. - ‘refer’: Uses SIP REFER to transfer the call (default) - ‘bye’: Ends current call with SIP BYE - ‘dial’: Uses SIP DIAL to transfer the call
hold_audio_url: Option<String>
This is the URL to an audio file played while the customer is on hold during transfer. Usage: - Used only when mode
is warm-transfer-experimental
. - Used when transferring calls to play hold audio for the customer. - Must be a publicly accessible URL to an audio file. - Supported formats: MP3 and WAV. - If not provided, the default hold audio will be used.
transfer_complete_audio_url: Option<String>
This is the URL to an audio file played after the warm transfer message or summary is delivered to the destination party. It can be used to play a custom sound like ‘beep’ to notify that the transfer is complete. Usage: - Used only when mode
is warm-transfer-experimental
. - Used when transferring calls to play hold audio for the destination party. - Must be a publicly accessible URL to an audio file. - Supported formats: MP3 and WAV.
twiml: Option<String>
This is the TwiML instructions to execute on the destination call leg before connecting the customer. Usage: - Used only when mode
is warm-transfer-twiml
. - Supports only Play
, Say
, Gather
, Hangup
and Pause
verbs. - Maximum length is 4096 characters. Example: <Say voice=\"alice\" language=\"en-US\">Hello, transferring a customer to you.</Say> <Pause length=\"2\"/> <Say>They called about billing questions.</Say>
summary_plan: Option<SummaryPlan>
This is the plan for generating a summary of the call to present to the destination party. Usage: - Used only when mode
is blind-transfer-add-summary-to-sip-header
or warm-transfer-say-summary
or warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary
or warm-transfer-experimental
.
sip_headers_in_refer_to_enabled: Option<bool>
This flag includes the sipHeaders from above in the refer to sip uri as url encoded query params. @default false
fallback_plan: Option<TransferFallbackPlan>
This configures the fallback plan when the transfer fails (destination unreachable, busy, or not human). Usage: - Used only when mode
is warm-transfer-experimental
. - If not provided when using warm-transfer-experimental
, a default message will be used.
Implementations§
Source§impl TransferPlan
impl TransferPlan
pub fn new(mode: ModeTrue) -> TransferPlan
Trait Implementations§
Source§impl Clone for TransferPlan
impl Clone for TransferPlan
Source§fn clone(&self) -> TransferPlan
fn clone(&self) -> TransferPlan
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more