Inbound call flow

When a call arrives for an assigned phone number, Alianza routes it to your SIP endpoint via the Twilio trunk. The sequence:

  1. Alianza receives the inbound INVITE from the caller.
  2. Alianza sends an INVITE to Twilio over TLS, including the X-Alianza-Correlator-Id header. Twilio challenges with 407 Proxy Authentication Required; Alianza re-sends with digest credentials.
  3. Twilio notifies your Virtual Agent via webhook; your Virtual Agent responds with TwiML to answer the call.
  4. 180 Ringing and 200 OK propagate back to the caller. RTP media flows between the caller and Alianza, and between Alianza and Twilio. Your Virtual Agent connects to Twilio via WebSocket for the media stream.
  5. When the caller hangs up, a BYE propagates through Alianza to Twilio. Twilio sends a status callback to your Virtual Agent to signal the call has ended.

Headers to capture

Header Why it matters
X-Alianza-Correlator-Id Unique per-call identifier from Alianza. Log it — it is the value Alianza support will ask for when tracing a specific call. You do not need it to transfer: transfers use an in-dialog REFER, which Alianza correlates from the dialog itself.

Caller ID

Caller ID is passed through via the From header and/or P-Asserted-Identity. Their format and accuracy are not guaranteed — do not rely on them for compliance-grade attribution without confirming the contract with Alianza.

Failure modes

  • If your endpoint is unreachable, the call fails immediately. There is no retry or fallback.
  • If your endpoint returns a non-2xx final response, the call is rejected and the caller hears a treatment from the upstream switch.