OpenWrt Forum Archive

Topic: Asterisk 1.2.14 and 1.4.0-beta4

The content of this topic has been archived between 5 Apr 2018 and 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I put packages for Asterisk 1.2.14 and 1.4.0-beta4 for White Russian (RC5&RC6) up at:

  http://zandbelt.dyndns.org/asterisk.html

If these work for you I'll try to get the packages up to the openwrt repositories and the patches into the source tree.

Regards,

Hans.

PS: these work with the dummy zaptel (1.2.12 update) timer for IAX2 and app_meetme as described on the webpage and elsewhere in this forum

Hello Zanbelt, I have downloaded your packages and i am not sure how to get them installed, even if I should install them.

I am running asterisk 1.2.1  (running fine on a WRT54GS but I have to yet connect a PAP2 to asterisk

Downloaded
# asterisk_1.4.0-beta4-1_mipsel.ipk
# asterisk-sounds_1.4.0-beta4-1_mipsel.ipk
# asterisk-voicemail_1.4.0-beta4-1_mipsel.ipk

will the 1.2.*.*_mipsel.ipk packages work with the above, is there better functionality with the 1.4.* packages

I am currently playing a bit around with your 1.4b4 build on my asus wl-500g premium, making it work with a Linksys PAP2T. Will post results here once I get some ;-)

(So far I can connect to my sip provider with the asterisk, and also connect the PAP2T to the asterisk server. Calls dont work though, but I think I know the problem. Will look at it later).

I managed to get my sip phones on the pap2 to work and I used the generic voice mail 1234, i just stumbled on to the right  settings to get everything working tho. smbmount seems to be a problem with openwrt, it isn't found and I don't know which package would contain it, I have openwrt samba clien/server working but no smbmount. I might try the sd card mod to get more file space for voice mail and other files, and to unload the flash writes

just re read the thread and I have to add I am still running the 1.2 asterisk package

HI Zandbelt,

I tried the 1.4.3 beta. Got an error when tring to run "asterisk", it says " can't load library libstdc++.so.6:

do you know whwy? Does this happen in 1.4.4 as well?

Will the new GUI framwork work with Webif2 from x-wrt? How to use it?

thanks
peng

Can you list of steps for me to learn how to compile from source of Asterisk to ipkg package for openwrt? Trying to learn first and see how i can work out to help with you and others.

tks
peng

peng wrote:

I tried the 1.4.3 beta. Got an error when tring to run "asterisk", it says " can't load library libstdc++.so.6:

do you know whwy? Does this happen in 1.4.4 as well?

I bet; you'd need libstdc++.so.6 for that...
I don't remember where I got it; if needed I can provide a standalone .so file (ie. I don't have the ipkg at hand, if I have ever had it at all...)
Maybe one of the other people that run these packages would know?

peng wrote:

Will the new GUI framwork work with Webif2 from x-wrt? How to use it?

I don't think so; they are pretty much independent of eachother; unless x-wrt has been working on integrating this.
You can avoid any port conflicts by configuring the port of the internal webserver in the asterisk config.

peng wrote:

Can you list of steps for me to learn how to compile from source of Asterisk to ipkg package for openwrt? Trying to learn first and see how i can work out to help with you and others.

I provided a source patch & short build instructions for Asterisk 1.2.13 on:

  http://zandbelt.dyndns.org

Regards,

Hans.

HI zandbelt,

Thanks a lot for your guidance and help on this topic.

As per Asterisk's document, it doesn't seem to mention the lib file we encountered. Is it a required by Asterisk? if so, by which part?

the followings is from asterisk.org.
Install the following in order to build Asterisk and/or Zaptel:

    * ncurses, and associated -devel
    * openssl, and associated -devel
    * zlib, and associated -devel
    * bison, and associated -devel (1.0.X only)

Why don't we have this problem with other Asterisk ipk, like that 1.2 ver in backport and 1.0 in whiterussian?

Can you drop that on your web and let us know how we use it? should we put into ImageBuilder's package directory to build it, or just add it to asterisk's directory in openwrt box? Is it compiled for MIPS or it a generic file?

I guess that you're a fast tracker with Asterisk. I am trying to folllow its development as well. it's good to have opportunity to learn from you.

Thanks
Peng

zandbelt wrote:
peng wrote:

I tried the 1.4.3 beta. Got an error when tring to run "asterisk", it says " can't load library libstdc++.so.6:

do you know whwy? Does this happen in 1.4.4 as well?

