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 | Caller's Phone Number | Y | Y |
X-FreeTDM-CallerName | Caller's Name | Y | Y |
X-FreeTDM-CPC | Calling Party Category | Â Y | YÂ |
X-FreeTDM-NADI | Nature of Address Indicator(Calling) | Y | N |
X-FreeTDM-Screen | Screening Indicator | Y | Y |
X-FreeTDM-Presentation | Presentation Indicator | Y | Y |
X-FreeTDM-Access-Transport-URLENC | Access Transport IE encoded | Y | Y |
X-FreeTDM-CLI-BlockingInd | Call Block Indicator | Y | Y |
X-FreeTDM-hopCounter | Hop Counter | Y | Y |
X-FreeTDM-UUI | User to User Information | Y | Y |
X-FreeTDM-CallReference | Call Reference Value | Y | N |
X-FreeTDM-NmbPortFwdInfo_Ind | Number Portability Forward Information Status Indication | Y | N |
X-FreeTDM-NmbPortFwdInfo_Ext | Number Portability Forward Information Extension Indicator | Y | N |
AdvancedÂ
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-SpanNumber | Span Number | Y | N |
X-FreeTDM-ChanNumber | Channel Number | Y | N |
X-FreeTDM-SpanName | Span Name | Y | N |
X-FreeTDM-CIC | CIC Number | Y | N |
X-FreeTDM-OPC | Originating Point Code | Y | N |
X-FreeTDM-ANI-NADI | ANI Nature of Address Indicator | Y | Y |
X-FreeTDM-DNIS-NADI | DNIS Nature of Address Indicator | Y | YÂ |
Redirected Dialed Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-RDNIS | Redirected Dialed Number | Y | Y |
X-FreeTDM-RDNIS-NADI | RDNISÂ Nature of Address Indicator | Y | Y |
X-FreeTDM-RDNIS-Plan | RDNISÂ Numbering Plan | Y | Y |
X-FreeTDM-RDNIS-Screen | RDNIS Screening Indicator | Y | Y |
X-FreeTDM-RDNIS-Presentation | RDNIS Presentation Indicator | Y | YÂ |
Generic Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-GN | Generic Number | Y | Y |
X-FreeTDM-GN-NumQual | GNÂ Qualifier | Y | Y |
X-FreeTDM-GN-NADI | GNÂ Nature of Address Indicator | Y | Y |
X-FreeTDM-GN-Screen | GNÂ Screening Indicator | Y | Y |
X-FreeTDM-GN-Presentation | GNÂ Presentation Indicator | Y | Y |
X-FreeTDM-GN-Plan | GNÂ Numbering Plan | Y | Y |
X-FreeTDM-GN-NumInComp | GNÂ Number Incomplete Indicator | Y | Y |
Location Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-LOC | Location Number | Y | Y |
X-FreeTDM-LOC-Screen | LOCÂ Screening Indicator | Y | Y |
X-FreeTDM-LOC-Presentation | LOCÂ Presentation Indicator | Y | Y |
X-FreeTDM-LOC-NADI | LOCÂ Nature of Address Indicator | Y | YÂ |
Redirection Information Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-RDINF-Indicator | RDINF Indicator | Y | Y |
X-FreeTDM-RDINF-OrigReason | RDINF Original Reason | Y | Y |
X-FreeTDM-RDINF-Count | RDINF Redirection Count | Y | Y |
X-FreeTDM-RDINF-Reason | RDINF Reason | Y | YÂ |
Original Called Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-OCN | OCN number | Y | Y |
X-FreeTDM-OCN-NADI | OCN Nature of Address Indicator | Y | Y |
X-FreeTDM-OCN-Plan | OCN Plan | Y | Y |
X-FreeTDM-OCN-Presentation | OCN Presentation Indicator | Y | Y |
Â
SS7 UK Parameters
Presentation Number
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-PresNumber | Presentation Number | Y | Y |
X-FreeTDM-PresNumber-Screen | Presentation Number Nature of Address Indicator | Y | Y |
X-FreeTDM-PresNumber-PresInd | Presentation Indicator | Y | Y |
X-FreeTDM-PresNumber-Plan | Presentation Number indicating Plan Number | Y | Y |
X-FreeTDM-PresNumber-PrefInd | Presentation Number indicating preferenced plan | Y | Y |
Â
Link by Link National Forward Call Indicator
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-LxL_RCI | Routing Control Indicator | Y | Y |
X-FreeTDM-LxL_ISI | Interconnect Specific Information | Y | Y |
Â
Divert Line ID
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-DivertLineId | Divert Line ID | Y | Y |
X-FreeTDM-DivertLineId-NADI | Divert Line Nature of Address Indicator | Y | Y |
X-FreeTDM-DivertLineId-Screen | Divert Line Screening Indicator | Y | Y |
X-FreeTDM-DivertLineId-PresInd | Divert Line Presentation Indicator | Y | Y |
X-FreeTDM-DivertLineId-Plan | Divert Line Plan | Y | Y |
X-FreeTDM-DivertLineId-IncInd | Divert Line Incomplete Indicator | Y | Y |
Â
ISDN X-Header
X-Header | Description | SS7->SIP | SIP->SS7 |
X-FreeTDM-CgPty-SubAddr | Calling Party Sub-address | Y | N |
X-FreeTDM-CgPty-SubAddr-Type | Calling Party Sub-address Type | Y | N |
X-FreeTDM-CgPty-SubAdr-OEIndicator | Calling Party Sub-address OE Indicator | Y | N |
X-FreeTDM-CdPty-SubAddr | Called Party Sub-address | Y | N |
X-FreeTDM-CdPty-SubAddr-Type | Called Party Sub-address Type | Y | N |
X-FreeTDM-CdPty-SubAdr-OEIndicator | Called Party Sub-address OE Indicator | Y | N |
X-FreeTDM-User-User | User to User Information | Y | N |
Â