Sangoma has a poor and out of date documentation. Their last card with echo cancellation lack some info.
Some usefull info :
- First it looks like you don't need the hdlc support to compile the driver.
- You NEED to create this device for echo cancellation : mknod /dev/wp1ec c 242 1 ( if you use udev it should be done magically ! )
- It is possible to have a digium ( tdm400 for example ) and a sangoma card ( tested with a A200 with echo and a digium card )
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 to test 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.
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...