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-src http://nl.archive.ubuntu.com/ubuntu/ edgy main restricted universe
deb http://nl.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe
deb-src http://nl.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe
deb http://security.ubuntu.com/ubuntu edgy-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu edgy-security main restricted universe
You can remove the first lines that hold the CDROM entries.
Now run the initial update & 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:
5. Install all the required packages:
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:
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:
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:
in:
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:
- build and install zaptel & qozap module
- put two modules in /etc/modules:
qozap
The /usr/sbin/safe_asterisk script appears to be fixed in 8.04, so no errors anymore from that.
(7963 hits since Thu 25 of Jan, 2007 (09:43 UTC))