Configuration Guides

 

Why is there no ring back on incoming calls?

 Answer: By default NSG does not play "ringing" for incoming calls when in the progress media state.

 FIX: Add the following line to the dialplan after determining that you will accept the call (i.e. before bridging the call to a SIP endpoint)

<action application="set" data="ringback=%(<on time>, <off time>, <freq 1>, <freq 2>)"/>

http://www.itu.int/ITU-T/inr/forms/files/tones-0203.pdf

Example: Below is an example for the Canadian ring back tone. Insure this is added under the extension "from-pstn" (<extension name="to-pstn">). Also insure you save the file after adding the line.
 

image-20240112-172858.png

Line Added: <action application="set" data="ringback=%(2000,4000, 440,480)"/>


 

Why are unanswered calls being dropped after 60 seconds?

Answer: NSG's dialplan runs an internal timer (call_timeout) that hangs up an unanswered call after 60 seconds.  This can interfere with ISUP timer T9 testing which is 90-180 seconds.

FIX: To increase the NSG call_timeout timer add the following line to the dialplan before you run the bridge application:

<action application="set" data="call_timeout=200"/>

 

Example: Below is an example for the Canadian ring back tone. Insure this is added under the extension "from-pstn" (<extension name="to-pstn">). Also insure you save the file after adding the line. 
 

image-20240112-173033.png

 

How to add national (0) or international (00) prefix on inbound calls?

It is the responsibility of the remote pbx connected to the NSG server to add the national/international prefixes, however, if your pbx does not have the capacity to do so, you may implement this feature the NSG dialplan.  Below will indicate how to append national and international prefixes and export the prefixed number via SIP

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:

 

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):

 

For informational purposes only: 

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

 

national

 

international

 


 

How to block/unblock callerid on incoming calls based on privacy variable?

It is the responsibility of the remote pbx connected to the NSG server (receiving the calls) to use the privacy variables set from NSG to block/unblock the callerid, however, if your pbx does not have the capacity to do so, you may implement this feature in the NSG dialplan.

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 enable NSG to block/unblock the incoming call's callerID before sending it out, depending on the value received for the "presentation_ind" variable  :

 

Below is a sample dialplan with the added syntax:
 

 


 

 

How to delay Answer message for inbound SS7 calls that connect to answering machine/voicemail

Typically, when a call connects with an answering machine/voicemail system, NSG sends the ANSWER message immediately to the MSC.  The idea here is to delay the ANSWER message for a set period of time (i.e. 3 seconds).

In order to do this, you must delay the 200 OK message that is sent from your registered Asterisk/FreeSWITCH to NSG. 

In your Asterisk/FreeSWITCH dialplan:

  1. Specify no answer at the beginning of the call

  2. playback a short audio file (the delay time you require, such as 3 seconds)

  3. Answer the call after the file is played

Below is a sample Asterisk Diaplan:

 

See below for a diagram of the implementation:

 


Why can't I configure my SPC?

The list of valid SPC's needs to be defined in your license file.  If you are trying to add a new SPC, or changing SPC's, we will need to regenerate a license file for that specific configuration.


NSG-ISO:  How to reset your password ?

If you have forgotten your log-in credentials to your NSG-SS7 Appliance, here is how you can reset the password:

  1. connect keyboard and mouse

  2. power down the appliance

  3. power on the appliance. As soon as you power it on, you need to interrupt the boot sequence, so keep pressing the ESCAPE key a the appliance boots up

  4. it it works you should come to a blue looking screen that has a few kernel entries. Press 'e' for edit

  5. at the very end of the kernel line enter the following, with a space before 'init=/bin/bash ' (dont put the ' ' quotes)

  6. then press enter.

  7. you will need to press 'b' to boot

  8. then after the system reboots you will enter the following to change the password:

     passwd root
     then it will ask you to put in the new password. put 'sangoma'

  1. then reboot the system and you should be able to use 'root' and 'sangoma' for the password (From webGUI)


How Do I Status The Raid Controller?

To check the status of the raid controller you can use the command below which will give a quick summary. 

Run: dmraid -s

Output: 
--> Active Subset
name : isw_bdhabhdhai_Volume0
size : 62527488
stride : 128
type : mirror
status : ok
subsets: 0
devs : 2
spares : 0

You can also get a detailed report by running the command below as well. 

Run: dmraid -n

