atefsaeed2010 / asterisk-chan-dongle-01

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

SMS that includes @ sign gets truncated at the @ sign #153

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Send a SMS to chan_dongle device with @ sign 
2. When SMS received by chan_dongle device message text truncated at @ sign

What is the expected output? What do you see instead?
Complete SMS without truncating at @ sign 

What version of the product are you using? On what operating system?
Dongle: Huawei K3765
Platform: Raspberry PI
OS: rasPBX 3.6.11+ #408, Asterisk: 11.3.0, FreePBX: 2.11.0.0rc1.2
chan_dongle version: Version 1.1, Revision 16

Please provide any additional information below.
${BASE64_DECODE(${SMS_BASE64})} in /etc/asterisk/extensions_custom.conf but 
this does not remove the problem. 

Original issue reported on code.google.com by amila....@gmail.com on 3 Oct 2013 at 2:43

GoogleCodeExporter commented 9 years ago
This issue is equal to issue 140

Original comment by smart.st...@gmail.com on 15 Oct 2013 at 2:25

GoogleCodeExporter commented 9 years ago
Here is a patch (against 1.1.r14) that addresses exactly this issue (not the 
issue with the other characters mappings mentioned in the duplicate). 

Original comment by mio...@gmail.com on 3 May 2014 at 9:42

Attachments:

GoogleCodeExporter commented 9 years ago
The was a bug in the previous patch, '@' was occasionally appended to the 
message. This one is good.

--- char_conv.c 2014-03-17 20:33:28.295992057 +0100
+++ char_conv.c 2014-05-03 23:35:33.408746302 +0200
@@ -235,11 +235,19 @@ static ssize_t hexstr_7bit_to_char (cons
                c = (c >> 1) | b;
                b = ((unsigned char) hexval) >> (8 - s);

+               if (c == 0 && i + 1 < in_length) // miopa: fix bug when 
receiving sms with @ in text
+               {
+                       c = '@';
+               }
                out[x] = c;
                x++; s++;

                if (s == 8)
                {
+                       if (b == 0 && i + 1 < in_length) // miopa: fix bug when 
receiving sms with @ in text
+                       {
+                               b = '@';
+                       }
                        out[x] = b;
                        s = 1; b = 0;
                        x++;

Original comment by mio...@gmail.com on 19 May 2014 at 8:18

Attachments:

GoogleCodeExporter commented 9 years ago
DEAR   @mio    i can confirm this patch is working
thank you very much  for this patch

what about @ symbol in outgoing sms  who is discussed    at 
https://code.google.com/p/asterisk-chan-dongle/issues/detail?id=181

can you make one more patch for @ symbol in outgoing sms

Original comment by shabbira...@gmail.com on 29 Oct 2014 at 7:10

GoogleCodeExporter commented 9 years ago
If you need both sending and receiving, use the patch here 
https://code.google.com/p/asterisk-chan-dongle/issues/detail?id=140. Everything 
works well but occasionally @ is appended to the received SMS (as described in 
the issue).

Original comment by mio...@gmail.com on 29 Oct 2014 at 7:52

GoogleCodeExporter commented 9 years ago
Thanx mio. Patch working fine...

Original comment by joeman.6...@gmail.com on 22 Nov 2014 at 6:08