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.
Asterisk connects to a Sangoma Media Gateway daemon (SMG) that contains a proprietary certified BRI stack from Netbricks, and SMG connects to TDM API and A500 card.
This document will discuss how to configure and install the A500 BRI
card with Asterisk and Sangoma's new SMG (Signal Media Gateway) that
contains a proprietary, certified BRI stack!
The Sangoma SMG/BRI A500 card with Asterisk:
- Download drivers
- Hardware Installation
- Asterisk Installation
- Sangoma Wanpipe Installation
- Sangoma SMG/BRI Installation
- Sangoma SMG/BRI Configuration/Operation
- Asterisk SMG/BRI Debugging
- A500 Driver Change Log
- A500 BRI Support
- Advanced BRI stack options
- A500 BRI Cable Pinouts
- A500 BRI as Timing source for Asterisk
Wanpipe drivers for BRI
Latest Wanpipe drivers supporting AFT-A500: Latest 3.3.X Release --> ChangeLog
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.

Asterisk Installation
- Confirm that your system has the required packages.
- Download and install latest asterisk 1.2 or asterisk 1.4 release from www.asterisk.org
Copy asterisk release into /usr/src/ directory
#> cp <asterisk package name> /usr/src
Untar asterisk release:
#> tar xvfz <asterisk release name>
- Asterisk pre-installation Check
If you already have an old asterisk installation make sure to remove old asterisk modules.
#> cd /usr/lib/asterisk
#> rm -rf modules
- Asterisk installation
Create a symbolic link in /usr/src/asterisk that points to your Asterisk source.
(asterisk-1.2.24 is used as an example)
#> cd /usr/src
#> ln -s asterisk-1.2.24 asterisk
Change directory to newly untarred asterisk directory:
#> cd asterisk
#> make clean
#> make
#> make install
If this is very fist time you are installing asterisk also run:
#> make samples
Sangoma Wanpipe Installation
- Download Latest Sangoma BRI Release:
--> Latest 3.3.X Release ( <- Click to Download)
--> ChangeLog
- Copy and Untar the wanpipe package into /usr/src directory:
#> cp <wanpipe package tgz file> /usr/src
#> cd /usr/src
#> tar xvfz <wanpipe package tgz file>
- Change directory into newly created wanpipe source directory:
#> cd wanpipe-<version>
- Start Wanpipe installation:
#> cd wanpipe-<version>
#> ./Setup install
Select option #6 SMG (BRI)
For the rest of the options please choose Default values.
Proceed with installation Select "Y" for each option.
- At this point Wanpipe drivers have been installed properly:
#> wanrouter hwprobe
You should see list of A500 ports installed on your machine
#> wanrouter hwprobe verbose
You should see list as above along with detailed port info like TE/NT mode
Sangoma SMG/BRI Installation
Note: SMG/BRI is installed automatically if option 6 is selected on Wanpipe-3.3.0.2 drivers or later. Skip this step if you selected option 6 or 7 for the compilation options when running ./Setup install .
- At this point we are still in wanpipe source directory created by untarring the wanpipe package.
We will run the same ./Setup script from above to install the SMG and BRI Stack.
#> ./Setup smgbri
This step will proceed to build the SMG daemon and install the SMG and the BRI stack.
The installation script will check for properly setup environment:
- Check for Asterisk directory in /usr/src/asterisk
This was done in the above "Asterisk installation" step so it should be there.
- Check for SCTP utilities and modules
All latest distros have support for SCTP (secure udp protocol).
If SCTP is not found, install script will attempt to install them for you.
If the SMG/BRI installation step fails please contact Sangoma Support!
Sangoma SMG/BRI Configuration/Operation
After successful SMG/BRI installation the ./Setup script will prompt you to proceed with wanpipe/smg/bri configuration.
-
Run the Wanpipe configuration script:
#> /usr/sbin/wancfg_smg
The wancfg_smg 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:
1. 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 start
Usage: smg_ctrl [start|stop|restart]
3. asterisk
Start asterisk:
#> asterisk
Connect 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,Hangup
|
- 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. These log files can be instrumental in finding out what the problem is with your overall setup. If we think about the OSI networking model, every time we debug a networking system we should start from bottom up.
- Confirm that wanpipe drivers have been started and that all BRI protocol layers are up
#> wanrouter status
Confirm that all ports are in connected state.
#> 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]
- 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
A500 BRI Support
For initial support and questions contact Sangoma Techdesk:
http://wiki.sangoma.com/SangomaTechSupport
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
|