Output:

/dev/sdb (isw):
0x000 sig: " Intel Raid ISM Cfg Sig. 1.1.00"
.........
0x1dc isw_dev[0].vol.map[0].disk_ord_tbl[1]: 0x1

/dev/sda (isw):
0x000 sig: " Intel Raid ISM Cfg Sig. 1.1.00"
.........
0x1dc isw_dev[0].vol.map[0].disk_ord_tbl[1]: 0x1


How to change algorithm of choosing timeslots for new calls. (1,2,3,4 or 30,29,28 or random or 1, 3, 5, 7 etc)?

NSG support Ascending and Descending hunting order.
Hunting order is configured via NSG GUI

GUI -> Configuration -> Global

 

 

pstn_default_group=g1

  • g1 - indicates group 1
    By default the NSG dialplan routes all DIDs from SIP to TDM  via a single trunk group. 

    • Groups are assigned to Spans in : Configuration -> TDM section.
      Routing between SIP to TDM is performed in: Configuration Dialplan 

    • If NSG requires multiple groups, then the Dialplan has to be modified to route based on DID

pstn_default_hunting=A

  • A - Indicates dscending order    - Highest to Lowest Channel/CIC

  • a - Indicates aescending order  - Lowest to Highest Channel/CIC

  • R - Round-robin ascending

  • r - Round-robin descending

Note
Gateway needs to be restarted for Global configuration to take effect.


How to enable even/odd hunting algorithm

Add below line in dialplan ( via GUI -> Configuration - >Dialplan) before bridging the call.

GUI  -> Configuration -> Dialplan 

 

Save the Diaplan.

Note, that Dialplan changes can be applied in real time without the need to restart the gateway.


 

How to turn on/off Ring-Back tone generating by a gateway as to SIP as to TDM (early media, etc) ?

By default early media is enabled.  Gateway does not generate ring tones.


 

How to collect Q931 data per TS or per whole E1 with different debug levels?

NSG supports PCAP tracing on Ethernet and TDM interfaces.

GUI -> Reports -> Network Capture

  • Select Network interfaces to capture: Ethernet and/or TDM

  • Click on Capture

  • Perform call tests or just wait for data to collect

  • Click to Stop Capture

  • Download PCP file to your Workstation

  • Open the PCAP file using Wireshark application.

Note:
Wireshark is a network analysis tool that can be freely downloaded on the internet.



How to control DTMF: RFC2833, SIP INFO or Inband?

SIP DTMF configuration can be modified in NSG GUI

GUI -> Configuration -> Global

 

sip_dtmf_type=[rfc2833|none|info]

  • rfc2833    Enable RFC2833 DTMF
     

  • info          Enable SIP INFO DTMF

  • none        Disable DTMF in SIP Header.  Relay on Inband DTMF

    Node that by default NSG Gateway removes all inband DTMF tones.
    Along with this option, user must set  Inband DTMF Removal Buffer to Zero for each SPAN.

    GUI->Configuration->TDM-> 
       For each Span:  Physical Config -> Edit -> Advanced Options -> Inband DTMF Removal Buffer = 0

Note:
Gateway needs to be restarted for Global configuration to take effect.


How to set SIP timers (T1,T2 etc if possible)?

NSG SIP Timers T1 and T2 are set by default

  • T1=500ms

  • T2=4000ms

  • Transaction Timeout=32000ms  

To change these settings
GUI -> Configuration -> File Editor

  • Select sip_profiles from left hand side

  • Select internal.xml

  • Add the following parameters to the bottom of the parameter list

     

    T1 - Initial retransmission interval (in milliseconds).
    T2 - Maximum retransmission interval (in milliseconds)
     timer-T1X64 -  Transaction timeout (defaults to T1 * 64)

 

Gateway needs to be restarted for File editor configuration to take effect.

 


How to enable/disable T.38?

NSG enables T.38 by default. The T.38 is triggered by the CNG or V.21 tone.
These values are configured in Dialplan

GUI -> Configuration - >Dialplan

This is default configuration that enables T.38

 

To disable T.38, comment out the four actions using <!--   --> headers.

 

  • Save the Diaplan.
    Note, that Dialplan changes can be applied in real time without the need to restart the gateway. 

 


How to enable/disable/configure V.152 (vbd for gpmd) in the SDP?

general purpose media description (gpmd) attribute is not supported.


