Sangoma A200 Configuration

VoIP Hardware Solutions
Provider Solution Details
VoIP Hardware Zycoo UC Solutions
  • Modular Design IP PBX for SMB
  • Remote office Centralized Management solution
  • 3rd party app integration, Enterprise Billing, Android & iOS client
Details
Sangoma has a poor and out of date documentation. Their last card with echo cancellation lacks some info.

2006/07/23 : !!! UPDATE !!! With my configuration, beta4 is working perfectly and I have no sound with beta5...

2006/07/23 : new wanpipe driver is out : wanpipe-beta5 . Unfortunalty, according to the changelog, beside the support for the latest kernels 2.6.16 and 2.6.17, nothing for the A200.

2006/07/17 : the wanpipe-beta5-pre5-2.3.4.tgz driver has disappeared from the support FTP. our asterisk+linux dies periodically and does weird stuff for which we have to reboot and/or remove PIDs each time. I guess we just have to wait for a new version. — Vincent-Olivier Arsenault


2006/06/23 : had sound problems (i.e. no sound) , echocancellatoin module could not be loaded, /var/log/messages said:
ERROR: Failed to bind EC daemon socket (err=98,Address already in use)
stop wanrouter, cd to /var/run and delete wan_ec.pid and wan_ec_socket. and start wanrouter (thx to David Yat Sin, from Sangoma)

2006/06/13 : there are known problems with kernel 2.6.16 and wanpipe-beta4-2.3.4, use at least wanpipe-beta5-pre5-2.3.4.tgz

03 June : Sangoma has agreed they have problem with fax. They need to change the firmware, no ETA. Nice it has taken them 2 weeks to tell me the truth... I think I'm going to go back to Digium after all...

02 June : Faxing seems finicky. In my tests it seems faxes will fail 100% if echo cancellation is turned off either with echocancel=no or echocancelwhenbridged=no. When echo cancellation is on faxes seem to work 50% of the time, with the fax machine showing "Comms Error".

29 May : Fax definitly not working on a Sangoma A200. They also have problem with fxs modules and now I have found an fxo module broken ( the change of the gain change nothing for one of the ports ! )

10 March 2006 : Sangoma has finally understood that a good product is not enough, a good documentation is also necessary. They
have obviously make an effort, what would be nice now is to explain if hdlc is of any help for the A200 card.

Some usefull info :

  • First it looks like you don't need the hdlc support to compile the driver.
  • | WRONG , see below | You NEED to create this device for echo cancellation : mknod /dev/wp1ec c 242 1 ( if you use udev it should be done magically ! )



  • UPDATE mknod needs to be done for ALL interfaces !!!
Use this script :

  1. !/bin/bash
a=1
while [ "$a" != "33" ]
do
mknod /dev/wp${a}ec c 242 $a
a=`expr $a + 1`
done

It creates the first 32 devices

  • Also the following one can be used for the same intention:

for a in `seq 1 33`; do mknod /dev/wp${a}ec c 242 $a; done



  • It is possible to have a digium ( tdm400 for example ) and a sangoma card ( tested with a A200 with echo and a digium card ) ( my opinion, and it is personnal, the sangoma is great and results are far better, despite some doc issue sometimes ).


Installing the drivers


I assume asterisk has been installed, and zapata modules also. The following has been tested with asterisk 1.2.4 and zapata 1.2.4

  • Download the lastest drivers ( for the card and the ec ), at this moment it is hwec-utils-beta4-2.3.4.tgz, wanpipe-beta4-2.3.4.tgz http://sangoma.editme.com/wanpipe-linux-drivers
  • UPDATE (2006/06/13) Caution: there are known problems with kernel 2.6.16 and wanpipe-beta4-2.3.4, use at least wanpipe-beta5-pre5-2.3.4.tgz
  • untar wanpipe-beta4-2.3.4.tgz
  • and then hwec-utils-beta4-2.3.4.tgz
  • cd wanpipe
  • ./Setup install --protocol=TDM
  • Answer the informations, you don't need hdlc on the A200 if my tests are correct. Beside I suspect it to break rx_fax and tx_fax. ( need more testing )
  • when finished create your /etc/zaptel.conf
  • run "wancfg zaptel"
  • run wancfg, "Edit existing Configuration File", choose your config file ( wanpipe1.conf normally ), __ "Interface Setup" ( you should see -> 1 Defined ) , Interface 1--> w1g1, and here you have to have :

