That's because of the restrictions of the TON type you've probably set
(0x01h, "International"). That makes Kannel to expect at least 7
digits.

You could ask your SMSC operator to correctly set the format to send 7
characters or you could patch Kannel to not enforce that rule. That's
easily done on gw/smsc_smpp.c. I've made a small patch to make it
easier for you:

Index: smsc_smpp.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.97
diff -r1.97 smsc_smpp.c
351,352c351,352
<         if (octstr_len(addr) < 7) {
<             error(0, "SMPP[%s]: Mallformed addr `%s', expected at
least 7 digits. ",
---
        if (octstr_len(addr) < 3) {
            error(0, "SMPP[%s]: Mallformed addr `%s', expected at least 3 digits. 
",

BTW, this rule should be avoidable, maybe from the conf file, since
many SMSC operators seems to be using TON=1 with addr < 7.

Hope it helps.

Alejandro Guerrieri
On 11/6/06, Mario Noboa <[EMAIL PROTECTED]> wrote:

Hi Mark,



I had the same problem. Source address should be least 7 digits, but like
you my operator send me, only 3 or 4. I spoke with then and refuse to make
any changes.



This validation should be optional. Well I had to make a change, in kannel
source in the file smsc_smpp.c, I changed it to accept 3 digits in the
validation, and works fine.



I know that is and smpp implementation error of smpp, but it depents of the
operator too.



I hope it help you.



Mario




________________________________


De: Mirza Aamir Raza Khan [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 03 de Noviembre de 2006 17:29
Para: [EMAIL PROTECTED]; [email protected]
Asunto: Malformed Addr Prob with Telenor





Dear Stipe





I am getting the error " malformed addr "192" expect at least 7 digits, I
explored all of your correspondences and tried





So within gw/smsc/smsc_smpp.c:handle_pdu() we would call
the _receive_failed() at appropriate places with the "so long unpacked" PDU
and destroy the message after we have the access.log writen. BTW, reviewing
the code here, I see a bug:

gw/smsc/smsc_smpp.c:1337:  if (pdu->u.deliver_sm.esm_class & (0x04|0x08)) {



where we process currently pdu->type == data_sm ?? this should be
pdu->u.data_sm.esm_class here, right? you are right here, typo. Fixed in
cvs. Thanks!
but nothing changes, error persists, can you please help me out to get rid
of this, TELCO guys refused to make any changes
at there end, we are running our services with Telenor Pakistan in Pakistan.

Regards
mark



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 04/11/2006



--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.28/518 - Release Date: 04/11/2006



--
Alejandro Guerrieri
Magicom
http://www.magicom-bcn.net/
LinkedIn: http://www.linkedin.com/in/aguerrieri

Reply via email to