danshuk / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
2 stars 0 forks source link

SMS incoming event - 3 newlines. #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enable events and event manager
2. Connect to eventmanager api or just listen to it
3. Get incoming sms event

What is the expected output? What do you see instead?
event should end with \r\n\r\n BUT we've got \r\n\r\n\r\n 

What version of the product are you using? On what operating system?
Linux asterisk 2.6.32-35-generic-pae #78-Ubuntu SMP Tue Oct 11 17:01:12 UTC 
2011 i686

Please provide any additional information below.
Dont know how to handle this error. There is no more problems with /r/n/r/n at 
asterisk just at this ones events.

Original issue reported on code.google.com by aleksand...@gmail.com on 27 Dec 2011 at 9:29

GoogleCodeExporter commented 8 years ago
Event: DongleNewSMS^M
Privilege: call,all^M
Device: life-p-01^M
From: +380968899699^M
LineCount: 1^M
MessageLine0: Abonent +380968899699 namagavsia Vam zatelefonuvaty.^M
^M
^M
Event: DongleNewSMSBase64^M
Privilege: call,all^M
Device: life-p-01^M
From: +380968899699^M
Message: 
QWJvbmVudCArMzgwOTY4ODk5Njk5IG5hbWFnYXZzaWEgVmFtIHphdGVsZWZvbnV2YXR5Lg==^M
^M

Original comment by aleksand...@gmail.com on 28 Dec 2011 at 9:10

GoogleCodeExporter commented 8 years ago
I attached dump in text and hex representation.

What additional information is needed?

Original comment by Chaser.A...@gmail.com on 1 Feb 2012 at 11:50

Attachments:

GoogleCodeExporter commented 8 years ago
temporary fix:
#dongle/manager.c
427c427
<       "%s\r\n",
---
>       "%sEND: END\r\n",

Original comment by aleksand...@gmail.com on 2 Mar 2012 at 5:07

GoogleCodeExporter commented 8 years ago
use DongleNewCMGR or DongleNewSMSBase64 event.
END will not compatible with previews version 

also your "temporary fix:" will wrote 
MessageLine0: HelloEND:END\r\n 

for "Hello" SMS

right solution is escape \r \n symbols but not compatible with previews version
and DongleNewSMS obsoleted with DongleNewCMGR or DongleNewSMSBase64

Original comment by bg_...@mail.ru on 29 Mar 2012 at 5:02