| │Interface Name-----> w1g1 │ │
│ │Operation Mode-----> TDM_VOICE │ │
│ │TDM Voice Span-----------------> 1 │ │
│ │Override Asterisk Echo Enable -> No │ │
│ │TDM PRI HW-HDLC Timeslot-------> 0 Not Used │ │
│ │Hardware Echo Cancellation------> Yes

  • Enable the Echo Cancellation if needed.
  • after, back , back , exit, yes to save the conf file, exit, exit
  • run wanrouter start

and check if it works :
wan_ec_client wanpipe1 w1g1 stats x

x is the channel number, you should have something like this :

sip-gw:/usr/local/src# wan_ec_client wanpipe1 w1g1 stats 6


wanpipe1: Reading Echo Canceller statistics for channel 6... Done!
wanpipe1:6: Echo Channel Operation Mode : NORMAL
wanpipe1:6: Mute Ports : NONE
wanpipe1:6: Current Echo Return Loss : Invalid
wanpipe1:6: Current Echo Return Loss Enhancement : Invalid
wanpipe1:6: Maximum value of the ERL : Invalid
wanpipe1:6: Maximum value of the ERLE : Invalid
wanpipe1:6: Number of Echo Path changes : 114
wanpipe1:6: Current Echo Delay : Invalid
wanpipe1:6: Maximum Echo Delay : Invalid
wanpipe1:6: Tone Disabler Status : Enabled
wanpipe1:6: Voice activity is detected on SIN port : TRUE
wanpipe1:6: Echo canceller has detected and converged : FALSE
wanpipe1:6: Average power of signal level on RIN : -51
wanpipe1:6: Average power of signal level on SIN : -48
wanpipe1:6: Current gain applied to signal level on RIN : 0
wanpipe1:6: Current gain applied to signal level on SOUT : 0
wanpipe1:6: Average power of the comfort noise injected : -207



Numbers will change as soon as you are going to use them.

  • Update your /etc/asterisk/zapata.conf with the channels you are using and add before the channel lines :
echocancel=yes
echocancelwhenbridged=no

