wanpipe-pri-daemon-options
Note: This page is marked for deletion.
This page describes the configuration options and parameters when using the Sangoma PRI Daemon (usually with Sangoma MGD).
Basic Configuration for Sangoma PRI Daemon
- Switchtype - configure switch emulation.
- Signalling - configure as Network or Customer Premise Equipment
- Spans and Channels - Add spans and channels.
- Group - Add spans and channels to groups.
Trace/Debugging options
- D-channel trace - Enable protocol trace debugging.
- Printing current status.
- Increase/Decrease logging options.
- Interpreting Flags
List of parameters
descr: Configures the switchtype emulation.
Possible values:
| national | T1 | National ISDN 2 |
| dms100 | T1 | Nortel DMS 100 |
| 5ess | T1 | Lucent 5ESS |
| euroisdn | E1 | Euroisdn |
example:
switchtype=national
descr: Configure your switch as the Network side or CPE.
If you are connected to a Telco, you should configure as PRI_CPE (Customer Premise Equipment).
If you are emulating a Telco switch, you should configure as PRI_NET (Network).
example:
signalling = pri_net
signalling = pri_cpe
Spans and Channels
descr: Add spans or channels to be used.
Full spans:
spans=1-3,5
This will configure spans 1,2,3,5.
Fractional spans:
chans=s1c1-s1c10, s2c1-s2c12
This will configure channels 1 to 10 of span 1, and channels 1 to 12 of span 2.
Do not include the d-channels.
Note: span=1 is equivalent to chans=s1c1-s1c23
Groups
descr: Specify which group to add the spans or channels to.
example:
group=1
spans=1-4
group=2
spans=5
This configuration will have group 1 containing spans 1 to 4 and group 2 containing span 5.
descr: Enables/Disables the d-channel trace. The d-channel log file will be saved in /var/log/sangoma_pri/dchan_N.log, where N is the span number.
possible values:
| Yes | Enables Q.931 and Q.921 decoding |
| No | Disables all d-channel trace |
| q931 | Will only print Q.931 frames |
| q921 | Will only print Q.921 frames |
example:
dchan_log=yes
dchan_log=q931
You can also enable/disable d-channel trace while sangoma_prid is running:
smg_ctrl capture
(Will enable/disable all d-channel trace on all spans).
NFAS (Non-Facilities Associated Signalling)
descr: When using multiple spans, it is possible to use 1 d-channel for multiple spans.
parameters:
nfas_group= ; this will specify the nfas group for the following spans.
nfas_primary= ; this is the spa
n that contains the primary d-channel
nfas_secondary= ; this is the span that contains the backup d-channel
example:
| nfas_primary=4 nfas_secondary=2 nfas_group=1 spans=1-4 nfas_primary=8 nfas_secondary=6 nfas_group=2 spans=5-8 |
This is configure spans 1,2,3 and 4 with NFAS group 1. Primary d-channel will be on span 4 and backup d-channel will be on span 2.
This is configure spans 5,6,7 and 8 with NFAS group 2. Primary d-channel will be on span 8 and backup d-channel will be on span 6.
TON and NPI
If you are using Freeswitch/Openzap/FreeTDM:
(Note: You will need Openzap revision 1004 or later, and sangoma_prid version 1.63 or later)
To modify the TON (Type of Number) and NPI (Numbering Plan Identification) on outgoing calls:
Open /usr/local/freeswitch/conf/autoload_configs/openzap.conf.xml
And add these lines:
<boost_spans>
<span id="smg_prid">
<param name="dialplan" value="XML"/>
<param name="context" value="default"/>
<param name="outbound-called-ton" value="national"/>
<param name="outbound-called-npi" value="isdn"/>
<param name="outbound-rdnis-ton" value="international"/>
<param name="outbound-rdnis-npi" value="data"/>
<param name="outbound-calling-ton" value="national"/>
<param name="outbound-calling-npi" value="private"/>
</span>
</boost_spans>
Possible values for TON: National, International, Local, Unknown
Possible values for NPI: ISDN or E164, Data, Telex, National, Private, Reserved, Unknown
If you are using Asterisk:
You can specify the TON and NPI per call, by setting the following variables:
_OUTBOUND_CALLING_TON
_OUTBOUND_CALLING_NPI
_OUTBOUND_CALLED_NPI
_OUTBOUND_CALLED_TON
_OUTBOUND_RDNIS_NPI
_OUTBOUND_RDNIS_TON
You will need the numeric ISDN values:
| TON | NPI | |||
| Option | Value | Option | Value | |
| Unknown | 0 | Unknown | 0 | |
| International | 1 | ISDN/E.164 | 1 | |
| National | 2 | Data/X.121 | 3 | |
| Network Specific | 3 | Telex/F.69 | 4 | |
| Subscriber | 4 | National | 8 | |
| Abbreviated | 6 | Private | 9 | |
| Reserved | 7 | Reserved | 15 | |
descr: Prints the current status of sangoma_prid.
Show active calls:
smg_ctrl show_calls
See Interpreting flags for more details
Show status of spans
smg_ctrl show_spans
Increase/Decrease logging options
descr : Increase or Decrease the current verbose level without restarting sangoma_prid.
Increase Verbosity:
smg_ctrl v+
Decrease Verbosity:
smg_ctrl v-
Interpreting output of show_calls
After typing smg_ctrl show_calls, you will see an output like:
- Each line represents a call.
- The Ch-F column is a Hex representation the b-channel flags.
- The Call-F column is a Hex representation the call flags.
=======================Calls==========================
Sp | Ch | Ch-F | Call | Call-F | Smg-ID | TSoft-ID
Interpreting the Channel flags:
1 channel is available (Usually set when d-channel link is up)
2 channel requested for an outgoing call
3 channel is registered as being in use by user application
4 channel is registered as being in use by remote side
So for example, a b-channel flag value of 0x03 (00000011 in binary), would mean that the channel is available (first Bit is set to 1) and that the user application just requested an outgoing call (second bit is set to 1), but that we did not get a PROCEED/PROGRESS/ALERT/CONNECT from the remote side that confirms that this b-channel has been assigned to this call (3rd and 4th bit are set to 0).
Interpreting the Call flags:
1 Idle
2 Channel requested by remote side
3 Channel requested by usr application
4 Call is up
5 Remote side requested disconnect
6 User application requested disconnect
7 User application acknowledged an incoming call
8 User application aborted an outgoing call
9 Remote side acknowledged an outgoing call
10 Proceed message was sent on an incoming call
11 Received Media Indication on an outgoing call (PROGRESS)
12 Received a Ring Indication on an outgoing call (ALERT)
13 Progress Indication requested on an incoming call
14 On an incoming call, waiting for FACILITY message with caller Name