pub struct AriClient { /* private fields */ }Expand description
AriClient is a client for interacting with the Asterisk REST Interface (ARI).
It manages the connection to the ARI and handles events.
Implementations§
Source§impl AriClient
impl AriClient
Sourcepub fn with_config(config: Config) -> Self
pub fn with_config(config: Config) -> Self
Creates a new AriClient with the given configuration.
Sourcepub fn on_unknown_event<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_unknown_event<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for unknown events.
Sourcepub fn on_event<F, Fut>(
&mut self,
key: impl Into<String>,
handler: F,
) -> &mut Self
pub fn on_event<F, Fut>( &mut self, key: impl Into<String>, handler: F, ) -> &mut Self
Registers a handler for a specific event.
Source§impl AriClient
impl AriClient
Sourcepub fn on_application_move_failed<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_application_move_failed<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_application_replaced<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_application_replaced<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_attended_transfer<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_bridge_attended_transfer<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_blind_transfer<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_bridge_blind_transfer<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_created<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_bridge_created<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_destroyed<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_bridge_destroyed<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_merged<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_bridge_merged<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_bridge_video_source_changed<F, Fut>(
&mut self,
handler: F,
) -> &mut Self
pub fn on_bridge_video_source_changed<F, Fut>( &mut self, handler: F, ) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_caller_id<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_caller_id<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_connected_line<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_connected_line<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_created<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_created<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_destroyed<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_destroyed<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_dialplan<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_dialplan<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_dtmf_received<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_dtmf_received<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_entered_bridge<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_entered_bridge<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_hangup_request<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_hangup_request<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_hold<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_hold<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_left_bridge<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_left_bridge<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_state_change<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_state_change<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_talking_finished<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_talking_finished<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_talking_started<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_talking_started<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_tone_detected<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_tone_detected<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_unhold<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_unhold<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_user_event<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_user_event<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_channel_var_set<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_channel_var_set<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_contact_info<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_contact_info<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_contact_status_change<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_contact_status_change<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_device_state_changed<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_device_state_changed<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_dial<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_dial<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_endpoint_state_change<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_endpoint_state_change<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_missing_params<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_missing_params<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_peer<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_peer<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_peer_status_change<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_peer_status_change<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_playback_continuing<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_playback_continuing<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_playback_finished<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_playback_finished<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_playback_started<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_playback_started<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_recording_failed<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_recording_failed<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_recording_finished<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_recording_finished<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_recording_started<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_recording_started<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_stasis_end<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_stasis_end<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Sourcepub fn on_stasis_start<F, Fut>(&mut self, handler: F) -> &mut Self
pub fn on_stasis_start<F, Fut>(&mut self, handler: F) -> &mut Self
Registers a handler for the $event_variant event.
Methods from Deref<Target = Client>§
Sourcepub fn applications(&self) -> Applications<'_>
pub fn applications(&self) -> Applications<'_>
Returns an instance of the Applications API.
Sourcepub fn recordings(&self) -> Recordings<'_>
pub fn recordings(&self) -> Recordings<'_>
Returns an instance of the Recordings API.
Sourcepub fn device_stats(&self) -> DeviceStats<'_>
pub fn device_stats(&self) -> DeviceStats<'_>
Returns an instance of the DeviceStats API.