Sending Calls to PRI (NVG)
Â
NVG Product Info -> http://www.sangoma.com/products/netborder-voip-gateway-appliance/
Â
The default dial plan in NVG sends all incoming calls from SS7 to SIP, than all calls from SIP to SS7. In many cases all three connections (SIP,SS7,PRI) will be used and in other cases just two. This page shows how to handle both cases.Â
Once you have configured your PRI Span set the group number to one that is not already assigned to SS7 links.Â
Â
EditÂ
/usr/local/nsg/conf/dialplan/default.xml than find the correct context, below is a quick guide line.Â
SS7 Incoming Calls -Â "from-pstn-to-sip" context
SIP Incoming Calls - Â "from-voip" context
For this example we will use "from-pstn-to-sip" for the incoming SS7 calls. Below is a simplified version of the dialplan, there is much more in the actual file. This dialplan uses the "^(.*)$" condition on the called number to route all calls out SIP.
<context name="from-pstn-to-sip">
    <extension name="to-sip">
        <condition field="destination_number" expression="^(.*)$">
            <action application="bridge" data="${sofia_contact($${gwuser}@$${domain})}"/>
        </condition>
    </extension>
</context> |
Â
To route all calls going to destination numbers that start with "905474" to the PRI link use the dial plan below. If the destination number does not start with 905474 then it will route out SIP.Â
<context name="from-pstn-to-sip">
    <extension name="to-sip">
        <condition field="destination_number" expression="(^905474.*)" break="never">
            <action application="set" data="hangup_after_bridge=yes" />
            <action application="bridge" data="freetdm/g2/a/$1"/>
            <action application="hangup" data="${originate_disposition}"/>
        </condition>
        <condition field="destination_number" expression="^(.*)$">
            <action application="bridge" data="${sofia_contact($${gwuser}@$${domain})}"/>
        </condition>
    </extension>
</context> |
Â
Ensure you save the default.xml file as well as restart NSG or run the command "reloadxml" from the NSG CLI.Â
Â
If you wish to have all calls go to PRI then you can use the dialplan example below.Â
<context name="from-pstn-to-sip">
    <extension name="to-sip">
        <condition field="destination_number" expression="^(.*)$" break="never">
            <action application="set" data="hangup_after_bridge=yes" />
            <action application="bridge" data="freetdm/g2/a/$1"/>
            <action application="hangup" data="${originate_disposition}"/>
        </condition>
    </extension>
</context> |
Â
Warning
The dial plan here is simplified (making it easier to read) so the extra content in the default.xml file needs to be in the file. The new condition for bridging to PRI is complete, so you can just copy/paste this into your dial plan.Â
Always take a backup of your dial plan before editing it so you can restore it if you hit issues
You can enter the NSG CLI by running the command "nsg_cli"
Â