pub struct CallbackPeerControl { /* private fields */ }Expand description
Cloneable command handle for a running CallbackPeer.
Implementations§
Source§impl CallbackPeerControl
impl CallbackPeerControl
Sourcepub fn register(
&self,
registrar: impl Into<String>,
username: impl Into<String>,
password: impl Into<String>,
) -> RegisterBuilder
pub fn register( &self, registrar: impl Into<String>, username: impl Into<String>, password: impl Into<String>, ) -> RegisterBuilder
Begin building an outbound REGISTER from this peer.
Returns a RegisterBuilder
— chain .with_expires(..), .with_from_uri(..),
.with_contact_uri(..), .with_credentials(..) etc. and finish
with .send().await.
Sourcepub fn register_account(&self, account: &SipAccount) -> RegisterBuilder
pub fn register_account(&self, account: &SipAccount) -> RegisterBuilder
Begin building an outbound REGISTER from a shared SIP account.
Sourcepub async fn is_registered(&self, handle: &RegistrationHandle) -> Result<bool>
pub async fn is_registered(&self, handle: &RegistrationHandle) -> Result<bool>
Query whether a registration handle is currently registered.
This is a coarse boolean. Use
coordinator and
UnifiedCoordinator::registration_info for lifecycle metadata.
§Examples
let active = control.is_registered(&handle).await?;Sourcepub async fn unregister(&self, handle: &RegistrationHandle) -> Result<()>
pub async fn unregister(&self, handle: &RegistrationHandle) -> Result<()>
Unregister.
Returns after the state machine accepts the unregister request. Use
UnifiedCoordinator::unregister_and_wait through
coordinator for deterministic registrar
confirmation.
§Examples
control.unregister(&handle).await?;Sourcepub async fn hangup(&self, handle: &SessionHandle) -> Result<()>
pub async fn hangup(&self, handle: &SessionHandle) -> Result<()>
Hang up or cancel a call and wait until rvoip-sip has accepted the request.
This uses the same SIP teardown semantics as SessionHandle::hangup:
BYE for established calls, CANCEL for ringing/early outbound calls, and
delayed CANCEL intent before the first provisional response. Callback
handlers observe terminal completion through on_call_ended,
on_call_failed, or on_call_cancelled.
§Examples
control.hangup(&call).await?;Sourcepub fn shutdown(&self)
pub fn shutdown(&self)
Signal the owning CallbackPeer event loop to stop.
This is a stop signal for the event loop. For deterministic graceful
unregister, call UnifiedCoordinator::shutdown_gracefully through
coordinator.
§Examples
control.shutdown();Sourcepub fn coordinator(&self) -> &Arc<UnifiedCoordinator> ⓘ
pub fn coordinator(&self) -> &Arc<UnifiedCoordinator> ⓘ
Access the underlying coordinator for advanced operations.
This accessor is intentionally trivial and returns the shared
UnifiedCoordinator handle.
Sourcepub fn invite(&self, target: impl Into<String>) -> OutboundCallBuilder
pub fn invite(&self, target: impl Into<String>) -> OutboundCallBuilder
Begin building an outbound INVITE from this peer’s configured
local_uri. Returns an
OutboundCallBuilder.
Trait Implementations§
Source§impl Clone for CallbackPeerControl
impl Clone for CallbackPeerControl
Source§fn clone(&self) -> CallbackPeerControl
fn clone(&self) -> CallbackPeerControl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for CallbackPeerControl
impl !UnwindSafe for CallbackPeerControl
impl Freeze for CallbackPeerControl
impl Send for CallbackPeerControl
impl Sync for CallbackPeerControl
impl Unpin for CallbackPeerControl
impl UnsafeUnpin for CallbackPeerControl
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more