OpenWrt Forum Archive

Topic: Asterisk 1.4 on OpenWRT Guide.

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Thank you!!! Thats all I wanted from Santa this year! I have a very similar setup ASUS WL-500W w/ an SPA3102 !! I will post my results after the holidays!

Thanks again!!!

Failed to install:

root@OpenWrt:/# ipkg install -d usb1 asterisk14
Installing asterisk14 (1.4.9-1) to usb1...
Downloading http://members.home.nl/hans.zandbelt/op … mipsel.ipk
Installing libncurses (5.2-9) to usb1...
Downloading http://download2.berlios.de/pub/xwrt/pa … mipsel.ipk
ipkg: Cannot create symlink from ./usr/lib/libpanel.so.5 to 'libpanel.so.5.2': Operation not permitted
ipkg: Cannot create symlink from ./usr/lib/libmenu.so.5 to 'libmenu.so.5.2': Operation not permitted
ipkg: Cannot create symlink from ./usr/lib/libncurses.so.5 to 'libncurses.so.5.2': Operation not permitted
ipkg: Cannot create symlink from ./usr/lib/libform.so.5 to 'libform.so.5.2': Operation not permitted
ipkg: Cannot create symlink from ./usr/sbin/rasterisk to 'asterisk': Operation not permitted
Configuring asterisk14
Configuring libncurses
Successfully terminated.

Basically it seems a "trailing slash" is creating the problem:

root@OpenWrt:/mnt/usb1/etc/init.d# /mnt/usb1/etc/init.d/asterisk start
ln: /mnt/usb1//usr/lib/asterisk/astdb: Operation not permitted
/mnt/usb1//usr/sbin/asterisk: can't load library 'libncurses.so.5'

What can I do to get arount this problem?

I don't see why installing asterisk14 spawns libncurses installation using xwrt's repo, but you could try to remove x-wrt repository from ipkg before installing asterisk, that might help you.
Otherwise, I don't think it's a trailing slash problem as it has absolutely no effect if you use multiple slash to refer to a path. (try cd ////etc///// it won't matter).

The problem seems to arise because of the acces rights on /mnt/usb1/.
You can try removing x-wrt's repo from ipkg config, then install Asterisk using hans.zandbelt's repo, then check the acces rights of the directory which caused you problems, and before even adding x-wrt's repo to ipkg try starting asterisk.
Then, if it works and the acces rights seems Ok to you, you can add x-wrt's repo to install webif^2.

Also please check that you've correctly followed step 5 "5. Modifying Your Environment" on http://wiki.openwrt.org/PackagesOnExternalMediaHowTo

And finally if nothing works, you've got the names of the symlinks ipkg tried to create, you can try for yourself using ln -s (try finding a manual page of ln online) and see what the problem might be.

Good luck.

Thank you for your comprehensive answer. Anyway, I tried  few times more - thereafter I decided to try to go for Kamikaze instead. Just now I have actually installed Asterisk without problems so far.

Ok great, I might update the wiki to migrate to Kamikaze when I have the time (or when whiterussian's asterisks packages way outdated).
You can still follow asterisk's configuration steps from the wiki, as they aren't linked to your OpenWRT distro, let me know if you have any trouble or if you find any inconsistencies in the wiki.

Seems like I´m able to start * properly now on Kamikaze - but for some reason the asterisk -r command does not work for me, so I´m not able to use CLI (necesary to verify the status). Tried to start with full path too, but that also fails. BTW - I installed on a usb-stick (dest = /mnt/usb)...

Sorry for the lack of info...

Here is the answer when issuing the asterisk -r command:

"Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)"

The asterisk.ctl does exist, but in another path: /mnt/usb/var/run/....

Found a way - one has to use the full path, including -C to start:

/mnt/usb/usr/sbin/asterisk -C /mnt/usb/etc/asterisk/asterisk.conf -r

Some of my problems (regarding the config path) were solved by creating a symbolic link in /etc/ to /mnt/usb/etc/asterisk/, I didn't mention it in the wiki as I thought that it could be fixed in another way and that it was a glitch following my tests.
I also think that the startup script of asterisk created in /mnt/sd/etc/init.d/ has a problem with the OPTIONS variable, which overrides the one loaded by sourcing DEFAULT (see /mnt/sd/etc/default/asterisk), to fix that I've had to comment out the line OPTIONS="" in the startup script which was overriding the one in default, this will help asterisk find your -C ...
But there's more than one way to do it, it sure is nice that you did find some workaround.

Now I have to find out why astdb is always reset when the router shuts down. Maybe /var/spool isn't a good place to keep it.

(Last edited by ouaibe on 29 Jan 2008, 01:51)

How i can make a script to start asterisk automaticaly after every reboot?
I tryed mak a script in /etc/init.d/ but it is not enough.

My problem is solved.
http://www.ip-phone-forum.de/showthread.php?p=1036614

It is only, because i have installed Asterisk on a usb-device, but when asterisk in a bootstartscript, it try to load a file, where is (should be) on jffs. But the file is on usb, and not on jffs.

The repository of Asterisk-1.4 is no longer exist at:
http://members.home.nl/hans.zandbelt/op … terisk-1.4

Anyone knows how to get those packages ?

P.S. the Asterisk package for Kamikaze still exists, but unfortunately, my router is oversea
so I can't upgrade it in months.

@PsychoMantis: There's already a startup script for asterisk, you can just modify the automatic startup script installed with webif^2 (S95-custom... something) or go through the webif^2 to modify the startup. I believe I talked about it in the wiki at the end of section 10. Otherwise there's some documentation in OpenWRT's wiki about automatic startup (depending on your type of install it's different (whiterussian or kamikaze)).

@boobee: I know, hans zandbelt has removed it, and apparently (According to someone that asked him through mail to have a copy of the repo) he's not really willing to give someone a backup as he considers whiterussian "obsolete".
I would have gladly hosted one copy, or just dumped it on fileshack as I find this a bit extreme but well...
Anyhow, you can install Kamikaze instead (kernel 2.4) since it's got a webif^2 that is nearly finished (that was my main concern to stay with whiterussian), and the rest of the installation is pretty much the same, just change the path to asterisk14's repo so that it points to kamikaze on hans's website.
Plus you'll get all the updates from asterisk. I haven't had the time to update the wiki, but it's a wiki and since I'm busy doing some other stuff, I hoped people would take the lead at one point in time.
Anyways, good luck.

$ /etc/init.d/asterisk enable
for asterisk 1.4 on Kamikaze 8.09.2

The discussion might have continued from here.