pub struct InboundInvite {
pub call_id: String,
pub from: String,
pub to_did: String,
/* private fields */
}Expand description
An inbound INVITE surfaced to the host by SipAgent::next_inbound.
Carries just what the control plane needs to resolve the call (Call-ID, the caller, the dialed DID), plus the machinery to answer it. The DID/caller are taken from the SIP To/From user parts — the control plane maps the DID to an org/agent; the INVITE body is never trusted for identity (SIP-DESIGN.md §“Security”).
Fields§
§call_id: StringSIP Call-ID of the inbound dialog.
from: StringCaller number (From URI user part), best-effort.
to_did: StringDialed DID (To/Request-URI user part) — the number that was called.
Implementations§
Source§impl InboundInvite
impl InboundInvite
Sourcepub async fn answer(self) -> Result<SipTransport, FlowcatError>
pub async fn answer(self) -> Result<SipTransport, FlowcatError>
200-OK this INVITE with our G.711 SDP answer and return the media transport.
Binds a fresh RTP socket, builds the answer committing to the codec the
peer offered (PCMU preferred), accepts the dialog, and spins up a
SipTransport whose hangup token is wired to this dialog’s Terminated
state. Consumes self.
Sourcepub fn reject(self, code: Option<StatusCode>)
pub fn reject(self, code: Option<StatusCode>)
Reject this INVITE (default 486 Busy Here unless a code is given).