BRI (Basic Rate Interface)
- 1 IMPORTANT Driver Information
- 2 The Sangoma SMG/BRI A500 card with Asterisk:Â
- 3 Sangoma Wanpipe Drivers Installation + BRI/SMG (Full installation)
- 4 Verbose Level
- 5 Protocol Capture
- 6 Country code
- 7 Operator code
- 8 Signalling
- 9 Connection type
- 10 Number of incoming digits
- 11 Dialplan
- 12 NumberingPlan
- 13 ServiceType
- 14 Prefix
- 15 Default TEI
- 16 Local Number (MSN)
- 17 Timers
- 18 Incoming calls behaviour
- 19 Outgoing calls behaviour
- 20 General calls behaviour
- 21 D-channel Log
- 22 Cable Pinout
- 23 A500 Pin-outs
Â
IMPORTANT Driver Information
wanpipe 3.3.15 RPMs are located at tech2:~gcolburn/sangoma-latest
Sangoma Wanpipe: Asterisk SMG/BRI Install
Sangoma AFT A500 BRI is compatible with Asterisk and Callweaver. Support for FreeSwitch is coming soon.
Sangoma AFT-A500 + SMG/Netbricks BRI + Sangoma MGD solution obtains TBR3 Certification with any version of Asterisk.
The A500 BRI card can operate with Asterisk in following mode:
Asterisk + SMG/Netbricks BRI + TDM API + Wanpipe Hardware Drivers
The A500 cards operates under TDM API (not zaptel). The TDM API is Sangoma open source TDM kernel driver.
The Sangoma SMG/BRI A500 card with Asterisk:Â
Â
Asterisk 1.6.0.28-samy-r100 - incompatible with module chan_woomera.so
(commonly seen with Web admin panel 2010.1.15)
Asterisk 1.6.0.28-samy-r105 - required for BRIs.
(ask L3)
Keywords: errors / warnings: could not be loaded, undefined symbol ast_category_browse
Hardware Installation
For an animated demo of how to install the A500, go to:
http://sangoma.com/datasheets/A500BRI
Click on "View Demo".
A500 BRI Termination resistors to switch between NT and TE modes
Â
The A500 comes with termination resistors that have to be disabled (set to OFF) when running in TE mode and enabled (set to ON) when running in NT mode.The resistors corresponding ports 1 and 2 are closest to the PCI base.The ON position is closer to the NT/TE modules.The OFF position is closer to the RJ-45 connectors.
Sangoma Wanpipe Drivers Installation + BRI/SMG (Full installation)
Â
Use trixbox Pro's detect cards script.
Â
The script will proceed to configure each A500 BRI Port.
After wancfg_smg configures all the cards, you will have an option to stop and restart Wanpipe/SMG/BRI and Asterisk.
If you do not select the "Restart Wanpipe/SMG/BRI and Asterisk option:
The startup procedure is comprised of three steps:
wanrouter start
Starts all wanpipe A500 BRI ports:
#> wanrouter start
Usage: wanrouter [start|stop|restart]2.smg_ctrl start
Starts SMG/BRI daemons. (equivalent to ztcfg step when working with zaptel):
#> smg_ctrl startUsage: smg_ctrl [start|stop|restart]3.
asterisk
Start asterisk:
#> asteriskConnect to asterisk CLI:
#> asterisk -r
At this point we are ready to write our Dial Plan in /etc/asterisk/extensions.conf
Asterisk will connect to the SMG daemon using a woomera channel driver.
The Dial Plan syntax is 100% identical to Zaptel but instead of using Zap as a channel identifier we will use WOOMERA.This is an example of /etc/asterisk/extensions.conf
  ;Sangoma SMG Outbound context
   ;Place call on woomera channel to SMG/BRI
   ;==================================   [outb]
   exten => _X.,1,noop
   exten => _X.,n,Dial(WOOMERA/g1/${EXTEN}|60|o)
   exten => _X.,n,Hangup   ;Sangoma SMG Incoming Contexts
   ;Context name defined in /etc/asterisk/woomera.conf
   ;====================================   [sangoma]
   exten => _X.,1,noop
   exten => _X.,n,Playback(demo-congrats)
   exten => _X.,n,Hangup   ;Early Media Example
   ;To play a file without answering the call   [sangoma4]
   exten => _X.,1,noop
   exten => _X.,n,Playback(demo-congrats|noanswer)
   exten => _X.,n,HangupAt this point, the system is ready to make test calls.