How to switch Echo Cancellation on/off?

By default Echo Canellation is always enabled NSG gateway.
Echo can be disabled in Dialplan.

The following command must be appended to the diaplan before the "bridge" command

GUI->Configuration->Dialplan

Disable EC 

That EC will always be re-enabled on next call start.

 

Save the Diaplan.
Note, that Dialplan changes can be applied in real time without the need to restart the gateway.

 


How to enable/disable Comfort Noise (CNG G.165)?

NSG support CNG.
When both sides are supporting RFC 3389 (they agree in SDP message exchange, rtpmap:13), NSG will send CN packets.
 


How to configure adaptive amplifier (AGC G.165/G.168)?

AGC is not supported.


How to configure adaptive jitter buffer?  

Jitter buffer is not enabled by default.

To enable jitter buffer, following line must be appened to the DIalplan before the "bridge" command.

GUI->Configuration->Dialplan

Fixed Jitterbuffer 

 

Adapter Jitterbuffer: 60 ms jitter buffer with 200ms max length and 20 ms max drift

 Save the Diaplan.

Note, that Dialplan changes can be applied in real time without the need to restart the gateway.

 


How to set frequencies for Ring Back Tone etc (needed Russian variant)?

To enable custom ring back, following line must be appened to the DIalplan before the "bridge" command.

GUI->Configuration->Dialplan

US Ring

 

Russia Ring

 

Ringback will not be sent unless the variable is set *and* there's a ringing indication from the party that is being called.

If you want to use fake ringback via the ringback variable and you want it to happen instantly, you can also do:

 

Save the Diaplan.
Note, that Dialplan changes can be applied in real time without the need to restart the gateway.

 

Common Ring Cadences per country


How to set RX/TX level on the E1 side?

The Rx/Tx E1 gain can be sent in 2 different ways

  • GUI Span Configuration

  • Real time using NSG CLI

 

GUI Span Configuration
 

  • GUI - > Configuraiton -> TDM

  • Fore each span

    • Click on Physical Config -> Edit -> Advanced Parameters -

    • Set Tx Gain

    • Set Rx Gain

  • GUI -> Configuration -> Apply configuration 
     

Real time NSG CLI
 

  • GUI -> Configuraiton -> Command Execution -> NSG Command Window
    Enter the command and click Execute
     

  • Adjust gains for whole span

  • Adjust gains for span chan

Note that real time commands do not persist after reboot.


How to set 3-way call with 3-way mixing on the box?

 3-way call with 3-way mixing can be enabled through the dial plan using attended_xfer application. To make a three way call, just press the DTMF digit 0 when the last party answers the call during an attended transfer. Here is an example of dial plan:

GUI -> Configuration - >Dialplan

Make a dialplan feature which read the number to make an attended transfer.

 

Then bind this feature to DTMF 3.

During call press *3 to activate the feature. Feed it the number then it will make the call.

If you press DTMF 0 (after the other leg answered) then it will convert it to a three-way.

 


How to use DNS SRV to register with NSG to SoftSwitch?

NSG suppots DNS SRV natively.
In order to register to a remote SoftSwtich, a gateway must be configured in NSG.

NSG Arechitecture

  • SIP Profile 

    • Used to listen to SIP Port eg: 5060

    • Handles incoming connections

  • SIP Gateway 

    • Also know as SIP Trunk

    • Used to connect to remote SIP server

    • Contains credentials and configuration necessary to establish the connection

  • SIP Domain

    • Used to implement local registration 

    • Contains local user info and credetials

    • SIP Domain must be attached do the SIP Profile

 

SIP Gateway/SIP Trunk Configuration

  • GUI - > Configuration -> File Editor

  • From the left hand side click on sip_profiles

  • Open internal.xml

Append gateway configuration to the bottom of the file

 



How to get DHCP Option 120 and then to use external script to change SIP Proxy setting?

Refs:

Request DHCP option 120

In /etc/dhcp/dhclient-eth0.conf add following lines:

This instructs dhclient to request option 120 and to decode is as uint8 (encoding) and an ipaddress(v4)

Didn't find yet the proper way to decode fqdn (encoding 0) but here is an alternative that can do the job with little tweak in hook script (see below)

 

Decode/Handle option 120

Create dhclient handler script in /etc/dhcp/dhclient.d/sip_server.sh (chmod +x)

 