I bet; you'd need libstdc++.so.6 for that...
I don't remember where I got it; if needed I can provide a standalone .so file (ie. I don't have the ipkg at hand, if I have ever had it at all...)
Maybe one of the other people that run these packages would know?

I don't think I needed this for the 1.2.13 package. Here's what the box has (an Asus WL-500g Deluxe):

root@OpenWrt:~# ipkg status | grep Package:
Package: kernel
Package: base-files
Package: base-files-brcm
Package: bridge
Package: busybox
Package: dnsmasq
Package: dropbear
Package: ipkg-sh
Package: iptables
Package: iwlib
Package: kmod-brcm-wl
Package: kmod-diag
Package: kmod-switch
Package: kmod-wlcompat
Package: mtd
Package: nvram
Package: uclibc
Package: wificonf
Package: asterisk-mini  # 1.2.13-1
Package: kmod-usb-core  # 2.4.30-brcm-4
Package: libpthread  # 0.9.27-1
Package: libncurses  # 5.2-7
Package: libopenssl  # 0.9.8d-1
Package: ntpclient
root@OpenWrt:~# ls /lib
ld-uClibc-0.9.27.so   libm-0.9.27.so        libresolv.so.0
ld-uClibc.so.0        libm.so.0             librt-0.9.27.so
libc.so.0             libnsl-0.9.27.so      librt.so.0
libcrypt-0.9.27.so    libnsl.so.0           libuClibc-0.9.27.so
libcrypt.so.0         libpthread-0.9.27.so  libutil-0.9.27.so
libdl-0.9.27.so       libpthread.so.0       libutil.so.0
libdl.so.0            libresolv-0.9.27.so   modules
root@OpenWrt:~# ls /usr/lib
asterisk            libiw.so.28         libpanel.so.5
common.awk          libmenu.so.5        libpanel.so.5.2
firewall.awk        libmenu.so.5.2      libshared.so
ipkg                libncurses.so.5     libssl.so.0.9.8
iptables            libncurses.so.5.2   parse-config.awk
libcrypto.so.0.9.8  libnvram.so
root@OpenWrt:~# ldd /usr/sbin/asterisk
        libdl.so.0 => /lib/libdl.so.0 (0x2aaee000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x2ab30000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x2ab84000)
        libm.so.0 => /lib/libm.so.0 (0x2ac07000)
        libresolv.so.0 => /lib/libresolv.so.0 (0x2ac4e000)
        libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0x2ac8f000)
        libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0x2ad04000)
        libc.so.0 => /lib/libc.so.0 (0x2ae49000)
        ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x2aaa8000)
root@OpenWrt:~# uname -a
Linux OpenWrt 2.4.30 #1 Mon Nov 6 17:35:21 PST 2006 mips unknown
root@OpenWrt:~#

Maybe it's one of the modules? But ldd appears to be broken for .so files :-(

root@OpenWrt:~# for i in /usr/lib/asterisk/modules/*; do ldd $i; done
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault
Segmentation fault

Hi,

I looked into the libstdc++ dependency and apparently this is because the Asterisk 1.4.0 executable is linked by default with g++ instead of gcc; my guess is that this is because of the h323 module that could be linked in that way. Since the h323 module is not in the OpenWRT packages (yet) I decided to patch the source for linking with gcc and I released an update of the 1.4.0-beta4 packages (the package release number is 2 now). You can get the new packages from the original link.

So the dependency on libstdc++ no longer exists.

You can try this one and let me know if it works for you.

Regards,

Hans.

HI Hans,

It would be highly appreciated that you can spend some time in writing a dummy guide for a dummy like me about,

1. how to get Asterisk.org 's source file into my Ubuntu box.
2. how to set up in the Ubuntu box to start compile those sources into IPKG that can be used for MIPS on openWRT box. Which is the result you posted.
3. how to untar the tar file you provide in the OpenWRT box and get it installed in the box.
I got the optimized things packed up again as a .tar.bz2 file and loaded to the box. but don't know which command/options/ to use to get it loaded.
Thanks a lot

Peng
Alternative installation
If you don't want to install the core package (as it is rather large: 1.5 Mb) you can also download the asterisk_1.4.0-beta3-1.tar.gz tarball, unpack it on an external drive, filter out the stuff that you don't want or need and pack the rest in a trimmed down tarfile that you untar on the OpenWRT box.

HI Hans,

I tried ImageBuilder to build the image using your asterisk ipk. It seems that I always get "duplicate files" with Asterisk.

