[asterisk-bugs] [Asterisk 0016278]: [patch] Incoming multiline SMS causes chan_mobile to stop working

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 1 15:38:37 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16278 
====================================================================== 
Reported By:                Artem
Assigned To:                mnicholson
====================================================================== 
Project:                    Asterisk
Issue ID:                   16278
Category:                   Addons/chan_mobile
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-11-18 17:04 CST
Last Modified:              2009-12-01 15:38 CST
====================================================================== 
Summary:                    [patch] Incoming multiline SMS causes chan_mobile to
stop working
Description: 
Hello,

multiline SMS messages makes the channel driver get "out of sync" with the
mobile phone.

Here is an example of an incoming SMS:

+CMGR: \"REC UNREAD\",\"+49xxxxxxxx\",,\"09/11/15,22:35:56+04\"\r\n
Anruf-Info:\r\n
0xxxxxxx hat  versucht Sie anzurufen (15.11. um 22:35 Uhr)\r\n
* Diese SMS ist fuer Sie kostenlos\r\n
\r\n
OK\r\n\

The only part of the SMS that chan_mobile reads is the line
"Anruf-Info:\r\n".
Then it expects the OK response and other (further) commands.

Each command it expects should have this format:
\r\n
COMMAND\r\n

But after receiving this sms the OK message of will look like this for the
channel driver:

OK\r\n
\r\n   <-- next AT command could start, but chan_mobile thinks, that this
is the rest of the OK command)
RING\r\n <-- chan_mobile will start to read in the next command just here

(1st Command would be: OK\r\n\r\n   and the 2nd comand would be RING\r\n
....)

So new incoming commands/responses will not be read in anymore in the
correct format. It will not possible to receive or place new calls and so
on.


I am not sure how to fix this problem. I am thinking about getting the
rest of the message directly in hfp_parse_cmgr by reading from the rfcomm
until we get a \r\nOK\r\n.

What do you think?
====================================================================== 

---------------------------------------------------------------------- 
 (0114480) mnicholson (administrator) - 2009-12-01 15:38
 https://issues.asterisk.org/view.php?id=16278#c114480 
---------------------------------------------------------------------- 
There is a bug in the patch that always causes that message to be printed. 
Please be more specific about where and how the \r\n characters are being
stripped. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-01 15:38 mnicholson     Note Added: 0114480                          
======================================================================




More information about the asterisk-bugs mailing list