In case of ipaddr encoding fields are extracted correctly:

  • encoding=1

  • sip-server=1.2.3.4

In case of fqdn emcoding fields are almost extracted correctly:

  • encoding=..

  • sip-server=sip.sangoma.local.

So above hook script must account for encoding being .. (instead of 0) and remove trailing . (dot) at the end of sip-server value.

Hook script in the end replace the remote sip ip address by the one returned by dhcp in NSG xml file (WIP script have to account for errors and above mentioned use case (fqdn)) - we also have to instruct FS to reload its configuration.


How to set channel name on which call needs to be bridge?

By default calls are bridge generally based on hunting and span

To enable sending/bridging to a specified , following line must be appened to the DIalplan before the "bridge" command within condition

GUI  -> Configuration -> Dialplan 

 

In order to set span 2 channel 1 below lines needs to be included in dialplan:

 


How to allow calls for specific IP?

By default calls are allowed and executed based in destination number

To enable allowing calls from specific IP's, following condition must be appened to the DIalplan inside "to-pstn" context

GUI  -> Configuration -> Dialplan

 

To add multiple IP's continue adding network_addr one after the another as per requirement

 

 NOTE: The IP are the dummy IP's for exmaple purpose. Please use the IP to which calls needs to be bridge

 


How to remove sending of INFO messages if NSG is sending X-FS-Support: update_display,send_info in Invite message ?

To stop sending INFO messages, in case INVITE is generating X-FS-Support with update_display,send_info below changes are required in dialplan and sip_profile to stop sending X-Fs-Support Header witin SIP INVITE
NOTE: Sending of update_display,send_info in X-FS-Support haeader may lead to dealy in sending BYE to remote IP until INFO message timer is expired

 

GUI  -> Configuration -> Dialplan

Add condition before bridging the call

 

GUI  -> Configuration -> SIP

Add this configuration

 


How to fill Calling Party Number in Remote Party Header if Presentation Restricted is received for Calling Party Number header?

By default calls are allowed and executed based in destination number and desination number is filled based on Presentation value received from peer SS7 side.

In order to fill calling party number in remote party header even if the received presentation is restricted , following condition must be appened to the DIalplan inside "to-sip" context.

GUI  -> Configuration -> Dialplan 


How to supress comfort noise and to avoid adding "silenceSupp" line in SDP?

To stop sending "silenceSupp" line included in SDP, below changes are required in dialplan.

GUI  -> Configuration -> Dialplan

Add condition before bridging the call

 


How to remap sip response hangup cause code to ISUP specific hangup cause code?

In order to remap sip response hangup cause code to ISUP specific hangup cause code dialplan changes are required.
Please find below example of mapping 503 Server Unavailable to ISUP cause code 34 i.e. NORMAL CIRCUIT CONGESTION

GUI  -> Configuration -> Dialplan

Add below condition in dialplan

 

Add below context and condition in dialplan 


How to re-map isup/isdn/q850 channel hangup cause to particular sip specific hangup cause code?

In order to re-map q850 channel hangup cause code to sip specific hangup cause code dialplan changes are required.
Please find below example of mapping q850 chanel hangup cause 19 (NOT FOUND)to SIP hangup cause code 406 with sip reason header as "NO ANSWER"

GUI  -> Configuration -> Dialplan

Add below condition in dialplan

 

Add below context and condition in dialplan 


How to remove stop sending cid name in SETUP forwarded by NSG?

 

In order to stop sending cid name in SETUP as forwarded by NSG dialplan changes are required.
Please find below example in order to achieve the same:

GUI  -> Configuration -> Dialplan

Add below condition in dialplan within "from-voip-to-pstn" context:


How to change/set bearer capability in SETUP/IAM forwarded by NSG?


In order to change/set bearer capability to user defined value  in SETUP/IAM as forwarded by NSG dialplan changes are required.
Please find below example in order to achieve the same:

GUI  -> Configuration -> Dialplan

Add below condition in dialplan within the context as per user requirement:

Below are the list of values one can set for Bearer Capability:

Set Value

Description

Set Value

Description

0

Speech

1

Unrestricted Digital

2

Restricted Digital

3

3.1 Khz Audio

4

7 Khz Audio or Unrestricted digital w tones

5

15 Khz Audio

6

Video

Return to Documentation Home I Return to Sangoma Support