Yet Another James Green Web Developer, Aquarist

15Apr/100

Asterisk on Ubuntu 9.10 Karmic

Been doing some with with Asterisk on internal test machines lately. Decided to upgrade to 9.10 and get Asterisk installed from packages rather than from sources.

Did the Ubuntu upgrade without a hitch (that I know of), but then lazily typed apt-get install asterisk.

Some moments later:

Setting up dahdi (1:2.2.0-1ubuntu1) ...
Loading DAHDI hardware modules:
WARNING: All config files need .conf: /etc/modprobe.d/dahdi, it will be ignored in a future release.
WARNING: All config files need .conf: /etc/modprobe.d/dahdi.blacklist, it will be ignored in a future release.
FATAL: Module dahdi not found.
dahdi: error   dahdi_dummy: error   dahdi_transcode: error
Error: missing /dev/dahdi!
invoke-rc.d: initscript dahdi, action "start" failed.
dpkg: error processing dahdi (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
dahdi
E: Sub-process /usr/bin/dpkg returned an error code (1)

Thankfully Googling around I spotted someone else with the same trouble and helpfully he's provided the fix. Pity Ubuntu didn't seem to.

If you're faced with the above error(s):
sudo apt-get remove asterisk dahdi dahdi-dkms dahdi-linux then run

Then:

sudo module-assistant -t update

sudo module-assistant -t prepare

Hopefully you'll end up with:

Setting up dahdi (1:2.2.0-1ubuntu1) ...
Loading DAHDI hardware modules:
WARNING: All config files need .conf: /etc/modprobe.d/dahdi, it will be ignored in a future release.
WARNING: All config files need .conf: /etc/modprobe.d/dahdi.blacklist, it will be ignored in a future release.
dahdi: done   dahdi_dummy: done   dahdi_transcode: done
Running dahdi_cfg: done.

Look now:

jamesg@gogol:~$ lsmod | grep dahdi
dahdi_transcode         8392  0
dahdi_dummy             4112  0
dahdi                 213264  2 dahdi_transcode,dahdi_dummy
crc_ccitt               2336  1 dahdi

Now apt-get install asterisk and you should be able to:

jamesg@gogol:~$ ps ax | grep aster
9276 ?        Ssl    0:00 /usr/sbin/asterisk -p -U asterisk
9277 ?        S      0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet
9319 pts/0    S+     0:00 grep aster

Of course, natural reactions to this may vary from "OMG I have a virus" to "OMG Asterist has twitter!!"

Update: I've just upgraded another machine to 9.10 from 9.04. After do-release-upgrade I ran the two module-assistant commands above, then proceeded to install asterisk. Result?

Setting up dkms (2.1.0.1-0ubuntu1) ...
* Running DKMS auto installation service for kernel 2.6.31-20-server                [ OK ]

Setting up dahdi-dkms (1:2.2.0.2~dfsg-1ubuntu2) ...
Loading new dahdi-2.2.0.2 DKMS files...
First Installation: checking all kernels...
Building for architecture x86_64
Building initial module for 2.6.31-20-server

It continues with strange errors but does not bail out, exactly as per the previous machine. Anyway, sorted.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.