When I use Asterisk 1.2 from OpenWrt stock, with Asterisk-sournds, it will say duplicate "5" files. with out Asterisk-sounds, it says "0" duplicate.

What is about this duplicate file thing? what is duplicated? Is this something that we can fix or something beyond our capability and doesn't hurt?

Trying to understand this.

BTW, this time asterisk doesn't complain about that libstc++ thing. I will test out other functions and let you know. hope you will toss out the final 1.4 next Friday as well.

Good work!
thanks
Peng

***with asterisk-sounds****it says duplicate "11"file
Creating little endian 2.1 filesystem on /home/savvid/Desktop/OpenWrt-ImageBuilder-Linux-i686/build_mipsel/linux-2.4-brcm/root.squashfs, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 3807.33 Kbytes (3.72 Mbytes)
        40.21% of uncompressed filesystem size (9467.49 Kbytes)
Inode table size 6645 bytes (6.49 Kbytes)
        26.97% of uncompressed inode table size (24639 bytes)
Directory table size 7726 bytes (7.54 Kbytes)
        51.91% of uncompressed directory table size (14883 bytes)
Number of duplicate files found 11
Number of inodes 1071
Number of files 833
Number of fragments 71
Number of symbolic links  171
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 67
Number of uids 1
        root (0)
Number of gids 0


**Taking out asterisk-sounds*** it says duplicate "1" file.

Configuring webif...Done.
Creating little endian 2.1 filesystem on /home/savvid/Desktop/OpenWrt-ImageBuilder-Linux-i686/build_mipsel/linux-2.4-brcm/root.squashfs, block size 65536.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 3231.92 Kbytes (3.16 Mbytes)
        36.11% of uncompressed filesystem size (8949.68 Kbytes)
Inode table size 5683 bytes (5.55 Kbytes)
        27.74% of uncompressed inode table size (20485 bytes)
Directory table size 6865 bytes (6.70 Kbytes)
        53.41% of uncompressed directory table size (12853 bytes)
Number of duplicate files found 1
Number of inodes 895
Number of files 665
Number of fragments 62
Number of symbolic links  171
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 59
Number of uids 1
        root (0)

****taking out asterisk*** it says "0" duplicate files.

Little endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments
Filesystem size 1422.23 Kbytes (1.39 Mbytes)
        32.39% of uncompressed filesystem size (4390.42 Kbytes)
Inode table size 3663 bytes (3.58 Kbytes)
        27.25% of uncompressed inode table size (13441 bytes)
Directory table size 4360 bytes (4.26 Kbytes)
        55.18% of uncompressed directory table size (7901 bytes)
Number of duplicate files found 0
Number of inodes 604
Number of files 386
Number of fragments 25
Number of symbolic links  169
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 49
Number of uids 1
        root (0)

HI Hans,

Started testing your 1.4B4-2. got the following errors in the log. hope you can help with some suggestions.

thanks
peng

\\asterisk/messages
[Dec 21 08:03:47] NOTICE[818] cdr.c: CDR simple logging enabled.
[Dec 21 08:03:48] WARNING[818] db.c: Unable to open Asterisk database
[Dec 21 08:03:48] NOTICE[818] loader.c: 51 modules will be loaded.
[Dec 21 08:03:51] WARNING[818] res_musiconhold.c: Cannot open dir /var/lib/asterisk/moh or dir does not exist ***shouldn't this be
/usr/lib/asterisk/moh/

[Dec 21 08:03:51] WARNING[818] res_smdi.c: No SMDI interfaces are available to listen on, not starting SDMI listener.***what do i do with this?
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show cache' already registered (or something close enough)***i currently don't use IAX2 on this box. what does these IAX related error mean? What can we do about this?

