Get Started

SIP Headers

The following headers will always be added by Twilio to the outgoing initial INVITE request:

  • X-Twilio-CallSid: A unique identifier for this call, generated by Twilio. It is 34 characters long, and always starts with the letters CA.
  • X-Twilio-AccountSid: Your Twilio account SID. It is 34 characters long, and always starts with the letters AC.
  • X-Twilio-ApiVersion: The Twilio API version being used for this call session.

SIP X-Headers passed back from your SIP Endpoint

In order to better integrate with remote SIP applications, Twilio's SIP connections can read headers that are returned in the response messages. Twilio will read any headers beginning with the X- prefix and copy them to either the Dial action URL or the call screening URL, in the format DialSipHeader_X-headername=headervalue.

On a successful call setup (when a 200 OK SIP response is returned) any X-headers on the 200 OK message are posted to the call screening URL. Headers on the final SIP response message (any 4xx or 5xx message or the final BYE/200) are posted to the Dial action URL.