Skip to main content

answer_with

Function answer_with 

Source
pub async fn answer_with(
    endpoint: &Handle,
    incoming: &Incoming,
    media_address: IpAddr,
    codecs: Codecs,
) -> Result<Call>
Expand description

answer, from a chosen codec set rather than the default one (M-30).

The answering counterpart of DialOptions::with_codecs. codecs bounds what the answer may settle on, and no more than that: RFC 3264 §6.1 gives the order to the offerer, so a caller offering G.711 first is answered G.711 first even from Codecs::Opus. What the selection decides is whether Opus is on the table at all — an offer of it answered from Codecs::G711 is answered G.711, because a call must never settle on a codec the application did not ask to carry.