Adding national (0) or international (00) prefix on inbound calls

From the NSG webgui, navigate to the Dialplan via the left column. Edit the information inside the "to-sip" extension, which resides inside the "from-pstn" context.  Below is an example of a stock NSG dialplan:

image-20240112-211048.png

 

Within the "to-sip" extension tags add the following syntax to prefix the inbound call for national (0) or international (00) calls:

 

National call:

<condition field="${freetdm_ss7_clg_nadi}" expression="3" break="never"> <action application="export" data="sip_h_X-FreeTDM-CallerNumber=0${caller_id_number}"/> </condition>

 

International call:

<condition field="${freetdm_ss7_clg_nadi}" expression="4" break="never"> <action application="export" data="sip_h_X-FreeTDM-CallerNumber=00${caller_id_number}"/> </condition>

 

Below is an example that implements the above:

image-20240112-211318.png

*Note: make sure to add the above syntax BEFORE the bridge dialstring (or add to top of context):

 <action application="bridge" data="${sofia_contact($${gwuser}@$${domain})}"/>

 

For informational purposes only: 

Below is an example from a wireshark trace of the NADI value (Nature of Address)

 

national

 

international

 

Return to Documentation Home I Return to Sangoma Support