Â
Asterisk SMG/BRI Troubleshooting Debugging
Â
Each component in the Asterisk SMG/BRI architecture has their own log file.Â
Confirm that wanpipe drivers have been started.
#>Â wanrouter status
          Confirm that all ports are in connected/connecting/disconnected state.
Note:In some countries, the physical lines start in power-saving mode, or go to power-saving after a few seconds of inactivity. Therefore, it is normal to see a BRI port in connecting or disconnected state even if a physical line is connected.
#> ifconfig
          Confirm that each port device w1g1, w2g1, w3g1 exists and that Rx/Tx counts are incrementing.
          Confirm that there are no overruns or errors in interface statistics.#> tail -f /var/log/messages
           All wanpipe driver errors and events are logged in /var/log/messagesTo start/stop/restart wanpipe drivers run: wanrouter [start|stop|restart]
Confirm that SMG/BRI stacks are up
#> ps fax | grep sangoma
          Visually confirm that sangoma_mgd and sangoma_brid are running.To start/stop/restart the SMG/BRI use smg_ctrl script:Â
     #> /usr/sbin/smg_ctrl [start|stop|restart]All events, errors or logs for SMG are logged in /var/log/sangoma_mgd.log
All BRI protocol events and traces are logged in /var/log/sangoma_bri.logIncrease the BRI Daemon/Sangoma Media Gateway verbosity to 5
Open a separate SSH window and type:
#> tail -f /var/log/sangoma_mgd.log
This should output the debugging of Sangoma Media GatewayIn the original SSH window, type:
#> smg_ctrl v+
You should see the message "Verbose level set to N" in the sangoma_mgd.log
Repeat this command until the verbosity is at least 5.Enable protocol capture.
#> smg_ctrl capture
This will enable logging of the BRI protocol in /var/log/sangoma_bri.log
You should see "Protocol capture enabled" in /var/log/sangoma_mgd.logMake an outgoing call from Asterisk.
You should see a message like:
(sN) Outgoing call (N-Id:X S-Id:X)
(sN) Called Nb: [.....] Calling Nb:[.....] .....Â
where N is the span number , in your /var/log/sangoma_mgd.log
Â
Once the remote party answers the call, you should see "Call connected"
Â
If the call fails, and your port was in connecting or disconnected state in step 1 (wanrouter status), confirm that the port went to connected state while attempting to make the outgoing call.
If the port stayed in connecting or disconnected state, you have a physical layer problem, check your cables.
If the port switched to connected state, but the call failed, you have a protocol problem. Check /var/log/sangoma_mgd and /var/log/sangoma_bri.log for protocol errors. If you cannot determine the protocol errors, email your configuration and log files to Sangoma Tech Support.
Make an incoming call from Asterisk:
You should see a message like:
(sNcX) Incoming call on Trunkgrp:X....Once the remote party answers the call, you should see "Call connected"
Â
Note: If you have only one ISDN line from the telco insure that both B channels (S/T) is going to our card. If telco splits the ISDN line into 2 U interfaces then insure that our card is configured for point to multi point and the MSN's are configured correctly. Please see http://wiki.sangoma.com/BriAdvancedOptions#msn to configure the MSN values.
Advanced BRI Debugging Option : For Span and Call States
Note : This feature will be supported from Sangoma BRI Daemon Version: v1.39 . (Wanpipe-3.3.9 and newer version will have this feature)
Add following line in /etc/syslog.confor /etc/rsyslog.conf ( Some distro uses rsyslog instead of syslog )
----------------------------------------cut here----------------Â # Sangoma BRI Daemon (smg_bri)log
local4.*/var/log/sangoma_bri_debug.log
--------------------------------------------cut here-------------To apply changes run following commands
# /etc/init.d/syslog restart or #/etc/init.d/rsyslog restartRun following command to check configured spans status
# smg_ctrl show_spans
#tail -f /var/log/sangoma_bri_debug.logMay 1 11:11:08 trixbox1 smg_bri[12482]: ==========================Spans==============================
May 1 11:11:08 trixbox1 smg_bri[12482]: #     prot   phy    ch     func   grp
May 1 11:11:08 trixbox1 smg_bri[12482]: 1     Up     Up     0      te     2
May 1 11:11:08 trixbox1 smg_bri[12482]: 2     Up     Up     0      te     2
May 1 11:11:08 trixbox1 smg_bri[12482]: =============================================================Run following command to check active calls# smg_ctrl show_calls
#tail -f /var/log/sangoma_bri_debug.log
May 1 11:12:02 trixbox1 smg_bri[12482]: ==========================Calls==============================
May 1 11:12:02 trixbox1 smg_bri[12482]: ID    state  span   chan   n-id   s-id
May 1 11:12:02 trixbox1 smg_bri[12482]: 1     up     1      1      1      7
May 1 11:12:02 trixbox1 smg_bri[12482]: 2     up     2      1      3      0
May 1 11:12:02 trixbox1 smg_bri[12482]: =============================================================Each time one of the command is run appropriate info will be logged in to /var/log/sangoma_bri_debug.log
A500 BRI Support
Â
For initial support and questions contact Sangoma Techdesk:
Sangoma Techdesk
   See the "Asterisk and BRI" section for list of required information
