RoEdAl / asterisk-chan-quectel

Asterisk channel driver for Quectel and SimCOM modules
GNU General Public License v2.0
18 stars 6 forks source link

SMS List segfault Asterisk #16

Closed stich86 closed 4 weeks ago

stich86 commented 3 months ago

hi @RoEdAl,

i'm playing with SMS, looks like each command quectel sms list will make Asterisk segfault:

[158870.080522] asterisk[20190]: segfault at 0 ip 00007f941a13a283 sp 00007f9416021f68 error 4 in libc.so[7f941a137000+4c000]
[158870.081749] Code: b6 03 84 c0 75 f1 48 89 d8 5b c3 0f 1f 40 00 67 e8 42 03 00 00 48 01 c3 48 89 d8 5b c3 66 2e 0f 1f 84 00 00 00 00 00 0f b6 17 <0f> b6 0e b8 01 00 00 00 38 d1 74 1a eb 27 0f 1f 80 00 00 00 00 0f

any idea?

RoEdAl commented 3 months ago
stich86 commented 3 months ago
  • What exactly command you are trying to execute: quectel sms list all, quectel sms list received unread or quectel sms list received read?
  • What module you're using?
  • Please show me more logs right after command invocation at level five if you can.

Here is the output (same behaviour for all three commands)

Connected to Asterisk 20.5.2 currently running on OpenWrt (pid = 24931)
OpenWrt*CLI> core set verbose 5
Console verbose was 4 and is now 5.
OpenWrt*CLI> quectel sms list received
No such command 'quectel sms list received ' (type 'core show help quectel sms list received' for other possible commands)
OpenWrt*CLI> quectel sms list received
read    unread
OpenWrt*CLI> quectel sms list received read
OpenWrt*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups

Here is the module used:

OpenWrt*CLI> quectel show device state quectel0
-------------- Status -------------
  Device                  : quectel0
  State                   : Free
  Audio                   : /dev/ttyUSB1
  Data                    : /dev/ttyUSB2
  Voice                   : Yes
  SMS                     : No
  Manufacturer            : Quectel
  Model                   : RM502Q-GL
  Firmware                : RM502QGLAAR11A02M4G
  IMEI                    : XXXXXX
  IMSI                    : XXXXXX
  ICCID                   : XXXXXX
  GSM Registration Status : Registered, home network
  RSSI                    : 22, -69 dBm
  Access technology       : LTE
  Network Name            : ho.
  Short Network Name      : ho.
  Registered PLMN         : 22210
  Provider Name           : ho.
  Band                    : LTE BAND 3
  Location area code      : XXXX
  Cell ID                 : XXXXX
  Subscriber Number       : Unknown
  SMS Service Center      : +393770001016
  Tasks in queue          : 0
  Commands in queue       : 0
  Call Waiting            : Off
  Current device state    : start
  Desired device state    : start
  When change state       : now
  Calls/Channels          : 0
    Active                : 0
    Held                  : 0
    Dialing               : 0
    Alerting              : 0
    Incoming              : 0
    Waiting               : 0
    Releasing             : 0
    Initializing          : 0

the send command works without any issue

RoEdAl commented 3 months ago

Have you invoked command without specifying a device - i.e. quectel sms list received read instead of quectel sms list received read quectel0?

stich86 commented 3 months ago

Have you invoked command without specifying a device - i.e. quectel sms list received read instead of quectel sms list received read quectel0?

without device crash, with no... shouldn't be necessary instead of crash the whole pbx?

RoEdAl commented 3 months ago

Crashing is a bug of course and should be fixed (hopefully) soon. At minimum chan_quectel should just report missing parameter. But you're right - if no device is specified then command may be addressed to all devices.

stich86 commented 3 months ago

good to know :) thanks for your amazing work! I can finally create my own 5G router and have also VoLTE :)