Skip to main content

SIP headers

Headers are processed as follows:

  1. On an inbound call, the bot extracts SIP headers from the INVITE message:

    • System headers: call-id, cseq, contact, from, max-forwards, refer-to, to, via.
    • Custom headers. Specify them in the SIP headers parameter in the telephony settings.
  2. In a script, you can get the extracted headers using $dialer.getSipHeaders:

    {
    "cseq": "12345 INVITE",
    "contact": "<sip:userA@hostA>",
    "call-id": "abc123",
    "max-forwards": "70",
    "from": "<sip:userA@domainA>;tag=tagA",
    "to": "<sip:userB@hostB>",
    "via": "SIP/2.0/UDP hostB:5060;branch=z9hG4bKbranchA",
    "X-Example": "Example" // Custom header
    }
  3. When the bot transfers a call to a human agent:

    • System headers are passed along with the original values from the current call.
    • All custom headers from the current call are passed.
    • If you use the switch reply type, custom headers from headers are also passed. In this parameter you can specify new headers and override existing ones.
    caution
    • If you override the system headers in the headers parameter, the changes will be ignored.

    • If the bot extracted a custom header but you did not specify it in headers, it will still be passed.