OpenWrt Forum Archive

Topic: dummy zaptel timer support for Asterisk: app_meetme,iax2

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

Hi all,

I've cross-compiled dummy USB zaptel timer support for Asterisk 1.2.13 on UHCI USB enabled OpenWRT devices. This enables support for the app_meetme module on OpenWRT devices, thus using an OpenWRT Asterisk router as a tele-conferencing audio bridge. I've done some tests on my Asus WL500g DeLuxe with 3 users in the conference and the load was still quite acceptable. This would also enable IAX2 trunking but I haven't been testing this myself.

Notice that all of this requires the usb-uhci USB UHCI kernel module instead of the default "alternate" uhci module. This module is included in the meetme tarball from:

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

You can also obtain (the latest) Asterisk 1.2.13 packages & patches from that link, all for the whiterussian branch.
Let me know if things work for you too so I could start assembling patches for the OpenWRT source tree.

Regards,

Hans.

Further reading:
http://www.voip-info.org/wiki-Asterisk+cmd+MeetMe
http://www.voip-info.org/wiki/view/Asterisk+timer
http://www.voip-info.org/wiki/view/Aste … X+channels

This is wonderful work, thank you.

Unfortunately I've been unable to get ztdummy to work for IAX2 trunking (haven't tried meetme, as I'm using G729 codecs). This is on a WL500g Deluxe running WhiteRussian RC6.

When Asterisk starts I get the following message:

Nov 20 12:00:39 WARNING[1396]: chan_iax2.c:8293 build_peer: Unable to support trunking on peer 'upstream' without zaptel timing

I have loaded the ztdummy module, and it loads without errors, but it doesn't seem to be used: here's lsmod output taken while Asterisk is running in the background.

root@OpenWrt:/etc/asterisk# lsmod
Module                  Size  Used by    Tainted: P
ztdummy                 1832   0 (unused)
zaptel                212512   0 [ztdummy]
usb-uhci               27180   0 [ztdummy]
usbcore                74808   1 [usb-uhci]
wlcompat               15520   0 (unused)
wl                    423640   0 (unused)
switch-robo             4460   0 (unused)
switch-core             4896   0 [switch-robo]
diag                   18176   0 (unused)

root@OpenWrt:~# ls -l /dev/zap
crw-rw-rw-    1 root     root     196, 254 Jan  1  1970 channel
crw-rw-rw-    1 root     root     196,   0 Jan  1  1970 ctl
crw-rw-rw-    1 root     root     196, 255 Jan  1  1970 pseudo
drwxr-xr-x    1 root     root            0 Jan  1  1970 span1
crw-rw-rw-    1 root     root     196, 253 Jan  1  1970 timer

I'm using the asterisk-mini_1.2.13-1_mipsel.ipk installation, and apart from IAX2 trunking it's working fine. (Actually it's so minimalist that it doesn't even have app_dial.so, so I copied that out of the full-blown asterisk ipkg)

# ls /usr/lib/asterisk/modules/
app_dial.so         codec_gsm.so        format_wav_gsm.so
app_meetme.so       codec_ulaw.so       pbx_config.so
chan_iax2.so        format_gsm.so       res_features.so
chan_local.so       format_pcm.so       res_musiconhold.so
chan_sip.so         format_wav.so

