Closed jospezial closed 3 years ago
Is there somebody who would like to have a look at the sources and provide a fix? @kochstefan @arnysch Are you using asterisk_channel_lantiq, do you want to improve it? Has DTMF worked once? Maybe the fix is simple for someone with programming skills. @jslachta Do you have a solution? Am I the only one using telephony on a lantiq device?
Hi @jospezial,
I am sorry, I have a terrible message for you. I do not have any Lantiq device to fix it and debug it on.
I want to help you, but without buying a Lantiq device and learning all the API I need to fix it, I cannot fix it. If this has worked before, there might be some regression. The code of the channel Lantiq needs a refresh to work with the current version of Asterisk.
To identify whether it worked before, you can try this on OpenWrt 18.06 on two versions of Asterisk (asterisk13 and asterisk15).
I am going to leave this issue open for some time.
I wish I could have helped you.
Kind regards Jiri
Environment: MIPS Lantiq, Easybox 904xDSL (VGV952CJW33-E-IR), built from OpenWrt git master. Asterisk-18.4.0: https://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-18.4.0-summary.html
Modules: asterisk-chan-lantiq (with res_timing_timerfd.so), asterisk-chan-dongle (master):
https://github.com/wdoekes/asterisk-chan-dongle/commits
Description: Calls are terminated (VoIP, GSM) when sending a DTMF number. Asterisk terminated with signal SIGSEGV, Segmentation fault.
GSM:
[DTMF[21344][C-00000006] channel.c: DTMF end '5' received on TAPI/1, duration 0 ms
[DTMF[21344][C-00000006] channel.c: DTMF begin emulation of '5' with duration 100 queued on TAPI/1
root@EasyBOX: $ [31727.310394] do_page_fault(): sending SIGSEGV to asterisk for invalid read access from 00000004
[31727.317851] epc = 004e34dd in asterisk[400000+16d000]
[31727.322835] ra = 00469b77 in asterisk[400000+16d000]
[31727.815596] INFO: Upstream packet fifo full[ch(0)]!
VoIP:
---
-- SIP/sipgate-00000000 answered TAPI/1
-- phone indication "Stop tone"
[DEBUG[9361][C-00000002]: chan_lantiq.c:805 ast_lantiq_answer: Remote end has answered call.
[DEBUG[9361][C-00000002]: chan_lantiq.c:944 lantiq_conf_enc: Configuring encoder to use TAPI codec type 9 (alaw) on channel 0
-- phone indication "Stop tone"
-- Channel SIP/sipgate-00000000 joined 'simple_bridge' basic-bridge <5a3a0e78-6434-4221-9c65-a77b27fa5a30>
-- Channel TAPI/1 joined 'simple_bridge' basic-bridge <5a3a0e78-6434-4221-9c65-a77b27fa5a30>
-- phone indication "Unknown"
[DEBUG[7788]: chan_lantiq.c:1517 lantiq_dev_event_digit: on port 0 detected digit "8"
[DEBUG[7788]: chan_lantiq.c:1505 lantiq_send_digit: Port 0 transmitting digit "8"
[ DTMF[9361][[ 377.939769] do_page_fault(): sending SIGSEGV to asterisk for invalid read access from 00000004
[ 377.948210] epc = 004e34dd in asterisk[400000+16d000]
[ 377.953310] ra = 00469b77 in asterisk[400000+16d000]
C-00000002]: channel.c:3866 __ast_read: DTMF end '8' received on TAPI/1, duration 0 ms
[May 7 21:38:07] DTMF[9361][C-00000002]: channel.c:3893 __ast_read: DTMF begin emulation of '8' with duration 100 queued on TAPI/1
EasyBOX*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
root@EasyBOX: $ [ 378.458913] INFO: Upstream packet fifo full[ch(0)]!
[ 388.458913] INFO: Upstream packet fifo full[ch(0)]!
[ 398.458914] INFO: Upstream packet fifo full[ch(0)]!
[ 408.458914] INFO: Upstream packet fifo full[ch(0)]!
[ 418.458916] INFO: Upstream packet fifo full[ch(0)]!
[ 428.458926] INFO: Upstream packet fifo full[ch(0)]!
root@EasyBOX: $ [ 438.458910] INFO: Upstream packet fifo full[ch(0)]!
/etc/init.d/asterisk restart
[32287.815597] INFO: Upstream packet fifo full[ch(0)]!
root@EasyBOX: $ logrea[32292.740520] MPS cmd_err interrupt!
[32292.742528] MPS cmd_err interrupt!
[32292.745945] MPS cmd_err interrupt!
[32292.752021]
[32292.752021] !!! cErrHdlr cause 0x0025, cHdr 0x0600E000
[32292.758434] MPS cmd_err interrupt!
[32292.761034] Read Cmd MBX cmderr.
[32292.764080] Read Cmd MBX cmderr.
[32292.767120] CPU 0 Unable to handle kernel paging request at virtual address 000000a4, epc == 8586d988, ra == 858c3488
[32292.777808] Oops[#1]:
[32292.779909] CPU: 0 PID: 21539 Comm: kworker/0:1 Tainted: G C 5.4.116 #0
[32292.787925] Workqueue: TAPIevents 0x858c0000
[32292.792083] $ 0 : 00000000 00000001 00000000 00000000
[32292.797304] $ 4 : 00000088 00000007 00000001 0000026f
[32292.802526] $ 8 : 0000002e 00000000 4d425820 636d6465
[32292.807749] $12 : 0000026f 7e800000 00000000 000ba8b0
[32292.812971] $16 : 85b08000 85be5124 86b44638 00000000
[32292.818194] $20 : 00000000 00000000 00000000 80940000
[32292.823418] $24 : 00000003 00000010
[32292.828638] $28 : 83c7e000 83c7fe40 810059c0 858c3488
[32292.833863] Hi : 0000004c
[32292.836734] Lo : 66666798
[32292.839683] epc : 8586d988 IFXOS_MutexGet+0x8/0x40 [drv_ifxos]
[32292.845693] ra : 858c3488 IFX_TAPI_Event_Dispatch_ProcessCtx+0x108/0xefc [drv_tapi]
[32292.853533] Status: 1100ff03 KERNEL EXL IE
[32292.857713] Cause : 00800008 (ExcCode 02)
[32292.861715] BadVA : 000000a4
[32292.864589] PrId : 00019556 (MIPS 34Kc)
[32292.868501] Modules linked in: rt3883_iNIC rt2800pci rt2800mmio rt2800lib qcserial pppoe ppp_async option cdc_mbim wireguard usb_wwan sierra_net sierra rt2x00pci rt2x00mmio rt2x00lib rndis_host qmi_wwan pptp pppox ppp_synctty ppp_mppe ppp_generic nf_flow_table_ipv6 nf_flow_table_ipv4 nf_flow_table_inet mac80211 libchacha20poly1305 libblake2s iptable_nat ipt_REJECT huawei_cdc_ncm cfg80211 cdc_ncm cdc_ether xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state xt_recent xt_quota xt_pkttype xt_physdev xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_iface xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connlabel xt_connbytes xt_comment xt_cgroup xt_bpf xt_addrtype xt_TCPMSS xt_REDIRECT xt_PROTO xt_NETMAP xt_MASQUERADE xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet ts_fsm ts_bm spidev spi_gpio spi_bitbang slhc poly1305_mips nlmon nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota
[32292.868792] nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_flow_offload nft_ct nft_counter nft_chain_nat nf_tables_set nf_tables nf_reject_ipv6 nf_reject_ipv4 nf_nat_tftp nf_nat_snmp_basic nf_nat_rtsp nf_nat_pptp nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda nf_nat nf_log_ipv4 nf_log_common nf_flow_table_hw nf_flow_table nf_conntrack_tftp nf_conntrack_snmp nf_conntrack_sip nf_conntrack_rtsp nf_conntrack_pptp nf_conntrack_netlink nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp nf_conntrack_broadcast ts_kmp nf_conntrack_amanda nf_conncount ltq_deu_vr9 libcurve25519_generic libcrc32c libblake2s_generic iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables hso hid_generic gpio_74x164 drv_vmmc crc_ccitt compat chacha_mips cdc_wdm cdc_acm br_netfilter asn1_decoder fuse act_connmark nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred
[32292.956051] act_gact hid eb904_keypad matrix_keymap i2c_gpio i2c_algo_bit i2c_dev i2c_core ledtrig_usbport ledtrig_oneshot ledtrig_gpio cryptodev xt_set x_tables ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink msdos ip6_gre ip_gre gre ifb ip6_tunnel netlink_diag tunnel6 ip_tunnel veth tun snd_rawmidi snd_seq_device snd_pcm_oss snd_pcm snd_timer snd_mixer_oss snd_hwdep snd_compress snd soundcore vfat fat dm_mirror dm_region_hash dm_log dm_crypt dm_mod dax nls_utf8 nls_iso8859_1 nls_cp437 drv_tapi eeprom_93cx6 vxlan udp_tunnel ip6_udp_tunnel drv_ifxos fb_ili9341_eb904 sha1_generic kpp ecb authenc arc4 fbtft(C) backlight sysimgblt sysfillrect syscopyarea fb_sys_fops fb font ledtrig_transient fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd
[32293.043634] gpio_button_hotplug exfat(C) mii
[32293.134861] Process kworker/0:1 (pid: 21539, threadinfo=d3addfb7, task=5fc71e12, tls=00000000)
[32293.143462] Stack : 8083e2b0 00000025 0600e000 00000000 87304500 8074d91c 00000000 00000000
[32293.151816] 86b44638 867bbc80 810059c0 fffb5400 00000000 8004ac6c 810059c0 810059c0
[32293.160172] 00000008 810059e4 80930000 80940000 867bbc80 867bbc94 810059c0 00000008
[32293.168527] 810059e4 80930000 80940000 8004b028 00000001 807520f4 00000000 8074da88
[32293.176883] 8093bbd4 8083d070 867bb600 867bb900 84f81de0 867bbc80 8004aec0 80840000
[32293.185239] ...
[32293.187737] Call Trace:
[32293.190180] [<8586d988>] IFXOS_MutexGet+0x8/0x40 [drv_ifxos]
[32293.195864] [<8074d91c>] __schedule+0x51c/0x648
[32293.200358] Code: 2402ffff 1080000d 00000000 <8c83001c> 24020001 14620009 00000000 27bdffe8 afbf0014
[32293.210048]
[32293.211758] ---[ end trace d02b26481a642375 ]---
[32293.216151] Kernel panic - not syncing: Fatal exception
[32293.221384] Rebooting in 3 seconds..
@kochstefan @arnysch - we need your help.
@zuzia-dev you should not have that bug with recent asterisk releases since the asterisk crash is fixed in https://github.com/openwrt/telephony/issues/597
@zuzia-dev Do you still have your bug with (openwrt) master gits?
I've made a quick fix that prevents termination of asterisk 18 after entering DTMF digit: https://github.com/kochstefan/asterisk_channel_lantiq/commit/2f029ec8778420538c8151c6aceba0f7b44b07c9#diff-25a6634263c1b1f6fc4697a04e2b9904ea4b042a89af59dc93ec1f5d44848a26
@jslachta: I've running asterisk 16, and that version does not terminate the call without that fix. With that fix asterisk 18 does not terminate the call anymore.
Asterisk 18 will pass the sipgate DTMF test call (calling the short number 10020) with that quick fix using chan_lantiq <-> chan_local <-> chan_sip
It would be a nice thing if someone inserts a piece of code to implement ast_lantiq_read(), ast_lantiq_exception() and other non-implemented functions. Afterwards, just create a pull request.
@micmac1: Is it possible to update the 21.02 and master telephony feed of openwrt? To include the fix into 21.02.1?
@kochstefan Thank you for taking your time for this. I will test it soon. @jslachta @micmac1 do we want to switch asterisk-chan-lantiq to use https://github.com/kochstefan/asterisk_channel_lantiq or do we want to add the 2 commits there as patches in telephony?
@kochstefan in chan_lantiq.c there is led control. I can`t find anything about that in /etc/asterisk/lantiq.conf. How do I activate it?
Update: sipgate DTMF test succeeded with asterisk 18 and pjsip, too. (Previous succeeded with asterisk 18 and chan-sip)
@jospezial Look at lines 2124-2133, it seems that LED named using a fixed string + channel number.
Sorry, forgot about this. I'll also cherry-pick this to 21.02. Thanks all!
OK, 21.02 is also done. I hope it makes the next point release, which could happen today if I'm not mistaken. Closing this issue now.
Maintainer: @jslachta @kochstefan @arnysch can you help? Environment: MIPS lantiq, VGV7510KW22 (o2 Box 6431) OpenWRT master head, asterisk-18.3.0, pjsip, chan-lantiq Description: After #597 was fixed, calls are terminated when sending a DTMF number.
https://github.com/kochstefan/asterisk_channel_lantiq/blob/1d940b38cde0348dfe129d2b764e6faee440c45b/src/channels/chan_lantiq.c#L814-L819
Maybe it has something to do with the use of "timer" and https://github.com/asterisk/asterisk/commit/fd823225a6e80cc3974c9ca45eb74d433a7d689b