Sangoma SS7 - Setting Sub-Address
Definition:
The Sub-address supplementary service allows the called (served) user to expand his addressing capacity beyond the one given by the ISDN number - ITU Q.738.1 Section 8.1
Standard:
ITU Q.731.8 Sub-Addressing (SUB)
Usage:
The format of the sub-address field is: <type of encoding digit><sub-address>
Currently the following values are accepted for the type of encoding:
| Type of Encoding | Description |
| 0 | encoding type is NSAP using IA5 values for the digits. Only numberic characters are allowed (0-9). |
| 1 | national variant using 4-bit hex value encoding. Only hex characters are allowed( 0-9,a,b,c,d,e,f) |
Example:
FreeSWITCH:
<action application="set" data="clg_sub_addr=05551234"/> <!-- set the calling sub-address (555-1234) using NSAP encoding to a local variable -->
<action application="set" data="cld_sub_addr=15556789F12"/> <!-- set the called sub-address (555-6789-FF-12) using national encoding to a local variable -->
<action application="export" data="freetdm_ss7_clg_subaddr=${clg_sub_addr}"/> <!-- export the private variables to the proper FreeTDM named variable -->
<action application="export" data="freetdm_ss7_cld_subaddr=${cld_sub_addr}"/> <!-- export the private variables to the proper FreeTDM named variable -->
<action application="bridge" data="freetdm/g1/a/${destination_number}/> <!-- dial out on group 1 using ascending hunting -->
Asterisk via NSG:
NOTE: SIP X-HEADER support needs to be enabled in freetdm.conf.xml
exten => _X., n, SIPAddHeader(X-Freetdm-clg-subaddr: 05551234) ;set the SIP X-header for calling sub-address (555-1234) using NSAP encoding
exten => _X., n, SIPAddHeader(X-Freetdm-cld-subaddr: 15556789F12) ;set the SIP X-header for called sub-address (555-6789-FF-12) using national encoding
exten => _X., n, dial(sip/${EXTEN}-g=g1-h=a@nsg) ; dial out sip profile NSGon group 1 using ascending hunting
FreeSWITCH via NSG:
NOTE: SIP X-HEADER support needs to be enabled in freetdm.conf.xml
<action application="set" data="sip_h_X-clg-sudaddr=05551234"/>
<action application="set" data="sip_h_X-cld-sudaddr=15556789F12"/>
<action application="bridge" ...