OpenWrt Forum Archive

Topic: Asterisk 1.6.x

The content of this topic has been archived between 13 Apr 2018 and 26 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

Thanks Zandbelt.

I'm having a strange problem with Asterisk 1.6.2.13-1, built based on the current svn trunk. The first time I start it, it crashes almost silently just before starting to load the modules, i.e. (if started with "-vvvvvvd") after displaying:

[...]
  == Registered application 'Park'
  == Manager registered action ParkedCalls
  == Manager registered action Park
  == Manager registered action Bridge
  == Manager registered action DBGet
  == Manager registered action DBPut
  == Manager registered action DBDel
  == Manager registered action DBDelTree
 Asterisk Dynamic Loader Starting:
  == Parsing '/opt/etc/asterisk/modules.conf':   == Found
[Sep 28 10:26:10] NOTICE[2416]: loader.c:1060 load_modules: 41 modules will be loaded.
Illegal instruction

Nothing else is reported by dmesg, logread or in /var/log/asterisk/messages .
If I retry, it works. It also works the first time if, before it, I run a program that allocates enough RAM, e.g. the Python interpreter. Smaller stuff (e.g., vi or small non-busybox utilities such as bw_set without parameters) won't achieve that result.

It smacks of unitialized memory bug to me...

Forgot to say that this also happened with the previous version 1.6.2.11, but not if I didn't load chan_iax2.so (at that time I assumed there was something wrong in that module). Now it doesn't make a difference, but perhaps if I omitted more modules the bug would not show up...

Hello Hans,

I had a question but answered it on my own wink

Thanks again for all the hard work done to get 1.6 in OpenWRT.

(Last edited by bob42 on 12 Oct 2010, 12:33)

Hello All.

Setting up an asterisk 1.6 test system on an old WRT54GS router ... with the lates BackFire RC.

The link for the list of available modules for V1.6 given by zandbelt does't seem to work anymore. And the list of package available in the current release seems to miss quite a few of the ones listed ...

I would need app_queue.so (and probably a few others appenrently not available in the current realease).
Anyone can tell me where i can get it ?


Is the list of package given by zandbelt still available somewhere ?

Thank you for any help ...

Noel

(Last edited by noelbou on 25 Oct 2010, 23:27)

Zandbelt,

Perhaps, it is time to support asterisk-1.8.x which includes a chan_gtalk. This way, we can place/receive GV calls using chan_gtalk through GTalk.

