pub struct DialNumber {Show 16 fields
pub number: String,
pub send_digits: Option<String>,
pub url: Option<String>,
pub method: Option<String>,
pub status_callback: Option<String>,
pub status_callback_event: Option<Vec<String>>,
pub status_callback_method: Option<String>,
pub call_reason: Option<String>,
pub byoc: Option<String>,
pub machine_detection: Option<String>,
pub machine_detection_timeout: Option<u32>,
pub machine_detection_speech_threshold: Option<u32>,
pub machine_detection_speech_end_threshold: Option<u32>,
pub machine_detection_silence_timeout: Option<u32>,
pub amd_status_callback: Option<String>,
pub amd_status_callback_method: Option<String>,
}Fields§
§number: String§send_digits: Option<String>§url: Option<String>§method: Option<String>§status_callback: Option<String>§status_callback_event: Option<Vec<String>>§status_callback_method: Option<String>§call_reason: Option<String>§byoc: Option<String>§machine_detection: Option<String>§machine_detection_timeout: Option<u32>§machine_detection_speech_threshold: Option<u32>§machine_detection_speech_end_threshold: Option<u32>§machine_detection_silence_timeout: Option<u32>§amd_status_callback: Option<String>§amd_status_callback_method: Option<String>Implementations§
Source§impl DialNumber
impl DialNumber
Sourcepub fn new(number: impl Into<String>) -> Self
pub fn new(number: impl Into<String>) -> Self
Examples found in repository?
examples/voice_call.rs (line 72)
69fn call_forwarding() {
70 let dial = Dial::new()
71 .timeout(30)
72 .add_number(DialNumber::new("+15559876543").send_digits("wwww1234"));
73
74 let response = VoiceResponse::new()
75 .say("Please wait while we connect your call.")
76 .dial_with(dial)
77 .say("The call could not be completed. Please try again later.")
78 .hangup();
79
80 println!("{}", response.to_xml());
81}Sourcepub fn send_digits(self, digits: impl Into<String>) -> Self
pub fn send_digits(self, digits: impl Into<String>) -> Self
Examples found in repository?
examples/voice_call.rs (line 72)
69fn call_forwarding() {
70 let dial = Dial::new()
71 .timeout(30)
72 .add_number(DialNumber::new("+15559876543").send_digits("wwww1234"));
73
74 let response = VoiceResponse::new()
75 .say("Please wait while we connect your call.")
76 .dial_with(dial)
77 .say("The call could not be completed. Please try again later.")
78 .hangup();
79
80 println!("{}", response.to_xml());
81}pub fn url(self, url: impl Into<String>) -> Self
pub fn method(self, method: impl Into<String>) -> Self
pub fn status_callback(self, callback: impl Into<String>) -> Self
pub fn status_callback_event(self, events: Vec<String>) -> Self
pub fn status_callback_method(self, method: impl Into<String>) -> Self
pub fn call_reason(self, call_reason: impl Into<String>) -> Self
pub fn byoc(self, byoc: impl Into<String>) -> Self
pub fn machine_detection(self, machine_detection: impl Into<String>) -> Self
pub fn machine_detection_timeout(self, timeout: u32) -> Self
pub fn machine_detection_speech_threshold(self, threshold: u32) -> Self
pub fn machine_detection_speech_end_threshold(self, threshold: u32) -> Self
pub fn machine_detection_silence_timeout(self, timeout: u32) -> Self
pub fn amd_status_callback(self, callback: impl Into<String>) -> Self
pub fn amd_status_callback_method(self, method: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for DialNumber
impl Clone for DialNumber
Source§fn clone(&self) -> DialNumber
fn clone(&self) -> DialNumber
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DialNumber
impl RefUnwindSafe for DialNumber
impl Send for DialNumber
impl Sync for DialNumber
impl Unpin for DialNumber
impl UnwindSafe for DialNumber
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more