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

 

Return to Documentation Home I Return to Sangoma Support