I would include Asterisk 1.8 (there's already a ticket with a proposed patch on that) but only when we drop support for 1.4 and 1.6 to be able to keep up with maintenance. How do people feel about that? Do we need to create a poll?

Hans.

Hans,

Thanks for your quick response.

I no longer use asterisk-1.4.x; however, that doesn't mean it is no longer needed. The reason I said this is asterisk-1.4 is the smallest asterisk package with basic PBX functionalities that some people are still interested to use, especially if their device has a limited space on Flash/RAM. But, that doesn't mean we can move on to support asterisk-1.8.

W.r.t. the asterisk-1.8.x, if you are talking about ticket #8132, I have already patched to my existing asterisk-1.6.x without any problem. The only problem in building the asterisk-1.8.x is the missing *.gsm files. In this case, the build can't include both asterisk18-sounds and asterisk18-voicemail packages. If you decide to support asterisk-1.8.x, then I am sure you will have no problem to fix this.

One good reason to include asterisk-1.8.x in OpenWRT is its new support for Google Voice (GV) calls through chan_gtalk.so module. This will make a lot of asterisk users very happy to migrate to asterisk-1.8.x. I hope you will consider to support for asterisk-1.8.x.

I really would like to have asterisk 1.8 supported.  I am even try to build it on my own for Dockstar using the diff files in ticket 8132.  Unfortunately, I encountered a lot of trouble because my lack experience in Openwrt.  Moreover, the diff files given are for Asterisk 1.6.2.13 but the one available in the trunk is Asterisk 1.6.2.14.  If I can have the correct Makefile and patch files, I can certainly give it a try.  Is there such a plan to create such a task?

twinclouds wrote:

I really would like to have asterisk 1.8 supported.  I am even try to build it on my own for Dockstar using the diff files in ticket 8132.  Unfortunately, I encountered a lot of trouble because my lack experience in Openwrt.

Wht troubles did you encounter? The only problem I encountered is it seems asterisk v1.8.x doesn't include the (voicemail) sound files by default. As such, the existing patch file will cause the compilation break down if the voicemail and/or sound packages are selected.

Moreover, the diff files given are for Asterisk 1.6.2.13 but the one available in the trunk is Asterisk 1.6.2.14.  If I can have the correct Makefile and patch files, I can certainly give it a try.

You can take a look at the patch file and manually patch the existing Makefile. Then, create your own patch file.

Is there such a plan to create such a task?

I hope Hans will consider this.

mazilo wrote:

Hans,

Thanks for your quick response.

I no longer use asterisk-1.4.x; however, that doesn't mean it is no longer needed. The reason I said this is asterisk-1.4 is the smallest asterisk package with basic PBX functionalities that some people are still interested to use, especially if their device has a limited space on Flash/RAM. But, that doesn't mean we can move on to support asterisk-1.8.

W.r.t. the asterisk-1.8.x, if you are talking about ticket #8132, I have already patched to my existing asterisk-1.6.x without any problem. The only problem in building the asterisk-1.8.x is the missing *.gsm files. In this case, the build can't include both asterisk18-sounds and asterisk18-voicemail packages. If you decide to support asterisk-1.8.x, then I am sure you will have no problem to fix this.

One good reason to include asterisk-1.8.x in OpenWRT is its new support for Google Voice (GV) calls through chan_gtalk.so module. This will make a lot of asterisk users very happy to migrate to asterisk-1.8.x. I hope you will consider to support for asterisk-1.8.x.

Mazilo:
I have been able to compile the Asterisk-1.8.x packages with the patch based on the suggested fix by radael, except for the two packages (sounds and voicemail) as you said.  However, it appears that Mario does not have the problem to compile these two packages in brcm2.4 and ar71xx platform.  I am not sure if the cause is the missing gsm files or not.  If it is how Mario can get a way with that?

twinclouds wrote:

Mazilo:
I have been able to compile the Asterisk-1.8.x packages with the patch based on the suggested fix by radael, except for the two packages (sounds and voicemail) as you said.  However, it appears that Mario does not have the problem to compile these two packages in brcm2.4 and ar71xx platform.  I am not sure if the cause is the missing gsm files or not.  If it is how Mario can get a way with that?

IIRC, sound files are not part of Asterisk source code. However, why the sounds and voicemail modules on Asterisk v1.6.x are build able? Someone needs to ask Mario for his OpenWRT Makefile for Asterisk v1.8.x. He probably has created additional patches. I sure don't mind to be informed once the information is made available.

(Last edited by mazilo on 3 Feb 2011, 03:29)

Someone can provide me the chan_datacard package for brcm47xx? I have not idea how to compile it..Thank you

Hello Hans,

Could you upgrade the makefile in order to work with asterisk 1.8?


zandbelt wrote:
#
# Copyright (C) 2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=asterisk16-chan-datacard
PKG_REV:=55
PKG_VERSION:=1.0.0_r$(PKG_REV)
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.makhutov.org/svn/chan_datacard/trunk/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_PROTO:=svn

include $(INCLUDE_DIR)/package.mk

define Package/asterisk16-chan-datacard
  SUBMENU:=asterisk16 (Complete Open Source PBX), v1.6.x
  SECTION:=net
  CATEGORY:=Network
  URL:=http://www.asterisk.org/
  MAINTAINER:=Hans Zandbelt <hans.zandbelt@gmail.com>
  DEPENDS:= +asterisk16 +libiconv
  TITLE:=Huawei UMTS 3G datacards support
endef

define Package/asterisk16-chan-datacard/description
  Asterisk channel driver for Huawei UMTS 3G datacards
endef

MAKE_ARGS:= \
    CC="$(TARGET_CC)" \
    LD="$(TARGET_LD)" \
    CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/lib/libiconv/include" \
    LDFLAGS="$(TARGET_LDFLAGS)" \

define Build/Compile
    mkdir -p $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules
    $(MAKE_VARS) \
    $(MAKE) -C "$(PKG_BUILD_DIR)" \
        $(MAKE_ARGS) \
        DESTDIR="$(PKG_INSTALL_DIR)" \
        all install
endef

define Package/asterisk16-chan-datacard/conffiles
/etc/asterisk/datacard.conf
endef

define Package/asterisk16-chan-datacard/install
    $(INSTALL_DIR) $(1)/etc/asterisk
    $(INSTALL_DATA) $(PKG_BUILD_DIR)/datacard.conf $(1)/etc/asterisk/
    $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules
    $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/asterisk/modules/chan_datacard.so $(1)/usr/lib/asterisk/modules/
endef

$(eval $(call BuildPackage,asterisk16-chan-datacard))

Hi Hans,

Any information on the availability of the Asterisk GUI for 1.8.x.x?

I am running OpenWRT r28078 on a Buffalo WZR-HP-G300NH. Have Asterisk 1.8.4.4-1 working reasonable stable (thanks for the good work)  but REALLY need a full function GUI.

Have tried FIVN 1.6 but function is limited. Cannot get FIVN 2.x to work.

Andre

Hi Hans,

Thanks for the response, but before I go ahead and mess things up completely, maybe you can clarify for me.
The package at #6543 states that it is:
a) a binary
b) for x86

Would this still be correct for the G300NH (ie AR71xx)?

I meant for you to take the sources/Makefile and build it for yourself, possibly modifying things as required for 1.8.x...

Sorry Hans, from the comments in the forum it appeared it was not really a binary, hence it should install.

