User Tools

Site Tools


telephony:asterisk_md3200_x100p_dahdi

**This is an old revision of the document!**

Asterisk: DAHDI with X100P Clone (Ambient MD3200)

Preamble

I've recently came across a very cheap internal dial-up modem on Mercado Livre. It cost me the equivalent of about five American Dollars. Upon further research (before buying it, obviously), I've found little to no information on the Ambient MD3200 chipset, but I found out it could be used as a X100P/X101P card on Asterisk, thus providing my server with an FXO port.

Albeit POTS is on it's sunset as an ubiquitous technology, this was cheap enough to convince me to play a bit with that technology, since I still got a log of POTS or POTS-compatible gear around. But information on DAHDI configuration is a bit harder to come by, those days. It can be found, fragmented through dozens of forum posts, but there's no tutorial explaining the whole process.

Initially, I've decided to use Freewitch, but mod_freetdm, albeit still somewhat maintained, lives outside of the source tree and the documentation is not exactly good. I wasn't able to compile and get it running on Freeswitch. So I decided on Asterisk.

Asterisk has excellent support on DAHDI. Zapata Telephony Project, or Zaptel, was written by Jim Dixon a long time ago, incubated by the Asterisk community. Now, Sangoma keeps maintaining it, even though both digital and analogue trunk lines are becoming nearly extinct animals, with the onset of SIP technology, now prevalent.

Setup Overview

My first idea was to do a PCI passthrough of that card to a virtual machine. That would provide optimal isolation and keep both the kernel module and Asterisk fairly isolated from the host. Unfortunately, this dumb board was sharing it's IRQ with SMBus. Some PCI hardware can deal with this, this card couldn't. So I decided on installing the DAHDI modules directly onto the host. Not ideal, but it is what it is.

Then I decided to run Asterisk inside a LXC container, passing through the device descriptors to the container. Despite that, we do not need to make it privileged.

The Actual Process

First, clone the project repository somewhere.

snippet.bash
git clone https://github.com/asterisk/dahdi-linux

Or, if you're not crazy, get latest release tarball here.

On Proxmox, once you have build-essentials and standard compilation tools, installing it should be as easy as doing this:

snippet.bash
apt install pve-headers # kernel headers
make
make install

This will install the modules. But you'll still have to make sure wcfxo gets the card, not netjet. By default, the card binds to it, and the easiest way of getting rid of it is restarting the machine. Just make sure you got a file inside /etc/modprobe.d/ containing the following:

blacklist netjet

Once rebooted, the card should be bound to wcfxo. Something you can confirm with lspci -nnk command:

$ lspci -nnk
[...]
04:00.0 Communication controller [0780]: Tiger Jet Network Inc. / ICP DAS Tiger3XX Modem/ISDN interface [e159:0001]
        Subsystem: Intel Corporation Digium X100P/X101P analogue PSTN FXO interface [8086:0003]
        Kernel driver in use: wcfxo
        Kernel modules: netjet, wcfxo
[...]

Why is it detected as an ISDN card? No idea. Probably because some ISDN cards do use the same chip. But this driver does nothing to us. The card isn't ISDN and this driver doesn't even allow us to use this card as a dial-up modem.

Installing Asterisk

telephony/asterisk_md3200_x100p_dahdi.1745936559.txt.gz · Last modified: 2025/04/29 11:22 by prppedro