Asterisk BRI-stuffed Ubuntu Edgy Junghanns

Installing Asterisk on Ubuntu Edgy for use with Junghanns ISDN cards

This page is a step-by-step description on how to get an Ubuntu Edgy system running with the BRI-stuffed version of Asterisk, for use with the Junghanns BRI cards. This hardware can be used to interface with ISDN, which is common in Western Europe.
The intention is to use as much as possible already in-place procedures and frameworks, and do very few custom things.
The most important part is using the Ubuntu packages, so that they are covered by the apt package manager.

1. Remove ISDN card before installation

Before you install the operating system, remove the ISDN card from your system. If you keep it in, your OS will hang after installation. See item 4 for the reason why.

2. Install the Operating System

Download Ubuntu 6.10 - Edgy Eft (pick the server version) and install. Try to avoid unnecessary bloating of your system, so at the Ubuntu software selection-step, be sure to not select any of the options when asked (so no DNS server and no LAMP server). When finished, reboot.

3. Install and upgrade needed packages and software

Change /etc/apt/sources.list to be able to install the required packages. Asterisk-bristuff and friends sit in Ubuntu's universe, so at least add that to the lines. Make sure it is in the archive, updates, and security lines:
deb edgy main restricted universe
deb-src edgy main restricted universe
deb edgy-updates main restricted universe
deb-src edgy-updates main restricted universe
deb edgy-security main restricted universe
deb-src edgy-security main restricted universe

You can remove the first lines that hold the CDROM entries.
Now run the initial update & upgrade:
apt-get update && apt-get upgrade

4. Blacklist HFC 4S/8S driver

The card I used is a Junghanns QuadBRI ISDN card, which uses a Cologne HFC4S chipset. If you install a default OS with the card, the kernel tries to load the wrong module (hfc4s8s_l1) and then crashes (confirmed on two different machines). The solution is to blacklist that module, since we are going to use another one anyway. To do this, add the following line to /etc/modprobe.d/blacklist, and reboot:
blacklist hfc4s8s_l1

5. Install all the required packages:

apt-get install linux-headers-`uname -r` asterisk-bristuff build-essential zaptel zaptel-source

6. Compile and install the modules for the card

Ubuntu has a very handy tool to compile the drivers: modules-assistant. If everything in the previous step went OK, it should just be a matter of issuing:
m-a build zaptel

This will yield a nice deb installer in /usr/src, with a very long name. Install that using dpkg, rebuild the module dependencies, and load the driver:
dpkg -i /usr/src/zaptel-modules-2.6.17-10-server_1.2.8.dfsg-1+
depmod -a
modprobe qozap

If everything went well, you should see something like this in dmesg:

[42950909.550000] Zapata Telephony Interface Registered on major 196
[42950909.550000] Zaptel Version: 1.2.8 Echo Canceller: KB1
[42950909.560000] ACPI: PCI Interrupt 0000:04:06.0[A] -> GSI 29 (level, low) -> IRQ 201
[42950909.560000] qozap: Junghanns.NET quadBRI card configured at io port 0xccf8 IRQ 201 HZ 100 CardID 0
[42950909.560000] qozap: S/T ports: 4 [ TE TE TE TE ]
[42950909.560000] qozap: 1 multiBRI card(s) in this box, 4 BRI ports total, bloop 0, pcmslave 0.

The hardware is now correctly installed, so you can set RUNASTERISK=yes in /etc/default/asterisk and do the actual asterisk application configuration.

update (2007-05-25)

It seems that the default asterisk package comes with a script /usr/sbin/safe_asterisk that gives the following error when trying to start:

/usr/sbin/safe_asterisk: 93: Syntax error: Bad fd number

To fix this change the following line:

${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} > /dev/${TTY} < /dev/${TTY}


${ASTSBINDIR}/asterisk ${CLIARGS} ${ASTARGS} >& /dev/${TTY} < /dev/${TTY}

Update for Ubuntu 8.0.4 (Hardy)

I recently reinstalled my Edgy system with the new LTS version of Ubuntu (8.04 or Hardy), and it seems the installation is simpler in several ways. It basically comes down to:

  • Install plain OS and dist-upgrade - no need to remove ISDN card anymore
  • Blacklist hfc4s8s_l1 driver
  • Install packages. Bristuff is now part of asterisk-1.4, so no need for separate package:
apt-get install linux-headers-`uname -r` asterisk build-essential zaptel zaptel-source

  • build and install zaptel & qozap module
  • put two modules in /etc/modules:

The /usr/sbin/safe_asterisk script appears to be fixed in 8.04, so no errors anymore from that.

(33426 hits since Thu 25 of Jan, 2007 (09:43 UTC))
Created by: usr_local_dick, Last modification: Thu 17 of May, 2012 (08:13 UTC) by admin
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+