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:
Â
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:
*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 |
Â