Hi Hafez, You have several options for workaround:
1) disable concatenation (its the most simple, and most "clean" solution, though of course it limits you very much) 2) make all temporary errors permanent. to do that you will need to modify function smpp_status_to_smscconn_failure_reason in gw/smsc/smsc_smpp.c This will make Kannel consider any error as permanent and drop a message without retrying. However, chances are you will lose messages with this so your application will have to deal with it... 3) modify functions handle_split and bb_smscconn_send_failed in gw/bb_smscconn.c - there (in handle_split) is the reason of this behavior. I have a simple patch for this (attaching), however you should know that this patch might result in some of the messages (among those concatenated messages that originally fail) be broken when delivered to target - depending on your configuration. It works for me with my configuration because (a) all smscs in my setup have explicit smsc-id's (which apparently isnt required by kannel), and (b) all of smscs in my config allow only themselves (allow-smsc-id = <value of smsc-id>) What the patch actually does is throws a *part* that failed back into main kannel queue - so if your gateway can do rerouting of messages between different smscs, this may result in parts of same message be routed via different smscs , in which case the message will not be reconstructed by the handset... We had a brief discussion in devel list about what is needed for the real solution, but i still had no time to look deeper into it, neither had any of the developers i guess (my bugreport is still open ;) ) Regards, Konstantin 2010/1/18 hafez ahmad <hafezad...@gmail.com> > Hi, > > Thanks guys for help, Konstantin your right I note that this problem > happend with concatenated SMS only, I tried to send 1 sms to the same users > and I did not get the connection stuck. > > I will provide the logs today for the bug report. > > but is there temporary solution for this issue? > > Regards, > Hafez > > > 2010/1/18 Nikos Balkanas <nbalka...@gmail.com> > >> Hi, >> >> Actually 2 SMS keep looping. The one to xxx6855 is standalone, the other >> to xxx4220 has 3 parts. The log size is not sufficient to show if it exceeds >> the sms-resend-retry = 5 limit (5x for xxx6855, 4.3 for xxx4220), but >> certainly the sms-resend-freq = 1200 is violated. Since it is a reported >> bug, it needs to be looked after in the code. >> >> @Hafez: Could you please supplement the bug report by Konstantin, making >> sure your logs are longer than sms-resend-retry = 5 if you want to >> demonstrate "infinite" looping (or reduce your retry limit). >> >> BR, >> Nikos >> >> ----- Original Message ----- >> *From:* Konstantin Vayner <konstan...@appcell.net> >> *To:* Nikos Balkanas <nbalka...@gmail.com> ; hafez >> ahmad<hafezad...@gmail.com> >> *Cc:* users <users@kannel.org> >> *Sent:* Monday, January 18, 2010 2:59 AM >> *Subject:* Re: Kannel ignoring sms-resend-retry >> >> Hi guys, >> >> Actually, this thing looks a lot like the problem i had recently. >> >> The brief is like the following: >> >> 1) a *concatenated* message is being sent (am i right here, Hafez? i think >> yours are concatenated because i see pdu size 140 in all the samples i've >> seen in your log...) >> 2) one or more parts of the message fail with *temporary* error >> 3) the link is still alive (e.g. remote smsc throws temporary error - in >> your case Message Queue Full, in mine it was System Error) >> >> these 3 together lead to *infinite* retry without delay at all, disobeying >> both sms-resend-freq and sms-resend-retry (tested on 1.4.1 , 1.4.3 and cvs) >> see this bugreport: http://redmine.kannel.org/issues/show/529 >> >> >> Regards, >> Β Konstantin >> >> 2010/1/18 Nikos Balkanas <nbalka...@gmail.com> >> >>> Hi, >>> Β >>> Actually, kannel obeys strictly the sms-resend-retry = 5 you specified. >>> It will retry 5 times to resend the SMS before aborting. You seem to confuse >>> throttling with max-pending-submits. Please read user guide on that. >>> Β >>> I imagineΒ that your problem is with sms-resend-freq = 1200, and why it >>> resends the SMS every 1" instead of waiting 1200". I would have to check the >>> code for that. >>> Β >>> Meanwhile, comment out the wait-ack = 1, it doesn't make sense in your >>> setup and the default value is better. >>> Β >>> BR, >>> NikosΒ >>> >>> ----- Original Message ----- >>> *From:* hafez ahmad <hafezad...@gmail.com> >>> *To:* Nikos Balkanas <nbalka...@gmail.com> >>> *Cc:* users@kannel.org >>> *Sent:* Sunday, January 17, 2010 4:22 PM >>> *Subject:* Re: Kannel ignoring sms-resend-retry >>> >>> Dear Nikos, >>> >>> Thanks for your kind feedback. >>> >>> please find the attached log and the config below: >>> >>> group = core >>> admin-port = 14000 >>> smsbox-port = 14005 >>> admin-password = ******** >>> status-password = ******** >>> admin-allow-ip = "localhost" >>> log-file = "/logs/kannel.log" >>> log-level = 0 >>> box-deny-ip = "*.*.*.*" >>> box-allow-ip = "127.0.0.1" >>> ........ >>> ........ >>> dlr-storage = internal >>> sms-resend-freq = 1200 >>> sms-resend-retry = 5 >>> >>> >>> group = smsc >>> smsc = smpp >>> smsc-id = MYSMPP >>> host = XXX.XXX.XXX.XXX >>> port = xxxxx >>> transceiver-mode = 1 >>> smsc-username = "*******" >>> smsc-password = ******** >>> system-type = "*******" >>> allowed-smsc-id = MYSMPP >>> interface-version = 34 >>> address-range = "808080" >>> max-pending-submits = 1 >>> reconnect-delay = 30 >>> source-addr-ton = 5 >>> source-addr-npi = 1 >>> dest-addr-ton = 1 >>> dest-addr-npi = 1 >>> bind-addr-ton = 1 >>> bind-addr-npi = 1 >>> wait-ack = 1 >>> wait-ack-expire = 0x02 >>> msg-id-type = 0x00 >>> log-file = /logs/808080.log >>> log-level = 0 >>> >>> thanks and Regards, >>> Hafez >>> >>> 2010/1/17 Nikos Balkanas <nbalka...@gmail.com> >>> >>>> Hi, >>>> Β >>>> Please post detailed BB logs showing the problem and configuration. >>>> Β >>>> BR, >>>> Nikos >>>> >>>> ----- Original Message ----- >>>> *From:* hafez ahmad <hafezad...@gmail.com> >>>> *To:* users@kannel.org >>>> *Sent:* Sunday, January 17, 2010 10:55 AM >>>> *Subject:* Kannel ignoring sms-resend-retry >>>> >>>> Dears, >>>> >>>> >>>> I the following error: >>>> >>>> Β SMSC returned error code 0x00000014 (Message Queue Full) in response >>>> to submit_sm >>>> >>>> As I know that errorΒ happenedΒ eitherΒ >>>> >>>> I am sending SMS more than the operator allowed me Β - (Β alreadyΒ I am >>>> using max-pending-submit = 1) >>>> >>>> ORΒ >>>> >>>> there are some users have full sms queue in the SMSC. >>>> >>>> I contact my operator and he found the some users haveΒ Β full sms queue >>>> , I set the followingΒ >>>> >>>> sms-resend-freq = 1200 >>>> sms-resend-retry = 5 >>>> >>>> wait-ack = 1Β >>>> wait-ack-expire = 0x02 >>>> >>>> but the kannelΒ ignoringΒ theΒ sms-resend-retry and stillΒ tryingΒ to >>>> send it again. >>>> >>>> >>>> Please Any Ideas, how can I solve this problem. >>>> >>>> Regards, >>>> Hafez >>>> >>>> >>> >>> >>> -- >>> Hafez A.Ahmad >>> Amman-Jordan >>> mobile: 962-795708728 >>> http://blog.hafezadnan.com >>> >>> >> > > > -- > Hafez A.Ahmad > Amman-Jordan > mobile: 962-795708728 > http://blog.hafezadnan.com >
bb_smscconn.diff
Description: Binary data