Unicode SMS Length Calculation

Mesbahuddin Malik <[email protected]>
Newsgroups gmane.comp.mobile.kannel.user
Message-ID <CAG=0pxzqNGUgXysFqaaZ8LwuwkJrug+2b_k_1SRPJtmy9Ta4UA@mail.gmail.com>
Hello Davor Spasoski,
Thanks for Your reply. My Scenario is  that I can I  send an Unicode
Message and giving the scenario of  encoded Result:

On access log after  grep "Sent SMS "
2019-11-26 20:42:05 2019-11-27 01:41:58 REJECTED Send SMS [SMSC:smpp1]
[SVC:mesbah] [ACT:admin] [BINF:][from:giotaas] [to:01833055942]
[flags:-1:2:-1:-1:  31] [msg:416
"Encoded Text"
===================

On PostgreSQL:
The msgdata is encoded

On MySQL
msgdata is encoded
======================================
 From access log  I can see the message length is 416 and which  seems to
be correct    according to Unicode Calculation.
 From Database I can calculate The length easily If  I get  the decoded
text.
 So  can any one suggest how to get decoded value on the db  for msgdata
field ? Or Should I have to modify sqlbox.c and sqlbox_mysql.c ?

Regards
Mesbah




On Wed, Nov 27, 2019 at 5:54 PM Davor Spasoski <[email protected]> wrote:

> Hi,
>
>
>
> I’m not using a DB but I know what your problem is. Namely, access log
> does not show the message splits, only message length with one entry and it
> can be tricky to calculate.
>
>
>
> In cases when unicode (UCS-2 towards the SMPP) is used, the payload is
> limited to 70 two byte signs. The, if the message is longer than 70, the
> concatenation mechanism uses 7 septets if I’m not mistaken (I need to check
> the specs, really), so you need to take that into the calculation.
>
>
>
> I can check later if I find some time.
>
>
>
> *Davor Spasoski*
>
>
>
> *From:* users <[email protected]> *On Behalf Of *Mesbahuddin Malik
> *Sent:* Wednesday, November 27, 2019 12:22 PM
> *To:* [email protected]
> *Cc:* [email protected]
> *Subject:*
>
>
>
> Hello
>
> I need a help on Unicode SMS Length
>
> I have configured Kannel using mysql and also tested on Postgresql.
>
> All are working fine .But the problem is  on  SMS count issue  from
> Database when sms is
>
> sent through unicode.
>
>
>
> From sent_sms table I see the msgdata value is encoded(when sent using
> unicode) and I cannot calculate the Actual character length  as I need it
> for Billing.
>
>
>
> Any suggestions is really appreciable
>
>
>
>
>
> Regards
>
> Mesbah
>
> ------------------------------
>
> Disclaimer: A1 Makedonija DOOEL Skopje
> This e-mail (including any attachments) is confidential and may be
> protected by legal privilege. If you are not the intended recipient, you
> should not copy it, re-transmit it, use it or disclose its contents, but
> should return it to the sender immediately and delete your copy from your
> system. Any unauthorized use or dissemination of this message in whole or
> in part is strictly prohibited. Please note that e-mails are susceptible to
> change. A1 Makedonija DOOEL Skopje shall not be liable for the improper or
> incomplete transmission of the information contained in this communication
> nor for any delay in its receipt or damage to your system.
> Please, do not print this e-mail unless it is necessary! Think about
> saving the environment!
>
> Напомена: А1 Македонија ДООЕЛ Скопје
> Оваа електронска порака (вклучувајќи ги и прилозите) е доверлива и може да
> биде заштитена со правни привилегии. Доколку не сте лицето на кое таа му е
> наменета пораката, не треба да ја копирате, дистрибуирате или да ја
> откривате нејзината содржина, туку веднаш да ја препратите до испраќачот и
> да ја избришете оригиналната порака и сите нејзини копии од Вашиот
> компјутерски систем. Секое неовластено користење на оваа порака во целост
> или делови од истата е строго забрането. Ве молиме да забележите дека
> електронските пораки се подложни на промени. А1 Македонија ДООЕЛ Скопје не
> презема одговорност за несоодветно или нецелосно пренесување на
> информациите содржани во оваа комуникација, ниту пак за било какво
> задоцнување на приемот или оштетувања на вашиот систем.
> Ве молиме не ја печатете оваа порака освен ако не е неопходно! Зачувајте
> ја природата!
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.