First off – not all X100P clone cards are equal. If your card is NOT based in the Silicon Labs Si3014/Si3034 DAA, stop reading now, you’re wasting your time. I have an X100P SE from X100P.com, which is based on the required DAA, so I know mine can be set for complex impedance.
Right, a bit of background. I built my Asterisk server on an old VIA C3 EPIA board (Actually, a Wyse 9450 Winterminal) using Astlinux, as it’s one of the only Asterisk appliance distros that supports the Via C3 platform. I added an X100P card in order to receive incoming calls over copper, and to route outgoing local calls. I live in New Zealand, where our phone system requires complex AC termination impedance, so the standard modes offered by the DAHDI wcfxo kernel module, namely FCC and CTR21 were not optimal, as both modes only implement an AC termination impedance of 600Ω. It took a long time juggling tx and rx gains, and much playing with the echo canceller, before I got things acceptable. It’s not fun.
I knew that my card could support complex impedance from some documentation found on the suppliers website (novavox-x100p-se-global-line-standards), however, the patchfile that the documentation links to is long gone. Fortunately, the TBR21 patch for the wcfxo kernel module is well documented on the Digium website, and thus I was able to figure out what to do. As it turns out, it’s a really simple patch for the DAHDI wcfxo.c source file, as follows:
====================================== --- dahdi-linux-2.6.1/drivers/dahdi/wcfxo.c.orig 2012-10-13 09:35:10.000000000 -0500 +++ dahdi-linux-2.6.1/drivers/dahdi/wcfxo.c 2012-10-13 09:35:18.000000000 -0500 @@ -239,6 +239,13 @@ { "CTR21", 0, 0, 3, 0, 0, 3, 0 }, /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, and UK */ + { "TBR21", 0, 1, 3, 0, 0, 3, 0 }, /* CTR21 with complex impedance */ + { "JATE", 0, 0, 1, 0, 0, 0, 0 }, /* Brazil, China, Egypt, Japan, Jordan, Kazakhstan, Malaysia, + Oman, Pakistan, Philipines, Russia, Syria, Taiwan, Thailand */ + { "AUST", 1, 1, 1, 0, 0, 0, 0 }, /* Australia */ + { "NZWL", 0, 1, 2, 0, 0, 0, 0 }, /* New Zealand */ + { "PLSV", 0, 0, 2, 1, 1, 0, 0 }, /* Poland, Slovenia */ + { "SAFR", 1, 0, 2, 1, 0, 0, 0 }, /* South Africa */ }; static inline void wcfxo_transmitprep(struct wcfxo *wc, unsigned char ints) ======================================
This gives six extra operating modes to the module. The required operating mode is passed to the module when loaded, like so:
# modprobe wcfxo opermode=x
where x is an integer that maps to the opermode as follows:
0 – FCC Mode
1 – CTR Mode
2 – TBR21 Mode
3 – JATE Mode
4 – AUST Mode
5 – NZWL Mode
6 – PLSV Mode
7 – SAFR Mode
You can see which mode is appropriate for which country from the comments contained in the patch. In Astlinux, the opermode for NZWL (New Zealand) is set in /etc/modprobe.d/options.conf as follows:
options wcfxo opermode=5
Now, having to crosscompile Astlinux for a Via C3 on a RedHat VM on my OS X box was going to be a pain. Luckily, Lonnie Abelbeck from the Astlinux project showed some interest in this patch, and very kindly compiled it for me. Hopefully if all goes well (As it has so far), this patch will become permanent in future Astlinux builds.
And lastly, a shameless plug, but from the point of view of a very satisfied user, and nothing more:
If you’re looking for an easy to use Asterisk appliance distro, which supports some of the more oddball hardware out there, look no further than Astlinux