OpenWrt*CLI> show modules
Module                         Description                              Use
Count
res_musiconhold.so             Music On Hold Resource                   1
res_features.so                Call Features Resource                   1
pbx_config.so                  Text Extension Configuration             0
chan_iax2.so                   Inter Asterisk eXchange (Ver 2)          0
chan_local.so                  Local Proxy Channel                      0
chan_sip.so                    Session Initiation Protocol (SIP)        0
format_wav_gsm.so              Microsoft WAV format (Proprietary GSM)   0
codec_ulaw.so                  Mu-law Coder/Decoder                     0
codec_gsm.so                   GSM/PCM16 (signed linear) Codec Translat 0
format_gsm.so                  Raw GSM data                             0
app_dial.so                    Dialing Application                      0
app_meetme.so                  MeetMe conference bridge                 0
format_pcm.so                  Raw uLaw 8khz Audio support (PCM)        0
format_wav.so                  Microsoft WAV format (8000hz Signed Line 0
14 modules loaded

So I'm wondering if there's something else I need to do, or some other module I need to load, in order to activate ztdummy.

I generated a dummy meetme.conf but that doesn't seem to help:

[rooms]
conf => 9000

In case they're any use, here are my config files. I emptied out /etc/asterisk except for asterisk.conf, logger.conf and modules.conf, and then created the following:

--- iax.conf ---
[general]
bandwidth=low
allow=g729
tos=ef
autokill=yes
jitterbuffer=no
forcejitterbuffer=no
trunktimestamps=yes

[upstream]
type=peer
username=venue
secret=XXXXXXXX
auth=md5
host=X.X.X.X
qualify=yes
trunk=yes

--- sip.conf ---
; This is purposely an "insecure" configuration which allows any SIP user
; to place outbound calls through us without authentication!
[general]
context=outbound
allowexternaldomains=yes
bindport=5060
bindaddr=192.168.1.1
disallow=all
allow=g729
allow=gsm

--- extensions.conf ---
[general]
autofallthrough=no

[outbound]
exten => _X.,1,Dial(iax2/upstream/${EXTEN},45)

Many thanks, Brian.

Hi Brian,

I checked the code for the error message and noticed that chan_iax2 needs to be compiled with special flags for including zaptel timer support. I did so and I updated the core asterisk package at the original link (new version 1.2.13-2). Please try this with iax2 trunking and let us know what your findings are.

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

or directly at:

  http://zandbelt.dyndns.org/asterisk/1.2 … mipsel.ipk

Regards,

Hans.

(Last edited by zandbelt on 20 Nov 2006, 15:55)

I'm using asterisk-mini, as I'm pretty tight on flash. But I've pulled chan_iax2 out of your new package and overwritten my old one. I'm pleased to report it works - thank you!

Actually, to be precise, I'm getting trunked audio from OpenWrt to my central Asterisk server, but not in the other direction. But that's clearly a problem with the other side, not with OpenWrt smile

15:53:33.364129 IP 10.69.255.245.4569 > 10.69.255.251.4569: UDP, length 60
15:53:33.368300 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24
15:53:33.372985 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24
15:53:33.384124 IP 10.69.255.245.4569 > 10.69.255.251.4569: UDP, length 60
15:53:33.388250 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24
15:53:33.392928 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24
15:53:33.404125 IP 10.69.255.245.4569 > 10.69.255.251.4569: UDP, length 60
15:53:33.408715 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24
15:53:33.412851 IP 10.69.255.251.4569 > 10.69.255.245.4569: UDP, length 24

Anyway - these new Asterisk packages are great - thanks for working on this. Cheers, Brian.

(P.S. I still don't understand why asterisk_mini doesn't have app_dial.so. Is there some other way to connect a call in extensions.conf, without using the Dial() application?)

zandbelt wrote:

I ... noticed that chan_iax2 needs to be compiled with special flags for including zaptel timer support.

Can you say what those flags were? Rather OT, but I'm trying to find out why the other side doesn't combine packets. It's compiled from SVN trunk, and seems to have detected zaptel properly:

$ grep ZAP include/asterisk/autoconfig.h
/* Define this to indicate the ${ZAPTEL_DESCRIP} library */
#define HAVE_ZAPTEL 1
/* Define to indicate the ${ZAPTEL_DESCRIP} library version */
#define HAVE_ZAPTEL_VERSION 140

It doesn't report at startup that zaptel is not available.

candlerb wrote:

(P.S. I still don't understand why asterisk_mini doesn't have app_dial.so. Is there some other way to connect a call in extensions.conf, without using the Dial() application?)

I guess you're right...  I updated asterisk-mini package so it includes app_dial.so now.
It also contains the "new" chan_iax2.so with zaptel timer support. It is at:

  http://zandbelt.dyndns.org/asterisk/1.2 … mipsel.ipk

I also adapted the zaptel module & meetme installation at the original link to new situation.

Hans.

candlerb wrote:
zandbelt wrote:

I ... noticed that chan_iax2 needs to be compiled with special flags for including zaptel timer support.

Can you say what those flags were? Rather OT, but I'm trying to find out why the other side doesn't combine packets. It's compiled from SVN trunk, and seems to have detected zaptel properly:

I don't know exactly about which SVN trunk you're talking (Asterisk, OpenWRT). The asterisk stuff we're talking about here is based on the SVN whiterussian branch (not the _trunk_) with patches as can be obtained from the link above.

The flag I'm talking about is -DIAX_TRUNKING.

It can be set automatically if linux/zaptel.h is found in the compile path, although this auto-configure step does not (yet) work for OpenWRT whiterussian (that's why I'm providing binaries for now).

Hans.

Sorry, I meant Asterisk SVN trunk; that's what I'm running on the PC side.

The flag IAX_TRUNKING doesn't exist in Asterisk SVN trunk, so it must be something else. I'll dig deeper.

Cheers, Brian.

candlerb wrote:

Sorry, I meant Asterisk SVN trunk; that's what I'm running on the PC side.

The flag IAX_TRUNKING doesn't exist in Asterisk SVN trunk, so it must be something else. I'll dig deeper.

The Asterisk SVN trunk is probably on version 1.4.x now, but my guess is that the basic idea is still the following:
the zaptel package must be compiled, installed and detectable for the chan_iax2 module to be compiled with zaptel support.

Hans.

The discussion might have continued from here.