As for me doing the whole thing myself, building the Dev environment and then building the package, I guess it is not going to happen for a loooong time. I am still busy trying to find my feet with openwrt from a user/configuration side, nowhere near ready to develop.

Thanks anyway.

Andre

Another question: How i can create func_iconv.so for OpenWrt for Asterisk?
Now i know it: There are two lines in the Makefile:

    ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
    ASTLDFLAGS="$(EXTRA_LDFLAGS)" \ 
#I changed these two lines into: 
    ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY -I$(STAGING_DIR)/usr/lib/libiconv-full/include" \
    ASTLDFLAGS="$(EXTRA_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv" \

Now it compiles, and i have my func_iconv.so [s]With this asterisk function i can do many things in the dialplan.[/s] I use SHELL instead:

exten => ussd,n,NoOp(${SHELL(echo -n '${BASE64_DECODE(${USSD_BASE64})}' | iconv -f utf-8 -t koi8-ru):0:-1})

(Last edited by PsychoMantis on 17 Sep 2011, 18:25)

PsychoMantis wrote:

Another question: How i can create func_iconv.so for OpenWrt for Asterisk?
Now i know it: There are two lines in the Makefile:

    ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" \
    ASTLDFLAGS="$(EXTRA_LDFLAGS)" \

I changed it to:

    ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY -I$(STAGING_DIR)/usr/lib/libiconv-full/include" \
    ASTLDFLAGS="$(EXTRA_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv" \

Now it compiles, and i have my func_iconv.so With this asterisk function i can do many things in the dialplan.

If I had to do this, I would add the following to the OpenWRT Makefile for asterisk:

include $(INCLUDE_DIR)/nls.mk
.
:
ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY -I$(ICONV_PREFIX)/include"
ASTLDFLAGS="$(EXTRA_LDFLAGS) -L$(ICONV_PREFIX)/lib -liconv"

OR:

include $(INCLUDE_DIR)/nls.mk
.
:
CONFIGURE_ARGS+= \
        --with-iconv="$(ICONV_PREFIX)" \

This way, the ICONV_PREFIX variable will point to the correct iconv (full or stub version) directory.

Hello,

I'm looking for app_readfile.so but can't seem to find it. I'm running asterisk 1.8 on trunk rv28943. Any pointers to where it is?

Cheers,

Keith

To try the conf. with 3-4 friends around the world, got the new Router Buffalo WZR-HP-G300NH because of more RAM.
(posted same in 'General' section , since more asterisk users are in this thread, posting my issues here too)

zandbelt/Hans you around ?
Please someone help here who successfully using meetme using dahdi dummy timer..


I am trying to use meetme with latest trunk in 2.6. After some google got details in https://dev.openwrt.org/ticket/9491 .
I am able to compile

    asterisk18-app-meetme_1.8.7.1-1_ar71xx.ipk
    dahdi-tools-libtonezone_2.6.0-1_ar71xx.ipk
    dahdi-cfg_2.6.0-1_ar71xx.ipk                 
   kmod-dahdi-linux_2.6.39.4+2.6.0-1_ar71xx.ipk

Now, Hotplug code is not fixing the nodes (dahdi known bug). I tried manually creating them using following commands as i am not sure how to write them in hotplug2. I tried in hotplug but that bricked my router. is the below process correct? may be we have to create them while boot only.

rm /dev/dahdi*
/bin/mkdir -p /dev/dahdi
/bin/mknod -m 0644 /dev/dahdi/timer c 196 253
/bin/mknod -m 0644 /dev/dahdi/channel c 196 254
/bin/mknod -m 0644 /dev/dahdi/pseudo c 196 255
/bin/mknod -m 0644 /dev/dahdi/ctl c 196 0


# lsmod | grep dahdi
dahdi                 183536  0
crc_ccitt                944  2 dahdi,ppp_async

# dmesg | grep dahdi
[   11.450000] dahdi: Telephony Interface Registered on major 196
[   11.460000] dahdi: Version: 2.6.0
[   41.300000] dahdi: Detected time shift.

OpenWrt*CLI> module load chan_dahdi
Unable to load module chan_dahdi
Command 'module load chan_dahdi' failed.
[Jan 22 04:52:17] WARNING[19689]: loader.c:400 load_dynamic_module: Module 'chan_dahdi' did not register itself during load
[Jan 22 04:52:17] WARNING[19689]: loader.c:839 load_resource: Module 'chan_dahdi' could not be loaded.
OpenWrt*CLI>

Look like i have two issues
1. creating proper dahdi nodes using hotplug
2. anything else is needed which i am not aware of?

Thanks

(Last edited by baba2s on 23 Jan 2012, 18:14)

nowadays it is completely frustrating and hopeless to try and get new packages like dahdi into OpenWRT, hence I won't invest in it, sorry

zandbelt wrote:

nowadays it is completely frustrating and hopeless to try and get new packages like dahdi into OpenWRT, hence I won't invest in it, sorry

no problem Hans,   Its good that you are still around and quickly helps thousands of openwrt Asterisk users.

Thanks

The discussion might have continued from here.