[asterisk-bugs] [Asterisk 0013471]: exten => s, n, SMS(sms, 2a) causes seg fault
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Sep 17 06:02:33 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=13471
======================================================================
Reported By: alecdavis
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 13471
Category: Applications/app_sms
Reproducibility: always
Severity: crash
Priority: normal
Status: ready for testing
Asterisk Version: 1.6.0-rc6
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 2008-09-12 06:33 CDT
Last Modified: 2008-09-17 06:02 CDT
======================================================================
Summary: exten => s,n,SMS(sms,2a) causes seg fault
Description:
When ever a text comes in from a cellular trunking unit attached to a
TDM400, asterisk will seg fault dropping all calls and restart.
Previously with asterisk 1.4.18, the sms application wasn't working for
us, but at least didn't seg fault in 1.4.18
======================================================================
----------------------------------------------------------------------
(0092611) alecdavis (reporter) - 2008-09-17 06:02
http://bugs.digium.com/view.php?id=13471#c92611
----------------------------------------------------------------------
1: Patch fixes seg fault.
Now with the wrong syntax "exten => s,n,SMS(sms,2a)", asterisk doesn't seg
fault.
For whats it's worth prior to the fix, the first text message to come in
after an asterisk stop/start didn't seg fault, but always the next text
message always reliably seg faulted.
2:-----------Typo------------
Also noticed the Arguements syntax summary from 'core show application
SMS' has a typo. Arguments has a 2nd 's' where I believe it should be 'r'
SMS(name,[a][s][t][p(d)][r][o],addr,body):
Arguments:
a - answer, i.e. send initial FSK packet.
s - act as service centre talking to a phone.
t - use protocol 2 (default used is protocol 1).
p(N) - set the initial delay to N ms (default is 300).
addr and body are a deprecated format to send messages out.
s - set the Status Report Request (SRR) bit.
o - the body should be coded as octets not 7-bit symbols.
3:-------------------
What is the correct syntax for SMS app to pause for 2000ms?
I'm using exten => s,n,SMS(sms,satp2000)
further to this starting at line 1793 of app_sms.c the delay always return
0, thus will then default to 300ms.
if (!ast_strlen_zero(sms_opts[OPTION_ARG_PAUSE]))
h.opause_0 = atoi(sms_opts[OPTION_ARG_PAUSE]);
ast_verb(1, "set delay %dms\n", h.opause_0); /*<<<< Testing >>>>
*/
if (h.opause_0 < 25 || h.opause_0 > 2000)
h.opause_0 = 300; /* default 300ms */
ast_verb(1, "initial delay %dms\n", h.opause_0);
Finally, forcing it to 2000 after the above still didn't appear to wait
out 2000 ms.
h.opause_0 = 2000;
So, similar to originally reported, is the only way to get SMS working for
us.
exten => s,n,Answer()
exten => s,n,Wait(2)
exten => s,n,SMS(test,sat)
Issue History
Date Modified Username Field Change
======================================================================
2008-09-17 06:02 alecdavis Note Added: 0092611
======================================================================
More information about the asterisk-bugs
mailing list