( the latest one is important if you have an fxs module and you plan to put a fax on it, faxes don't appreciate echo cancellation usually ... )

and restart your asterisk.

It has been tested on a debian sarge with a kernel 2.6.15

dmesg will dsiplay some info and you will find more in /var/log/messages, a tail -f /var/log/messages when a call is in progress will display if the ec is working or not.

You hear nothing when you call ? Look for the mknod command on this page...

HowTo have 2 cards, TDM400P and A200 with ec


Simple, install the digium, compile everything, check it works, and then install the drivers beta4 from sangoma. (no HDLC, only TDMV driver )

Once you have executed the Setup script, you still have to create the wanpipe1.conf file. Simple, wancfg zaptel, it reads the /etc/zaptel.conf file and produce the wanpipe conf file. Purists are going to say "yes but we have put no configuration related to the sangoma card and even if we do so how the wancfg program is going to sart config for the tdm400 and the one for the a200 ?". It will not,
but produce a generic file with the A200 that works whatever fxo or fxs modules you have. It tells to the driver to parse all the ports.
One last thing, run wancfg, "Edit existing Configuration File", choose your config file ( wanpipe1.conf normally ), "Interface Setup" ( you should see -> 1 Defined ) , Interface 1--> w1g1, and here you have to have :

| │Interface Name-----> w1g1 │ │
│ │Operation Mode-----> TDM_VOICE │ │
│ │TDM Voice Span-----------------> 1 │ │
│ │Override Asterisk Echo Enable -> No │ │
│ │TDM PRI HW-HDLC Timeslot-------> 0 Not Used │ │
│ │Hardware Echo Cancellation------> Yes

Enable the Echo Cancellation if needed.

after, back , back , exit, yes to save the conf file, exit, exit

wanrouter start

to find the channel numbers :

cat /proc/zaptel/1
cat /proc/zaptel/2

The order depends on which driver has been loaded first, so if you have done a modprobe wctdm first, the channels 1 to 4 are on the digium card. They are not consecutive ( sangoma a200 card is starting at 6 after a digium card ... ) so check. And be carreful in your boot scripts...


sip-gw:/usr/local/src# cat /proc/zaptel/1
Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"

1 WCTDM/0/0 FXSKS (In use)
2 WCTDM/0/1 FXSKS (In use)
3 WCTDM/0/2 FXOKS (In use)
4 WCTDM/0/3

sip-gw:/usr/local/src# cat /proc/zaptel/2
Span 2: WRTDM/0 "wrtdm Board 1"

6 WRTDM/0/0 FXSKS
7 WRTDM/0/1 FXSKS
8 WRTDM/0/2 FXSKS
9 WRTDM/0/3 FXSKS
10 WRTDM/0/4
11 WRTDM/0/5
12 WRTDM/0/6
13 WRTDM/0/7
14 WRTDM/0/8
15 WRTDM/0/9
16 WRTDM/0/10
17 WRTDM/0/11
18 WRTDM/0/12
19 WRTDM/0/13
20 WRTDM/0/14
21 WRTDM/0/15
22 WRTDM/0/16
23 WRTDM/0/17
24 WRTDM/0/18
25 WRTDM/0/19
26 WRTDM/0/20
27 WRTDM/0/21
28 WRTDM/0/22
29 WRTDM/0/23


And test if it works...

Since zaptel 1.2.5 when you do a modprobe wctdm, it looks like zaptel somehow sees the sangoma card
and try to load it ( because of /etc/zaptel.conf ? ). Anyway you will have that :

sip-gw:/usr/local/src/zaptel# modprobe wctdm
ZT_CHANCONFIG failed on channel 5: No such device or address (6)
FATAL: Error running install command for wctdm

From my point of view, it is safe.



Where to buy:-


Sangoma has a poor and out of date documentation. Their last card with echo cancellation lacks some info.

2006/07/23 : !!! UPDATE !!! With my configuration, beta4 is working perfectly and I have no sound with beta5...

2006/07/23 : new wanpipe driver is out : wanpipe-beta5 . Unfortunalty, according to the changelog, beside the support for the latest kernels 2.6.16 and 2.6.17, nothing for the A200.

2006/07/17 : the wanpipe-beta5-pre5-2.3.4.tgz driver has disappeared from the support FTP. our asterisk+linux dies periodically and does weird stuff for which we have to reboot and/or remove PIDs each time. I guess we just have to wait for a new version. — Vincent-Olivier Arsenault


2006/06/23 : had sound problems (i.e. no sound) , echocancellatoin module could not be loaded, /var/log/messages said:
ERROR: Failed to bind EC daemon socket (err=98,Address already in use)
stop wanrouter, cd to /var/run and delete wan_ec.pid and wan_ec_socket. and start wanrouter (thx to David Yat Sin, from Sangoma)

2006/06/13 : there are known problems with kernel 2.6.16 and wanpipe-beta4-2.3.4, use at least wanpipe-beta5-pre5-2.3.4.tgz

03 June : Sangoma has agreed they have problem with fax. They need to change the firmware, no ETA. Nice it has taken them 2 weeks to tell me the truth... I think I'm going to go back to Digium after all...

02 June : Faxing seems finicky. In my tests it seems faxes will fail 100% if echo cancellation is turned off either with echocancel=no or echocancelwhenbridged=no. When echo cancellation is on faxes seem to work 50% of the time, with the fax machine showing "Comms Error".

29 May : Fax definitly not working on a Sangoma A200. They also have problem with fxs modules and now I have found an fxo module broken ( the change of the gain change nothing for one of the ports ! )

10 March 2006 : Sangoma has finally understood that a good product is not enough, a good documentation is also necessary. They
have obviously make an effort, what would be nice now is to explain if hdlc is of any help for the A200 card.

Some usefull info :

  • First it looks like you don't need the hdlc support to compile the driver.
  • | WRONG , see below | You NEED to create this device for echo cancellation : mknod /dev/wp1ec c 242 1 ( if you use udev it should be done magically ! )



  • UPDATE mknod needs to be done for ALL interfaces !!!
Use this script :

  1. !/bin/bash
a=1
while [ "$a" != "33" ]
do
mknod /dev/wp${a}ec c 242 $a
a=`expr $a + 1`
done

It creates the first 32 devices

  • Also the following one can be used for the same intention:

for a in `seq 1 33`; do mknod /dev/wp${a}ec c 242 $a; done



  • It is possible to have a digium ( tdm400 for example ) and a sangoma card ( tested with a A200 with echo and a digium card ) ( my opinion, and it is personnal, the sangoma is great and results are far better, despite some doc issue sometimes ).


Installing the drivers


I assume asterisk has been installed, and zapata modules also. The following has been tested with asterisk 1.2.4 and zapata 1.2.4

  • Download the lastest drivers ( for the card and the ec ), at this moment it is hwec-utils-beta4-2.3.4.tgz, wanpipe-beta4-2.3.4.tgz http://sangoma.editme.com/wanpipe-linux-drivers
  • UPDATE (2006/06/13) Caution: there are known problems with kernel 2.6.16 and wanpipe-beta4-2.3.4, use at least wanpipe-beta5-pre5-2.3.4.tgz
  • untar wanpipe-beta4-2.3.4.tgz
  • and then hwec-utils-beta4-2.3.4.tgz
  • cd wanpipe
  • ./Setup install --protocol=TDM
  • Answer the informations, you don't need hdlc on the A200 if my tests are correct. Beside I suspect it to break rx_fax and tx_fax. ( need more testing )
  • when finished create your /etc/zaptel.conf
  • run "wancfg zaptel"
  • run wancfg, "Edit existing Configuration File", choose your config file ( wanpipe1.conf normally ), __ "Interface Setup" ( you should see -> 1 Defined ) , Interface 1--> w1g1, and here you have to have :

| │Interface Name-----> w1g1 │ │
│ │Operation Mode-----> TDM_VOICE │ │
│ │TDM Voice Span-----------------> 1 │ │
│ │Override Asterisk Echo Enable -> No │ │
│ │TDM PRI HW-HDLC Timeslot-------> 0 Not Used │ │
│ │Hardware Echo Cancellation------> Yes

  • Enable the Echo Cancellation if needed.
  • after, back , back , exit, yes to save the conf file, exit, exit
  • run wanrouter start

and check if it works :
wan_ec_client wanpipe1 w1g1 stats x

x is the channel number, you should have something like this :

sip-gw:/usr/local/src# wan_ec_client wanpipe1 w1g1 stats 6


wanpipe1: Reading Echo Canceller statistics for channel 6... Done!
wanpipe1:6: Echo Channel Operation Mode : NORMAL
wanpipe1:6: Mute Ports : NONE
wanpipe1:6: Current Echo Return Loss : Invalid
wanpipe1:6: Current Echo Return Loss Enhancement : Invalid
wanpipe1:6: Maximum value of the ERL : Invalid
wanpipe1:6: Maximum value of the ERLE : Invalid
wanpipe1:6: Number of Echo Path changes : 114
wanpipe1:6: Current Echo Delay : Invalid
wanpipe1:6: Maximum Echo Delay : Invalid
wanpipe1:6: Tone Disabler Status : Enabled
wanpipe1:6: Voice activity is detected on SIN port : TRUE
wanpipe1:6: Echo canceller has detected and converged : FALSE
wanpipe1:6: Average power of signal level on RIN : -51
wanpipe1:6: Average power of signal level on SIN : -48
wanpipe1:6: Current gain applied to signal level on RIN : 0
wanpipe1:6: Current gain applied to signal level on SOUT : 0
wanpipe1:6: Average power of the comfort noise injected : -207



Numbers will change as soon as you are going to use them.

  • Update your /etc/asterisk/zapata.conf with the channels you are using and add before the channel lines :
echocancel=yes
echocancelwhenbridged=no

( the latest one is important if you have an fxs module and you plan to put a fax on it, faxes don't appreciate echo cancellation usually ... )

and restart your asterisk.

It has been tested on a debian sarge with a kernel 2.6.15

dmesg will dsiplay some info and you will find more in /var/log/messages, a tail -f /var/log/messages when a call is in progress will display if the ec is working or not.

You hear nothing when you call ? Look for the mknod command on this page...

HowTo have 2 cards, TDM400P and A200 with ec


Simple, install the digium, compile everything, check it works, and then install the drivers beta4 from sangoma. (no HDLC, only TDMV driver )

Once you have executed the Setup script, you still have to create the wanpipe1.conf file. Simple, wancfg zaptel, it reads the /etc/zaptel.conf file and produce the wanpipe conf file. Purists are going to say "yes but we have put no configuration related to the sangoma card and even if we do so how the wancfg program is going to sart config for the tdm400 and the one for the a200 ?". It will not,
but produce a generic file with the A200 that works whatever fxo or fxs modules you have. It tells to the driver to parse all the ports.
One last thing, run wancfg, "Edit existing Configuration File", choose your config file ( wanpipe1.conf normally ), "Interface Setup" ( you should see -> 1 Defined ) , Interface 1--> w1g1, and here you have to have :

| │Interface Name-----> w1g1 │ │
│ │Operation Mode-----> TDM_VOICE │ │
│ │TDM Voice Span-----------------> 1 │ │
│ │Override Asterisk Echo Enable -> No │ │
│ │TDM PRI HW-HDLC Timeslot-------> 0 Not Used │ │
│ │Hardware Echo Cancellation------> Yes

Enable the Echo Cancellation if needed.

after, back , back , exit, yes to save the conf file, exit, exit

wanrouter start

to find the channel numbers :

cat /proc/zaptel/1
cat /proc/zaptel/2

The order depends on which driver has been loaded first, so if you have done a modprobe wctdm first, the channels 1 to 4 are on the digium card. They are not consecutive ( sangoma a200 card is starting at 6 after a digium card ... ) so check. And be carreful in your boot scripts...


sip-gw:/usr/local/src# cat /proc/zaptel/1
Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"

1 WCTDM/0/0 FXSKS (In use)
2 WCTDM/0/1 FXSKS (In use)
3 WCTDM/0/2 FXOKS (In use)
4 WCTDM/0/3

sip-gw:/usr/local/src# cat /proc/zaptel/2
Span 2: WRTDM/0 "wrtdm Board 1"

6 WRTDM/0/0 FXSKS
7 WRTDM/0/1 FXSKS
8 WRTDM/0/2 FXSKS
9 WRTDM/0/3 FXSKS
10 WRTDM/0/4
11 WRTDM/0/5
12 WRTDM/0/6
13 WRTDM/0/7
14 WRTDM/0/8
15 WRTDM/0/9
16 WRTDM/0/10
17 WRTDM/0/11
18 WRTDM/0/12
19 WRTDM/0/13
20 WRTDM/0/14
21 WRTDM/0/15
22 WRTDM/0/16
23 WRTDM/0/17
24 WRTDM/0/18
25 WRTDM/0/19
26 WRTDM/0/20
27 WRTDM/0/21
28 WRTDM/0/22
29 WRTDM/0/23


And test if it works...

Since zaptel 1.2.5 when you do a modprobe wctdm, it looks like zaptel somehow sees the sangoma card
and try to load it ( because of /etc/zaptel.conf ? ). Anyway you will have that :

sip-gw:/usr/local/src/zaptel# modprobe wctdm
ZT_CHANCONFIG failed on channel 5: No such device or address (6)
FATAL: Error running install command for wctdm

From my point of view, it is safe.



Where to buy:-


Created by: elesar, Last modification: Wed 30 of Oct, 2013 (16:04 UTC) by jhops
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+