CVP SIP Headers
Setting, Modifying, Removing SIP Headers
It is possible to add, modify or remove sip headers by using the SIPHeaderInfo Call Variable in the Script Editor.
In the script editor, the Set node is used to set the call variable string for SIPHeaderInfo.
The amount of space available to send header data to Unified ICM is limited and is truncated to 255 bytes.
The amount of space available for SIP headers is 210 bytes.
The SIP protocol RFC provides a function to represent common header field names in an abbreviated form.
The compact header format as defined in RFC 3261 (and other RFCs for newly defined headers) is used for
the header titles before passing the header to Unified ICM.
Extract from RFC 3261
The compact form of the Call-ID header field is i. The compact form of the Contact header field is m (for "moved"). The compact form of the Content-Encoding header field is e. The compact form of the header field is l. The compact form of the header field is c. The compact form of the From header field is f. The compact form of the Subject header field is s. The compact form of the Supported header field is k. The compact form of the To header field is t. The compact form of the Via header field is v.
In the Unified ICM script delimit the header, operation, and value with a tilde character, and use the bar
character to concatenate operations.
Add a Header
"Call-Info~add~<sip:x@y>;parm1=value1"
Modify a Header
"User-To-User~mod~this is a test"
Remove a Header
"Call-ID~rem"
Example to modify Calling Party Name
concatenate("Remote-Party-ID~mod~Bob Bobster <sip:",Call.CallingLineID,"@cvp-gw>;party=calling;screen=no;privacy=off")
Retrieving the SIP header values
– Configure the SIP Header in the advanced section of CallServer SIP config.
– Retrieve the value stored in Call.SIPHeader
For a good example how to do this check out the below link
https://supportforums.cisco.com/discussion/11436406/cvp-custom-sip-header
Example of how to get a specific header value
Below shows you an ICM formula to get the header value for the SIP header “X-CardEasy-CID” This approach works no matter how many sip headers you add (remember there is a lengthy limit) If header is not the end one and there is more than one sip header CVP is getting - it will alwasy end with a '|' But even if its the last one - and there is no pipe - it will then return the value after(“X-CardEasy-CID:”,Call.SIPHeader) - so this works and you just replace X-CardEasy-CID with the name of your SIP header. I also recommend you use custom functions in your ICM script to get the SIP header values - in case your formula needs to be changed (but this one shouldn't).
before("|",after("X-CardEasy-CID:",Call.SIPHeader))