You can also email new feature requests to:
 Nenad Corbic <ncorbic@sangoma.com> - Project Manager
 David Yat Sin <davidy@sangoma.com> - BRI Stack Developer/EngineerÂ
Â
Sangoma BRI Daemon advanced options
Your Sangoma BRI Daemon configuration file is located in /etc/wanpipe/smg_bri.conf . This file can also be generated using the wancfg_smg utility if no advanced options are required. The verbose level and protocol capture options are global. All the other parameters are configurable per span.
Â
Verbose Level
descr: Sets the verbosity level of the SMG BRI Daemon log file in /var/log/sangoma_mgd.log
parameter: verbose
possible values:1-10
recommended option: Â Â Â 2 Â Â Â (for production environment)
                          7    (for testing environment)
Â
example:
verbose=2
Protocol Capture
descr: Enables or disables BRI protocol stack debugging log file in /var/log/sangoma_bri.log
parameter: prot_capture
possible values: yes/no
recommended option:    no   (for production environment)
                          yes   (for testing environment)
example:
prot_capture=yes
The remaining options are configurable per span.Â
Country code
descr: Set this to your local country
parameter: country
possible values: australia, austria, belgium, canada, chile, denmark, europe, finland,
france, germany, hong_kong, india, irlande, israel, italy, japan, korea, luxembourg,
netherlands, new_zealand, norway, portugal, singapore, south_africa, spain,
sweden, switzerland, taiwan, uk, usa, ussr
recommended option: Â europe
example:
country=europe
Â
Operator code
descr: Contact your telco for this parameter. Currently, only ETSI mode is supported.
parameter: operator
possible values: etsi
recommended option:Â etsi
example:
operator=etsi
Â
Signalling
descr: Specifies the BRI function
parameter: signalling
possible values: bri_te, bri_nt   Note: bri_te is sometimes called bri_cpe, and bri_nt is sometimes called bri_net
default option:Â bri_te
example:
signalling=bri_te
Connection type
descr: This should match the parameter configured by your telco, or remote switch
parameter: connection_type
possible values: point_to_point, point_to_multipoint
default option:Â point_to_multipoint
example:
connection_type=point_to_multipoint
Â
Number of incoming digits
descr: Minimum number of digits for called number on an incoming call. Incoming calls with called number less than this value will be rejected with cause: Invalid number format.
parameter: num_digits
possible values: 1-16
recommended option:Â 8
example:
num_digits=8
Dialplan
descr: Some switches require the "type of number" network specific facility IE to be set.
parameter: dialplan
possible values: unknown, national, international, network_specific, subscriber, abbreviated
example: dialplan=national
NumberingPlan
requires wanpipe-3.3.2.p11 or later
descr: Some switches require the "number plan" network specific facility IE to be set.
parameter: numberingplan
possible values:
unknown
isdn         ;ISDN/telephony numbering plan (CCITT E.164/E.163)
telephone  ;telephony - not in CEPT
data        ;data numbering plan (CCITT X.121)
telex        ;telex numbering plan (CCITT F.69)
national    ;national standard numbering plan
private     ;private numbering plan
reserved    ;reserved numbering plan
example:
numberingplan=isdn
ServiceType
requires wanpipe-3.3.2.p11 or later
descr: The service type.
parameter: servicetype
possible values:
voice         ;voice
voice-cgi     ;voice on GCI service
audio-7Â Â Â Â Â Â ;7Khz audio service
data         ;data service
data-56k     ;data at 56kbs service
data-trans   ;transparent data service
modem       ;modem data service
fax           ;G3 facsimile service
fax-4Â Â Â Â Â Â Â Â Â ;G4 facsimile service
v110Â Â Â Â Â Â Â Â Â Â ;v.110 service
v120Â Â Â Â Â Â Â Â Â ;v.120 service
video          ;video service
example:
servicetype=modem
Prefix
descr: Prepend incoming Caller ID Number based on the "type of number" network specific facility IE.
parameter: unknown_prefix, national_prefix, international_prefix, networkspf_prefix, subscriber_prefix, abbreviated_prefix
possible values: <any phone number> Â
example:
national_prefix=01
international_prefix=011
unknown_prefix=00
Default TEI
descr: When configured in point to point mode, a default TEI value can be assigned per span.
parameter: default_tei
possible values: 1-127Â Â Â Â Â Â Note: default_tei=127 means the TEI value will be negotiated between the NT and TE side.
recommended option:Â Â Â Â Â Â Â 0 for TE, 127 for NT Â Â Â Â
Note: by default, the TEI is set to 0 when connection type is set to point to point and 127 when the connection type i set to point to multipoint
example:
default_tei=0
Â
Local Number (MSN)
descr: Call filtering number. On incoming calls, any number that does not match the local_number string will not be answered. This feature is used for Multiple Subscriber Numbering. An incoming call will be answered if the shortest string between the received called number and the programmed called number matches.
parameter: local_number
possible values: <any phone number>
example:
local_number=123456789
Examples:
Received Called Number | Local Called Number | Call answered |
 123456 | 456 | YES |
 456 | 123456 | YES |
 123456 | 123456 | YES |
 <none> | 456 | NO |
 <none> | <none> | YES |
 123456 | <none> | YES |
 123456 | 4567 | NO |
