Yes, I know that chan_dongle is buggy But I installed a lot of firmware for this Polish Play E156G branded modem. This is firmware related issue for this brand or modem. I saw recommendations to use the Update_11.608.08.81.00.B409.exe for Play E156G and everything works well on Windows and Asterisk with OpenWRT.
I installed the newest Asterisk from the snapshot repository (version 18) on X-WRT, I have some missing dependencies from the kernel, but the dongle and chan are detected. The calling working, but sometimes won't hear anything, but the same was on asterisk16 with this dongle.
install-asterisk.sh source in my case (and possible fix of kernel dependencies of X-WRT to snapshot in dongle packages). Some packages has different names in snapshot (voicemail and chan-dongle packages).
opkg update
opkg install asterisk asterisk-app-authenticate asterisk-app-chanisavail asterisk-app-chanspy asterisk-app-confbridge asterisk-app-controlplayback asterisk-app-disa asterisk-app-dumpchan asterisk-app-exec asterisk-app-followme asterisk-app-ices asterisk-app-ivrdemo asterisk-app-minivm asterisk-app-mixmonitor asterisk-app-mp3 asterisk-app-originate asterisk-app-playtones asterisk-app-read asterisk-app-readexten asterisk-app-record asterisk-app-saycounted asterisk-app-sayunixtime asterisk-app-senddtmf asterisk-app-sendtext asterisk-app-sms asterisk-app-stack asterisk-app-system asterisk-app-transfer asterisk-app-url asterisk-app-userevent asterisk-app-verbose asterisk-app-waitforring asterisk-app-waitforsilence asterisk-app-waituntil asterisk-app-while asterisk-app-zapateller asterisk-bridge-builtin-features asterisk-bridge-holding asterisk-bridge-native-rtp asterisk-bridge-simple asterisk-bridge-softmix asterisk-cdr asterisk-cel-custom asterisk-cel-manager asterisk-chan-alsa asterisk-chan-bridge-media asterisk-chan-console asterisk-chan-dongle asterisk-chan-mobile asterisk-chan-motif asterisk-chan-oss asterisk-chan-phone asterisk-chan-rtp asterisk-chan-sip asterisk-codec-a-mu asterisk-codec-alaw asterisk-codec-g722 asterisk-codec-gsm asterisk-codec-lpc10 asterisk-codec-resample asterisk-codec-ulaw asterisk-curl asterisk-format-g723 asterisk-format-g726 asterisk-format-gsm asterisk-format-ilbc asterisk-format-ogg-vorbis asterisk-format-pcm asterisk-format-siren14 asterisk-format-siren7 asterisk-format-sln asterisk-format-wav asterisk-format-wav-gsm asterisk-func-base64 asterisk-func-blacklist asterisk-func-callcompletion asterisk-func-channel asterisk-func-config asterisk-func-cut asterisk-func-dialgroup asterisk-func-dialplan asterisk-func-groupcount asterisk-func-hangupcause asterisk-func-holdintercept asterisk-func-iconv asterisk-func-jitterbuffer asterisk-func-module asterisk-func-periodic-hook asterisk-func-pitchshift asterisk-func-shell asterisk-func-sysinfo asterisk-func-talkdetect asterisk-func-uri asterisk-func-version asterisk-func-vmcount asterisk-func-volume asterisk-pbx-loopback asterisk-pbx-spool asterisk-pjsip asterisk-res-adsi asterisk-res-agi asterisk-res-clialiases asterisk-res-clioriginate asterisk-res-convert asterisk-res-hep asterisk-res-hep-pjsip asterisk-res-hep-rtcp asterisk-res-limit asterisk-res-manager-presencestate asterisk-res-monitor asterisk-res-musiconhold asterisk-res-mutestream asterisk-res-parking asterisk-res-phoneprov asterisk-res-pjproject asterisk-res-pjsip-phoneprov asterisk-res-realtime asterisk-res-rtp-asterisk asterisk-res-rtp-multicast asterisk-res-security-log asterisk-res-smdi asterisk-res-sorcery asterisk-res-speech asterisk-res-srtp asterisk-res-timing-timerfd asterisk-res-xmpp asterisk-sounds asterisk-util-smsq asterisk-util-streamplayer asterisk-voicemail
opkg install --nodeps --verify-program $(command -v true) --cache /dev/null asterisk asterisk-app-authenticate asterisk-app-chanisavail asterisk-app-chanspy asterisk-app-confbridge asterisk-app-controlplayback asterisk-app-disa asterisk-app-dumpchan asterisk-app-exec asterisk-app-followme asterisk-app-ices asterisk-app-ivrdemo asterisk-app-minivm asterisk-app-mixmonitor asterisk-app-mp3 asterisk-app-originate asterisk-app-playtones asterisk-app-read asterisk-app-readexten asterisk-app-record asterisk-app-saycounted asterisk-app-sayunixtime asterisk-app-senddtmf asterisk-app-sendtext asterisk-app-sms asterisk-app-stack asterisk-app-system asterisk-app-transfer asterisk-app-url asterisk-app-userevent asterisk-app-verbose asterisk-app-waitforring asterisk-app-waitforsilence asterisk-app-waituntil asterisk-app-while asterisk-app-zapateller asterisk-bridge-builtin-features asterisk-bridge-holding asterisk-bridge-native-rtp asterisk-bridge-simple asterisk-bridge-softmix asterisk-cdr asterisk-cel-custom asterisk-cel-manager asterisk-chan-alsa asterisk-chan-bridge-media asterisk-chan-console asterisk-chan-dongle asterisk-chan-mobile asterisk-chan-motif asterisk-chan-oss asterisk-chan-phone asterisk-chan-rtp asterisk-chan-sip asterisk-codec-a-mu asterisk-codec-alaw asterisk-codec-g722 asterisk-codec-gsm asterisk-codec-lpc10 asterisk-codec-resample asterisk-codec-ulaw asterisk-curl asterisk-format-g723 asterisk-format-g726 asterisk-format-gsm asterisk-format-ilbc asterisk-format-ogg-vorbis asterisk-format-pcm asterisk-format-siren14 asterisk-format-siren7 asterisk-format-sln asterisk-format-wav asterisk-format-wav-gsm asterisk-func-base64 asterisk-func-blacklist asterisk-func-callcompletion asterisk-func-channel asterisk-func-config asterisk-func-cut asterisk-func-dialgroup asterisk-func-dialplan asterisk-func-groupcount asterisk-func-hangupcause asterisk-func-holdintercept asterisk-func-iconv asterisk-func-jitterbuffer asterisk-func-module asterisk-func-periodic-hook asterisk-func-pitchshift asterisk-func-shell asterisk-func-sysinfo asterisk-func-talkdetect asterisk-func-uri asterisk-func-version asterisk-func-vmcount asterisk-func-volume asterisk-pbx-loopback asterisk-pbx-spool asterisk-pjsip asterisk-res-adsi asterisk-res-agi asterisk-res-clialiases asterisk-res-clioriginate asterisk-res-convert asterisk-res-hep asterisk-res-hep-pjsip asterisk-res-hep-rtcp asterisk-res-limit asterisk-res-manager-presencestate asterisk-res-monitor asterisk-res-musiconhold asterisk-res-mutestream asterisk-res-parking asterisk-res-phoneprov asterisk-res-pjproject asterisk-res-pjsip-phoneprov asterisk-res-realtime asterisk-res-rtp-asterisk asterisk-res-rtp-multicast asterisk-res-security-log asterisk-res-smdi asterisk-res-sorcery asterisk-res-speech asterisk-res-srtp asterisk-res-timing-timerfd asterisk-res-xmpp asterisk-sounds asterisk-util-smsq asterisk-util-streamplayer asterisk-voicemail
opkg install asterisk-app-voicemail asterisk-res-timing-pthread
opkg install asterisk-chan-*
opkg install --nodeps --verify-program $(command -v true) --cache /dev/null asterisk-chan-*
The /usr/sbin/asterisk was running as an asterisk user.
I have permission denied on /dev/ttyUSB0,1, my quick fix is on every modem reconnection:
chown asterisk /dev/ttyUSB*
Is there another better option to change the permission denied error on /dev/ttyUSB?
chan_alsa load error!!!
openwrt-20.02 for LINKIT7688
running follow command. chan_alsa found a error.
root@OpenWrt:/# ll /dev/snd/
drwxrwxrwx 2 root root 120 Apr 25 08:06 ./
drwxr-xr-x 5 root root 1040 Apr 25 08:06 ../
crwxrwxrwx 1 root audio 116, 0 Apr 25 08:06 controlC0
crwxrwxrwx 1 root audio 116, 24 Apr 25 08:06 pcmC0D0c
crwxrwxrwx 1 root audio 116, 16 Apr 25 08:06 pcmC0D0p
crwxrwxrwx 1 root audio 116, 33 Apr 25 08:06 timer
root@OpenWrt:/# /etc/init.d/asterisk restart
root@OpenWrt:/# asterisk -ddddvvvvr
Seeding global EID '0c:cf:89:23:f7:55' from 'br-lan' using 'siocgifhwaddr'
Parsing /etc/asterisk/asterisk.conf
Asterisk 18.2.2, Copyright (C) 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 18.2.2 currently running on OpenWrt (pid = 3592)
Core debug was OFF and is now 4.
OpenWrt*CLI> module load chan_alsa.so
Unable to load module chan_alsa.so
Command 'module load chan_alsa.so ' failed.
[Apr 28 03:41:58] ERROR[3661]: chan_alsa.c:188 alsa_card_init: snd_pcm_open failed: No such file or directory
[Apr 28 03:41:58] ERROR[3661]: chan_alsa.c:284 soundcard_init: Problem opening alsa capture device
== No sound card detected -- console channel will be unavailable
== Turn off ALSA support by adding 'noload=chan_alsa.so' in /etc/asterisk/modules.conf
[Apr 28 03:43:46] WARNING[3608]: asterisk.c:3404 canary_thread: The canary is no more. He has ceased to be! He's expired and gone to meet his maker! He's a stiff! Bereft of life, he rests in peace. His metabolic processes are now history! He's off the twig! He's kicked the bucket. He's shuffled off his mortal coil, run down the curtain, and joined the bleeding choir invisible!! THIS is an EX-CANARY. (Reducing priority)
[Apr 28 03:43:46] WARNING[3608]: asterisk.c:1781 set_priority_all: Unable to set regular thread priority on main thread
OpenWrt*CLI>
I check that alsa only support stereo. It's not support mono. I think if it's problem. and HOW to do let chan_alsa working?
root@OpenWrt:/# arecord -Dhw:0 -f cd -r 8000 -c 1 -t wav /tmp/rec.wav
Recording WAVE '/tmp/rec.wav' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
arecord: set_params:1349: Channels count non available
I create a /etc/asound.conf file.
root@OpenWrt:/etc# cat /etc/asound.conf
pcm_slave.sl3 {
pcm "hw:0,0"
format S16_LE
channels 2
rate 48000
}
pcm.ess_alsa {
type plug
slave sl3
}
and modify /etc/asterisk/alsa.conf
; To set which ALSA device to use, change this parameter
input_device=ess_alsa
output_device=ess_alsa
module load chan_alsa
no error and warring message. but When I dial chan_alsa, asterisk serer dead.
Connected to Asterisk 18.2.2 currently running on OpenWrt (pid = 3909)
Core debug was OFF and is now 5.
OpenWrt*CLI> module load chan_alsa.so
Loaded chan_alsa.so
== Registered channel type 'Console' (ALSA Console Channel Driver)
Loaded chan_alsa.so => (ALSA Console Channel Driver)
[Apr 28 04:54:24] ERROR[3959]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("OpenWrt", "(null)", ...): Name does not resolve
[Apr 28 04:54:24] WARNING[3959]: acl.c:890 resolve_first: Unable to lookup 'OpenWrt'
-- Executing [100@from-internal:1] Answer("PJSIP/6001-00000000", "") in new stack
> 0x8b3470 -- Strict RTP learning after remote address set to: 192.168.0.101:4004
-- Executing [100@from-internal:2] Wait("PJSIP/6001-00000000", "1") in new stack
> 0x8b3470 -- Strict RTP switching to RTP target address 192.168.0.101:4004 as source
-- Executing [100@from-internal:3] Playback("PJSIP/6001-00000000", "hello-world") in new stack
-- <PJSIP/6001-00000000> Playing 'hello-world.gsm' (language 'en')
-- Executing [100@from-internal:4] Hangup("PJSIP/6001-00000000", "") in new stack
== Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/6001-00000000'
[Apr 28 04:54:31] ERROR[3959]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("OpenWrt", "(null)", ...): Name does not resolve
[Apr 28 04:54:31] WARNING[3959]: acl.c:890 resolve_first: Unable to lookup 'OpenWrt'
-- Executing [9000@from-internal:1] Dial("PJSIP/6001-00000001", "Console/Alsa,30") in new stack
<< Call placed to 'Alsa' on console >>
<< Auto-answered >>
-- Called Console/Alsa
-- ALSA/ess_alsa answered PJSIP/6001-00000001
> 0x8b3470 -- Strict RTP learning after remote address set to: 192.168.0.101:4006
-- Channel ALSA/ess_alsa joined 'simple_bridge' basic-bridge <a3565565-c873-483e-a22a-b3a1880a3bbc>
-- Channel PJSIP/6001-00000001 joined 'simple_bridge' basic-bridge <a3565565-c873-483e-a22a-b3a1880a3bbc>
[Apr 28 04:54:31] WARNING[3982][C-00000002]: chan_alsa.c:571 alsa_indicate: Don't know how to display condition 26 on ALSA/ess_alsa
[Apr 28 04:54:31] WARNING[3982][C-00000002]: chan_alsa.c:571 alsa_indicate: Don't know how to display condition 26 on ALSA/ess_alsa
> 0x8b3470 -- Strict RTP switching to RTP target address 192.168.0.101:4006 as source
OpenWrt*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
Asterisk ending (0).
I've never tried Asterisk 18 on Openwrt so I can't help you, anyway I would suggest you not to use asterisk versions higher than 16 (openWRT 19.xxx), Asterisk 18 for OpenWRT seems to be too buggy.
thanks your reponse. I will continue to check it.
Good day.
Installed on Mi WIFI Router 3G v1 OpenWrt 21.02 RC1.
I am very pleased with the work. would like to configure asterisk_18.4.0-1
available in OpenWrt. Are there any differences in installation from the instructions that you provided.
Where can you also see the role of all Asterisk components?
I would not like to install everything. And some ipk-s have not intuitive naming, and their function in telephony is not clear.
A good start is here, not updated but almost all asterisk modules are unchanged since then.
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/asterisk-CHP-5-SECT-1.html
Hello sir, thank you for this topic, when I pick the call incoming/outcoming: I hear just shh.. then the call ends after 10s then the dongle get disconnected. Any idea why this is happening.
Router:
Huawei EchoLife HG553.
Exroot configured
Openwrt tested on 21 & 18 & 19
Asterisk tested 13 & 16
Welcome, that's not how this forum works.