X-Headers
What are X Headers?
SIP X headers are used to send non-standard information via SIP protocol.
NSG maps SS7 IAM information elements into SIP INVITE X-headers in order to pass specific SS7 IAM parameters to the user.
X header ("X" stands for custom).
NSG uses sip X headers to pass SS7 variables from SS7->SIP & SIP->SS7 (i.e. CIC, NADI, RDNIS..etc)
Passing information from SIP->SS7
By default if NSG receives a SIP message with any of the X-Headers defined below and the X-Headers feature is enabled, NSG will automatically populate the associated SS7 messages with the specified values. An X-Header will only be considered if it is properly formed, and matches the string found in the "X-Header" column below, and is case-sensitive.
It is important to note that as of NSG v.4.1.3 we do not support setting NSG variables directly, and the official way to customize the outgoing SS7 messages is to use the X-Header syntax above.
There are currently some exceptions to this rule, which are outlined here.
Asterisk - How to Use X Headers
SS7->SIP (Receiving X Header From NSG)
The x header will be stored in the Asterisk variable "SIP_HEADER".
To access the "X-FreeTDM-CIC" x header you would use "SIP_HEADER(X-FreeTDM-CIC)".
Example: exten => _X., n, NoOp(The CIC Number IS: ${SIP_HEADER(X-FreeTDM-CIC)})
SIP->SS7 (Sending X Header To NSG)
You can populate an x header by using the "SIPAddHeader" application in Asterisk.
The example below shows how to set the RDNIS NADI value to 4.
Example: exten => _X., n, SIPAddHeader(X-Freetdm-RDNIS-NADI:4)
FreeSWITCH - How to Use X Headers
SS7->SIP (Receiving X Header From NSG)
The x header will be stored in the FreeSWITCH variable "sip_h_Z" with Z being the X header.
The example below will print to the log/console the value of the x header that contains the cic number the call is on.
Example: <action application="log" data="The CIC Number Is: [${sip_h_X-FreeTDM-CIC}]"/>
SIP->SS7 (Sending X Header To NSG)
You can populate an x header by using the "export" application in FreeSWITCH.
The example below shows how to set the RDNIS NADI value to 4.
Example: <action application="export" data="sip_h_X-Freetdm-RDNIS-NADI=4"/>
Complete List of X Headers
General
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-CallerNumber | Y | Y | |
X-FreeTDM-CallerName | Y | Y | |
X-FreeTDM-CPC | Y | Y | |
X-FreeTDM-NADI | Y | N | |
X-FreeTDM-Screen | Y | Y | |
X-FreeTDM-Presentation | Y | Y | |
X-FreeTDM-Access-Transport-URLENC | Y | Y | |
X-FreeTDM-CLI-BlockingInd | Y | Y | |
X-FreeTDM-hopCounter | Y | Y | |
X-FreeTDM-UUI | Y | Y | |
X-FreeTDM-CallReference | Y | N | |
X-FreeTDM-NmbPortFwdInfo_Ind | Y | N | |
X-FreeTDM-NmbPortFwdInfo_Ext | Y | N |
Advanced
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-SpanNumber | Y | N | |
X-FreeTDM-ChanNumber | Y | N | |
X-FreeTDM-SpanName | Y | N | |
X-FreeTDM-CIC | Y | N | |
X-FreeTDM-OPC | Y | N | |
X-FreeTDM-ANI-NADI | Y | Y | |
X-FreeTDM-DNIS-NADI | Y | Y |
Redirected Dialed Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-RDNIS | Y | Y | |
X-FreeTDM-RDNIS-NADI | Y | Y | |
X-FreeTDM-RDNIS-Plan | Y | Y | |
X-FreeTDM-RDNIS-Screen | Y | Y | |
X-FreeTDM-RDNIS-Presentation | Y | Y |
Generic Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-GN | Y | Y | |
X-FreeTDM-GN-NumQual | Y | Y | |
X-FreeTDM-GN-NADI | Y | Y | |
X-FreeTDM-GN-Screen | Y | Y | |
X-FreeTDM-GN-Presentation | Y | Y | |
X-FreeTDM-GN-Plan | Y | Y | |
X-FreeTDM-GN-NumInComp | Y | Y |
Location Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-LOC | Y | Y | |
X-FreeTDM-LOC-Screen | Y | Y | |
X-FreeTDM-LOC-Presentation | Y | Y | |
X-FreeTDM-LOC-NADI | Y | Y |
Redirection Information Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-RDINF-Indicator | Y | Y | |
X-FreeTDM-RDINF-OrigReason | Y | Y | |
X-FreeTDM-RDINF-Count | Y | Y | |
X-FreeTDM-RDINF-Reason | Y | Y |
Original Called Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-OCN | Y | Y | |
X-FreeTDM-OCN-NADI | Y | Y | |
X-FreeTDM-OCN-Plan | Y | Y | |
X-FreeTDM-OCN-Presentation | Y | Y |
SS7 UK Parameters
Presentation Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-PresNumber | Y | Y | |
X-FreeTDM-PresNumber-Screen | Y | Y | |
X-FreeTDM-PresNumber-PresInd | Y | Y | |
X-FreeTDM-PresNumber-Plan | Y | Y | |
X-FreeTDM-PresNumber-PrefInd | Y | Y |
Link by Link National Forward Call Indicator
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-LxL_RCI | Y | Y | |
X-FreeTDM-LxL_ISI | Y | Y |
Divert Line ID
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-DivertLineId | Y | Y | |
X-FreeTDM-DivertLineId-NADI | Y | Y | |
X-FreeTDM-DivertLineId-Screen | Y | Y | |
X-FreeTDM-DivertLineId-PresInd | Y | Y | |
X-FreeTDM-DivertLineId-Plan | Y | Y | |
X-FreeTDM-DivertLineId-IncInd | Y | Y |
ISDN X-Header
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-CgPty-SubAddr | Y | N | |
X-FreeTDM-CgPty-SubAddr-Type | Y | N | |
X-FreeTDM-CgPty-SubAdr-OEIndicator | Y | N | |
X-FreeTDM-CdPty-SubAddr | Y | N | |
X-FreeTDM-CdPty-SubAddr-Type | Y | N | |
X-FreeTDM-CdPty-SubAdr-OEIndicator | Y | N | |
X-FreeTDM-User-User | Y | N |