Â
To reset the local numbers, use:
local_number = none
or
local_number = reset
Â
Timers
descr: Setting non-default values for the Timers
T3: Time-out after an activation request is sent.
default: timer_t3 = 8000
example: timer_t3=10000
This will set the T3 timer to 10 seconds
T302: Used in overlap receive mode, amount of time to wait for incoming digits.
default: timer_t302 = 15000
example: timer_t302 = 30000
This will set the T302 timer to 30 seconds
Incoming calls behaviour
descr: Some telcos might require some parameters to be enabled for incoming calls. Multiple parameters can be enabled per span.
parameter: in_calls_behaviour
default: Â Â Â (bri_te):Â Â DATA_CONN_RS
            (bri_nt):  DATA_ALERT_RQ, SEND_CALL_PROC_RQ
To reset: in_calls_behaviour=default
example:
To enable "transparent overlap receive" on bri_te mode, enable the default in_calls_behaviour, then enable "transparent overlap receive"
in_calls_behaviour=VOICE_ALERT_RQ
List of options for in_calls_behaviour:
SEND_VOICE_ALERT_RQ (default = enabled)
   A call alert message is sent on incoming voice calls.
DATA_ALERT_RQ (default = enabled for NT, disabled for TE)
   A call alert message is sent on incoming data calls.
