Skip to main content

dial_early_until

Function dial_early_until 

Source
pub async fn dial_early_until<F>(
    endpoint: &Handle,
    target: Target,
    to: &Uri,
    options: &DialOptions,
    cancelled: F,
) -> Result<Dialing>
where F: Future<Output = ()> + Send,
Expand description

Place a call until an early dialog exists or cancelled resolves.

This is the cancellation-safe early-dialog counterpart of dial_until. If cancellation wins after the INVITE has left, the invitation is withdrawn before this returns, including the ACK-then-BYE cleanup when a successful final response crossed the cancellation. A caller that continues waiting for confirmation can use Dialing::answered_until with the same cancellation signal.

ยงErrors

The same setup and early-dialog errors as dial_early. Local cancellation returns Error::Cancelled after the outstanding invitation has been cleaned up.