Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 7 comments
Open

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

GoogleCodeExporter opened this issue Apr 11, 2015 · 7 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 3 Oct 2013 at 2:43

@GoogleCodeExporter
Copy link
Author

This issue is equal to issue 140

Original comment by [email protected] on 15 Oct 2013 at 2:25

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 3 May 2014 at 9:42

Attachments:

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 19 May 2014 at 8:18

Attachments:

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 29 Oct 2014 at 7:10

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 29 Oct 2014 at 7:52

@GoogleCodeExporter
Copy link
Author

Thanx mio. Patch working fine...

Original comment by [email protected] on 22 Nov 2014 at 6:08

wdoekes added a commit to wdoekes/asterisk-chan-dongle that referenced this issue Sep 5, 2015
Author: mio
Source: bg111#153

Not using full 3GPP version from https://code.google.com/p/
  asterisk-chan-dongle/issues/detail?id=140 because of the issues
described there.

This should simply fix that you don't get a truncated SMS because of an
@ sign.
@wdoekes
Copy link

wdoekes commented Sep 5, 2015

First patch included here: wdoekes@afb8d70

wdoekes added a commit to wdoekes/asterisk-chan-dongle that referenced this issue Sep 5, 2015
Author: mio
Source: bg111#153

Not using full 3GPP version from https://code.google.com/p/
  asterisk-chan-dongle/issues/detail?id=140 because of the issues
described there.

This should simply fix that you don't get a truncated SMS because of an
@ sign.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants