pub struct EarlyCoupling { /* private fields */ }Expand description
Two pending user-agent legs owned from an early dialog through confirmation or failure.
Implementations§
Source§impl EarlyCoupling
impl EarlyCoupling
Sourcepub async fn dial(
invitation: Invitation,
calls: &Calls,
endpoint: &Handle,
target: Target,
to: &Uri,
options: &DialOptions,
media_address: IpAddr,
) -> Result<Self>
pub async fn dial( invitation: Invitation, calls: &Calls, endpoint: &Handle, target: Target, to: &Uri, options: &DialOptions, media_address: IpAddr, ) -> Result<Self>
Consume an inbound invitation and create its relayed target leg under one owner.
Target selection remains application policy. The coupling maps the source offer’s audio direction onto fresh target-leg SDP; endpoint addresses, ports and key material are never copied between the two user-agent dialogs.
Sourcepub fn new(
invitation: Invitation,
ringing: Ringing,
dialing: Dialing,
outgoing_incoming: Receiver<Incoming>,
endpoint: &Handle,
media_address: IpAddr,
) -> Self
pub fn new( invitation: Invitation, ringing: Ringing, dialing: Dialing, outgoing_incoming: Receiver<Incoming>, endpoint: &Handle, media_address: IpAddr, ) -> Self
Join an inbound invitation already rung to its pending outbound invitation.
Routing and target selection happen before this handoff. From this point the coupling is the sole owner of the invitation, ringing state and dialing state, including their media sessions and cancellation obligations.
Sourcepub fn state(&self) -> &CouplingState
pub fn state(&self) -> &CouplingState
The shared offer/answer and lifecycle policy while either leg remains early.
Sourcepub async fn confirmed(self) -> Result<ConfirmedCoupling>
pub async fn confirmed(self) -> Result<ConfirmedCoupling>
Drive both early legs until they confirm, are cancelled, or receive a final refusal.
A matching inbound CANCEL withdraws the pending outbound INVITE. If its 2xx crossed the CANCEL, that now-confirmed outbound call receives BYE instead. An outbound 4xx/5xx is sent as the inbound INVITE’s final response with the same status and reason.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for EarlyCoupling
impl !RefUnwindSafe for EarlyCoupling
impl Send for EarlyCoupling
impl Sync for EarlyCoupling
impl Unpin for EarlyCoupling
impl UnsafeUnpin for EarlyCoupling
impl !UnwindSafe for EarlyCoupling
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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