BRI (Basic Rate Interface)

 

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:

  1. 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.

  1. 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:

    1. wanrouter start
      Starts all wanpipe A500 BRI ports:
      #> wanrouter start
      Usage: wanrouter [start|stop|restart]2.

    2. smg_ctrl start
      Starts SMG/BRI daemons. (equivalent to ztcfg step when working with zaptel):
      #> smg_ctrl start

      Usage: smg_ctrl [start|stop|restart]3.

    3. asterisk
      Start asterisk:
      #> asterisk

      Connect to asterisk CLI:
      #> asterisk -r

  2. 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,Hangup

  3. At 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. 

  1. 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/messages

    To start/stop/restart wanpipe drivers run:  wanrouter [start|stop|restart]

  2. 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.log

  3. Increase 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 Gateway

    In 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.

  4. 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.log

  5. Make 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.

  1. 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)

  1. 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-------------

  2. To apply changes run following commands
    # /etc/init.d/syslog restart  or  #/etc/init.d/rsyslog restart

  3. Run following command to check configured spans status
    # smg_ctrl show_spans
    #tail -f /var/log/sangoma_bri_debug.log

    May  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]: =============================================================

  4. 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]: =============================================================

  5. 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-

Return to Documentation Home I Return to Sangoma Support