SEND_CALL_PROC_RQ (default = enabled for NT mode, disabled for TE mode)
   A call proceeding message will be sent before the call alert message is sent. The call proceeding message is optional, but some switches require it.
TRUNCATE_NB (default = disabled)
  When using overlap receive mode (usually used then ISDN BRI phones are connected to a bri_nt port), the called number will be truncated to the number of digits specified in num_digits.
CALL_WAITING (default = disabled)
   Enables support for "Call-Waiting Supplementary Service". If disabled, all calls received with channel-id = No-channel will be rejected.
TRANSPARENT_OVERLAP_RCV (default = disabled)
   Only used in overlap receiving mode. On incoming calls, the call is forwarded to the "s" extension in Asterisk and incoming out of band digits are forwarded as DTMF digits to Asterisk.
Outgoing calls behaviour
Â
descr: Some telcos might require some parameters to be enabled for outgoing calls. Multiple parameters can be enabled per span.
parameter: out_calls_behaviour
default: Â Â USER_SENDING_COMPLETE
To reset: out_calls_behaviour=default
example:
See incoming calls behaviour
List of options for out_calls_behaviour:
USER_SENDING COMPLETE (default = enabled)
   The sending-complete information element is send when requesting an outgoingcall.
SEND_CONN_CO_ON_PROGRESS (default = disabled)
    The call will be answered when after a call progress message is received. Otherwise, the call is answered when a Connect message is received.
SEND_DIGIT_CO_ON_PROGRESS (default = disabled)
   When this is enabled, a call progress message will be sent when a call proceeding message is received. Otherwise, BRI stack will wait for a Setup ACK message.
REJECT_IF_NO_FREE_CHAN (default = disabled)
   Outgoing calls will be rejected locally if no b-channels are available. Otherwise, outgoing calls will still be requested, and the remote side is expected to reject the call.
STORE_CHAN_ID_IN_SETUP (default = disabled)
 The channel-id is always specified in an outgoing call setup message, even if it is not required (i.e optional only).  Â
ACCEPT_IA5_NB (default = disabled)
   If enabled, outgoing calls with calling number, and called number containing IA5 characters will not be rejected. Otherwise, only extended digits are allowed (0-9, *, #)
Â
General calls behaviour
Â
descr: Some telcos might require some parameters to be enabled for general call behaviours. Multiple parameters can be enabled per span.
parameter: gen_calls_behaviour
default: Â Â CC_UUI_RECOGNITION
To reset: gen_calls_behaviour=default
CHAN_ALLOC_LOWEST
   allocates the b-channels by starting with the lowest available B-channel.
CHAN_ALLOC_HIGHEST
   allocates the b-channels by starting with the highest available B-channel.
D-channel Log
Â
descr: Logs the traces for each frame received on the d-channel. This can take up a lot of system resources and should only be enabled upon request by Sangoma.
parameter: dchan_log
possible values: yes/no
default: no
example: dchan_log=yes
Cable Pinout
A500 Pin-outs
Connector Pin-out:
1-> Port N+1 TX+
2-> Port N+1 RX+
3-> Port N TX+
4-> Port N RX+
5-> Port N RX-
6-> Port N TX-
7-> Port N+1RX-
8-> Port N+1 TX-