[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show channels' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show firmware' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show netstats' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show peers' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show registry' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show stats' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show threads' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] cli.c: Command 'iax2 show users' already registered (or something close enough)
[Dec 21 08:03:52] WARNING[818] chan_iax2.c: Error opening firmware directory '/var/lib/asterisk/firmware/iax': No such file or directory

[Dec 21 08:03:52] WARNING[818] db.c: Unable to open Asterisk database  *******this is the most annoying part. what do i do about this?

[Dec 21 08:03:52] WARNING[818] chan_sip.c: insecure=very at line 124 is deprecated; use insecure=port,invite instead
[
[Dec 21 08:03:53] WARNING[818] translate.c: plc_samples 160 format 6
[Dec 21 08:03:53] WARNING[818] translate.c: plc_samples 160 format 6

hmmm,

It seems that DTMF also doesn't work when I use Asterisk 1.4 B-2 with 7970/7960 phone.

What's been changed on Asterisk new version?

tks
peng

Can you check that your asterisk.conf specifies an entry for "astdatadir" in the [directories] section?
In my case it should point to the same directory as "astvarlibdir".
This was not present/needed in 1.2.x but it is required in 1.4.x, so you can't just copy over your old asterisk.conf.

Hans.

(Last edited by zandbelt on 21 Dec 2006, 17:38)

Hi hans,

As i didn't figure out how to untar and install your tar file in the openwrt box, i downloaded your three IPK files in the imageBuilder. This is the new rebuild i loaded up.

This is what it looks like.

I do realize that i have quite a few questions here, hope you can help out with your expertise.

Thanks
peng

root@OpenWrt:~$ more /etc/asterisk/asterisk.conf
[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /var/lib/asterisk
astdatadir => /var/lib/asterisk
astagidir => /var/lib/asterisk/agi-bin
astspooldir => /var/spool/asterisk
astrundir => /var/run
astlogdir => /var/log/asterisk

; Changing the following lines may compromise your security.
;[files]
;astctlpermissions = 0660
;astctlowner = root
;astctlgroup = apache
;astctl = asterisk.ctl
;[options]
;internal_timing = yes

more /usr/lib/asterisk/moh/

hmmm, so, where should this moh/ directory should be? in /usr? or /var?

after installation, it's locased in /usr?

now, the prompts is for /var?

I really need your help with all the questions listed above. Thanks a lot in advance.

Peng

Linksys PAP2 also lost DTMF functions. So, there must be some change to Asterisk 1.4 B4-2. I am not sure it's only happening on this compiled version for MIPS or for the whole new 1.4 from asterisk.org.

thanks
peng

Hi Peng,

I won't spend time on answering Asterisk specific configuration questions/problems here; you have to refer to the Asterisk documentation and fora for that (and perhaps the tutorial that macsat is writing). One exception now;-), I guess your config would have to look like this:

[directories]
astetcdir => /etc/asterisk
astmoddir => /usr/lib/asterisk/modules
astvarlibdir => /usr/lib/asterisk
astdatadir => /usr/lib/asterisk
astagidir => /usr/lib/asterisk/agi-bin
astspooldir => var/spool/asterisk
astrundir => /var/run
astlogdir => /var/log/asterisk

I'll look into configuring these values by default in the ipkgs.
Then again, I'd recommend the stable 1.2.x release in your case, being relatively new to Asterisk on OpenWRT.
I appreciate your feedback on the duplicate files in the packages; I'll solve those in the next releases as well.

Regards,

Hans.

HI Hans,

Yes, those directories are generated by your packages by default. I am not sure what's happening.

I will try your 1.2.x and see how it goes.

Thanks
peng

HI hans,

I loaded your 1.2.14 stable in ImageBuilder, and it says duplicate file of "11" as well.

I also couldn't run asterisk as it complains the follwoing lib. What does this lib do with Asterisk?

thanks
peng

root@OpenWrt:~$ asterisk
asterisk: can't load library 'libssl.so.0.9.8'

Just to give a status.

I AM in the middle of the tutorial.

I am however stuck right now due to the fact that I am waiting for my new ISP to deliver my internet line. Until I get the new line I cant forward ports (I am on a shared line right now, with no control over the gateway router), and hence cant test the dial in- and out features of asterisk.

Currently making local calls on my LAN between to SIP phones works fine however.

You can always register with an upstream SIP provider, like sipgate.co.uk, through your NAT firewall. You can do this without opening any extra ports on the fierwall.

As far as the provider is concerned, your Asterisk box is just an ATA. So as long as they work with devices behind NAT (e.g. they support the SIP 'rport' extension, they send periodic empty SIP packets as keepalives, and they perform RTP rendezvous) then it should work.

peng wrote:

root@OpenWrt:~$ asterisk
asterisk: can't load library 'libssl.so.0.9.8'

You can download the libssl-0.9.8 package from the same site in the Asterisk 1.2.13 package listing. This one is required since res_crypto is included in the core distribution now. I put that one in on request but I'm considering to leave it out in the next release and provide it in a separate package because it is rather heavy-weight.

Hans.

do you mean that libopenssl-0.9.8?
tks
peng