asterisk-chan-dongle icon indicating copy to clipboard operation
asterisk-chan-dongle copied to clipboard

Unexpected service closeing

Open gonsalez-ru opened this issue 4 years ago • 5 comments

After executed in dialplan DongleSendSMS application Asterisk shuting down:

 [messages]
 exten => _X.,1,NoOp("${EXTEN} ${MESSAGE(body)}")
 exten => _X.,n,DongleSendSMS(gsm1,${EXTEN},"${MESSAGE(body)}")
 exten => h,n,Hangup()
Asterisk Ready.
    -- Executing [+79161234567@messages:1] NoOp("Message/ast_msg_queue", ""+79161234567 456"") in new stack
    -- Executing [+79161234567@messages:2] DongleSendSMS("Message/ast_msg_queue", "gsm1,+79161234567,"456"") in new stack
gate*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
Asterisk ending (0). 

P.S. CLI "dongle sms" command works fine

gonsalez-ru avatar Sep 18 '20 11:09 gonsalez-ru

I need your advise. What diagnostic actions can i do to gather additional debug information?

gonsalez-ru avatar Sep 19 '20 13:09 gonsalez-ru

Start the asterisk daemon from gdb:

# gdb `which asterisk`
(gdb) run asterisk -c

And then do the dongle stuff.

Then when it crashes, do:

bt
bt full

That should show you some info.

wdoekes avatar Sep 19 '20 15:09 wdoekes

Since i use precompiled for mipsel router chan_dongle module i'm limited in debugging toools. I didn't find GDB packet for my platform and I'm not familar with exotic cross compilation. :-(

gonsalez-ru avatar Sep 19 '20 17:09 gonsalez-ru

Perhaps dmesg tells you at least an address (ip instruction pointer). Which you might be able to look up through addr2line. You may need to do some hexadecimal math to get the right value.

wdoekes avatar Sep 19 '20 21:09 wdoekes

Here is dmesg out: do_page_fault(): sending SIGSEGV to asterisk for invalid read access from 00000000 epc = 76b34540 in libc-2.27.so[76aad000+17a000] ra = 756eb6f0 in chan_dongle.so[756e8000+3c000]

There are two packets installed with libc: opkg files libc | grep libc-2.27.so /opt/lib/libc-2.27.so

opkg files gcc | grep libc-2.27.so /opt/lib/gcc/mipsel-openwrt-linux-gnu/7.4.0/libc-2.27.so

gonsalez-ru avatar Oct 02 '20 05:10 gonsalez-ru