SMS limited to 70 chars?

1,273 views
Skip to first unread message

Adrian Deac

unread,
Sep 14, 2011, 10:11:46 AM9/14/11
to dongle
Hi guys,

I've noticed that I cannot send SMSs longer than 70 chars. I've digged
the sources a little and found out that this is because of the charset
translation to UCS-2. :(
Well, I need to send plain ASCII messages, how can I use the full 160
characters available?

Thank you!

S Adrian

unread,
Sep 14, 2011, 10:17:57 AM9/14/11
to chan_...@googlegroups.com
Add use_ucs2_encoding=no in /etc/asterisk/dongle.conf file

Adrian Deac

unread,
Sep 14, 2011, 10:27:20 AM9/14/11
to dongle
Hi Adrian,

Done that. No change. :(
asterisk*CLI> dongle show device state adyorange
[...]
Use UCS-2 encoding : Yes
USSD use 7 bit encoding : No
USSD use UCS-2 decoding : Yes
[...]

Thank you!

PS: multi romani pe aici...

Paco Gil

unread,
Sep 14, 2011, 10:38:00 AM9/14/11
to chan_...@googlegroups.com
did you reload??

dongle reload now...

bg

unread,
Sep 14, 2011, 3:06:11 PM9/14/11
to dongle

On Sep 14, 9:17 pm, S Adrian <dex...@d3xt3r01.tk> wrote:
> Add use_ucs2_encoding=no in /etc/asterisk/dongle.conf file

I look to my etc/dongle.conf
and can't find 'use_ucs2_encoding'

May be somebody add new feature to chan_dongle? i was delighted
But, no, iiieehhhh

Long time ago, good old chan_datacard implements GSM 7bit alpabet as
equals utf-8 codepoints u0000...u00ff
and GSM 8bit as equals utf-8 codepoints u0000...u00ff, only TEXT mode
for sending and receive sms.

chan_dongle extends this with PDU mode, and fix many bugs with USSD
and SMS.
Append direct PDU send/recv functions!

what bothers you implement PDU encoding/decoding outside asterisk ?

Or asterisk must handle all types of GSM messages like SMS/e-mail/OTA/
MMS... ?

asterisk is still PBX, right?

bg

unread,
Sep 14, 2011, 3:18:53 PM9/14/11
to dongle


On Sep 14, 9:38 pm, Paco Gil <pag...@gmail.com> wrote:
> did you reload??
>
> dongle reload now...

no use_ucs2_encoding setting at all.
forget.


chan_dongle try to decide what encoding use for sending
7bit or UCS-2 (no impelemtation of 8Bit yet)

This check is wrong, see above what 7Bit GSM <=> \u0000 ... \u00ff
mean - send ASCII and will have 160 symbols :)

Ady Deac

unread,
Sep 14, 2011, 3:46:59 PM9/14/11
to chan_...@googlegroups.com
Sure I did. I've actually restarted asterisk. No chance.

Any other ideas?

Ady Deac

unread,
Sep 14, 2011, 3:49:36 PM9/14/11
to chan_...@googlegroups.com
It would also be great to actually be able to feed in the raw SMS bits
and asterisk only to send them to the dongle. This way, every feature
will be provided by some outside application that can be actually a
simple PHP script. :) Depends on what you actually need.

Ady Deac

unread,
Sep 14, 2011, 3:51:32 PM9/14/11
to chan_...@googlegroups.com
Ok, but how do you use 7bit? It would be great to simply switch it over
to 7bit. It will allow me to do what I really want.

Anyways, please see this post too:
http://groups.google.com/group/chan_dongle/browse_thread/thread/1f0b00f022076ef0#

Thanks!

Paco Gil

unread,
Sep 14, 2011, 3:53:43 PM9/14/11
to chan_...@googlegroups.com
On Wed, Sep 14, 2011 at 21:49, Ady Deac <a...@mikesnet.ro> wrote:
It would also be great to actually be able to feed in the raw SMS bits and asterisk only to send them to the dongle. This way, every feature will be provided by some outside application that can be actually a simple PHP script. :) Depends on what you actually need.

Can do it yourself using asterisk manager and pdu features of chan_dongle

Adrian Deac

unread,
Sep 22, 2011, 6:01:16 AM9/22/11
to dongle
Ok, I've managed to modify an PHP PDU class to create even multi-part
SMSs. But I need to know how to retrieve the SMSs from the dongle in
PDU format as well. The error I am receiving is:
[Sep 22 00:41:29] WARNING[3390]: at_response.c:1204 at_response_cmgr:
[orange02] Error parsing incoming message '+CMGR: 0,,90
07910447946400F04014D04379999CA683926EF31B0000119022301452214C0500031C0202D2F332C81DA6A7DFEE30BBCC8AD16038503BED06A5DD2079995E0E83EC6176589C669741F0B03B0C628741E4303D0C22974130D92B067BC960B118C805'
at possition 52: Can't parse OA

This has to do with the characters in the "from" field - it is not an
number, but an alfa-numeric string.

I would be more than happy to extend the PDU class to do the decoding
as well.

Thank you for your help!
Adrian

suboxes

unread,
Mar 21, 2012, 8:11:22 PM3/21/12
to chan_...@googlegroups.com
Adrian,
Were you ever able to overcome the 70 character limit without using PDU mode?
Thanks,
Andrew

Ady Deac

unread,
Mar 22, 2012, 1:44:52 AM3/22/12
to chan_...@googlegroups.com
Hi,

Sorry, I am using PDU since then and never needed to use anything else. I guess it is "lower level", but once you get the chance to use it, you will find it very easy.

Good luck!

suboxes

unread,
Mar 22, 2012, 12:24:21 PM3/22/12
to chan_...@googlegroups.com
What do you use to convert text into PDU format? I have a bash autodialer and would need some way to convert ascii text to the PDU formating? Any help would be appreciated.
Thanks,
Andrew

Ady Deac

unread,
Mar 22, 2012, 1:52:03 PM3/22/12
to chan_...@googlegroups.com
Here you go!
It's an PHP class. Basic PHP programming should be enough.
I am currently trying to make it decode PDU reports too. ;)

Have phun!
pdu.php

suboxes

unread,
Mar 22, 2012, 2:20:55 PM3/22/12
to chan_...@googlegroups.com
Adrian,
Thanks for the code I will take a look at it. I was able to finally able to send more than 70 characters using PDU mode. The reason that my messages were not sending when I was using PDU mode was due to the fact that I did not have my phone numbers in international format ie +1NUMBER for the US. Once I changed that my messages were now delivered. An oversight on my part.
Thanks,
Andrew
Reply all
Reply to author
Forward
0 new messages