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:
- Alianza receives the inbound
INVITEfrom the caller. - Alianza sends an
INVITEto Twilio over TLS, including theX-Alianza-Correlator-Idheader. Twilio challenges with407 Proxy Authentication Required; Alianza re-sends with digest credentials. - Twilio notifies your Virtual Agent via webhook; your Virtual Agent responds with TwiML to answer the call.
180 Ringingand200 OKpropagate 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.- When the caller hangs up, a
BYEpropagates 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.