Thank you very much Ashwani,
I've seen that line in smsc_smpp.c file, but I thought that if one sets the source-addr-ton (inside kannel config file) to anything else but 1 it would not go into that switch/case; I have not checked the rest of the code, but it seems that if the sender (the one that relays the message) sets its TON to 1 it will perform that check anyhow. I'll take you advice and see what's happening. Best regards, Andrei Ionescu. ________________________________ From: ashwani [mailto:[EMAIL PROTECTED] Sent: Monday, November 26, 2007 8:29 AM To: Andrei Ionescu; users@kannel.org Cc: 'Kannel Users' Subject: RE: SMPP +sign shortcodes, npi/ton and unified-prefix Hi Andrei, I faced the similar problem, here is the solution In implementing kannel 1.4.1, we found that messages were getting rejected by kannel with the following error "Malformed Address, expected at lest 7 char" On checking it was found that Operator SMSC was sending messages with "ton =1" which means international. Now, as per SMPP 3.4, international ton would require destination address of at lest 7 digit. To resolve this issue, we had to change in kannel smpp file where we reduced the minimum digit of destination number to 4 Go to /server-location of kannel/gateway1.4.1/gw/smsc Edit file named smsc_smpp.c and change if (octstr_len(addr) < 7) { to if (octstr_len(addr) < 4) { And then recompile the kannel i.e install the kannel freshly. Hope this help Ashwani Kumar Sr Engineer Professional Service Phone: +91 1126686000 Fax: +91 11 26671230 Mobile: +91 9911761010 Web: www.telegentelecom.com This message contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended exclusively for the use of the addressee(s) named above. Any disclosure, distribution, copying or use of the information by others is strictly prohibited. If you are not the addressee, or a person responsible for delivering the message to the addressee, or if you have simply received this message in error, please do not make any use of it nor disclose any of its contents to anyone and please advise the sender by immediate reply and delete the original message. E-mails are susceptible to corruption, interception and unauthorized amendment, Tele-Gen does not accept any liability for any such changes or for their consequences and maintains the right to take legal action where necessary. Thank you for your co-operation and compliance. ________________________________ From: Andrei Ionescu [mailto:[EMAIL PROTECTED] Sent: Saturday, November 24, 2007 7:58 PM To: users@kannel.org Subject: SMPP +sign shortcodes, npi/ton and unified-prefix Hello everyone, I do have a problem with the short codes starting prefixed with a + sign. I've tried anything I could image but I've run out of ideas. Long story short: we should receive SMS messages from another service provider...They got the messages from few mobile operators and re-route those messages to us using an SMPP link. All is fine and working except for this one provider which appends the +sign in front of the short-code (the others don't). I've tried different settings but with no luck...The messages are either ignored completely or I got the "Mallformed addr `15747', expected at least 7 digits." error. I understood that this error is normally because of the TON set to international...but we don't have it set like that. Here is what I've tried to set in the Kannel config: source-addr-ton = 0 or 5 or even 3 source-addr-npi = 0 or 1 dest-addr-ton = 0 or 5 or even 3 dest-addr-npi = 0 or 1 unified-prefix = "157,+157" or "15747,+15747" I also tried to set bind-addr-ton and bind-addr-npi without luck. Any help is greatly appreciated. Best regards, Andrei Ionescu.
<<image001.gif>>