RE: Same Sequence Number for many PDUs

2014-12-10 Thread Lam Nguyen Tuong
:) I have similar situation but from the MO direction where upstream SMSC 
delivers message to kannel.
My DLR table was not be indexed too, when the DLR queue is big enough (~50K dlr 
messages), kannel is very slow to generate deliver_sm_resp back to SMSC, thus 
SMSC treats that the message has not been delivered (time out), then it keeps 
resend again and again depend on SMSC's retry profile. Indexing the dlr table 
solved my problem. So i think kannel works like this:
1. SMSC deliver_sm sms to kannel BB
2. BB query the DLR table for any queue
3. BB send deliver_sm_resp back to SMSC

Once the step 2 takes a long time, the repeated SMS will be happen.
I believe Stipe has the clear answer.

::Lamnt

Date: Wed, 10 Dec 2014 16:23:42 +0200
Subject: Re: Same Sequence Number for many PDUs
From: amir.mahm...@egyptlinx.com
To: st...@kannel.org
CC: users@kannel.org

Hello Stipe,
Actually i have detected the root cause behind this strange behavior, i'm using 
mysql storage for my dlrs pool and i didn't create index for the dlr table 
which leads to lacks in Kannel performance.
I don't know why the above reason causes this critical issue as Kannel couldn't 
handle the PDUs that are coming from SMSC (submit_sm_resp, deliver_sm) 
which causes charging the customers twice at least based on the number of 
trials kannel made to submit the SMS.
I have attached the corresponding pcap file for this issue for your reference 
(for example, just filter using smpp.sequence_number == 867).
Thanks for your follow up on this issue.
Regards,Amir
On Mon, Dec 8, 2014 at 8:45 PM, Stipe Tolj st...@kannel.org wrote:
Am 26.11.2014 20:51, schrieb Amir Mahmoud:


Hello Guys,



I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,



I have found that when i submit SMS to my number and after receiving it

on my handset that kannel still keeps the sms on the store trying to

re-submit it again and again to the SMSC and with each attempt i receive

it again on my handset and finally after finishing the retrials kannel

log it with status DISCARD 



I have set the bearerbox in debug mode and found that kannel already

sent submit_sm successfully PDU but it didn't receive submit_sm_resp

and i think this is the reason behind keeping it in the store and

discard it.



So, i have taken tcp dump and found that both submit_sm PDU and

submit_sm_resp already sent but i can't understand why kannel didn't

handle it Also i have found unusual thing while checking the dump, i

found that many PDUs are having the sequence number (Enquire_Link 

Submit_SM)



Is that normal and why kannel is doing so ?




please provide corresponding log file and tcpdump (pcap) parts of this so we 
can look into it.



Stipe



-- 

---

Kölner Landstrasse 419

40589 Düsseldorf, NRW, Germany



tolj.org system architecture  Kannel Software Foundation (KSF)

http://www.tolj.org/  http://www.kannel.org/



mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org

---


  

Re: Same Sequence Number for many PDUs

2014-12-10 Thread Alvaro Cornejo
Hi

Which indexes have you added to tables?

Regards

|-|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS
y GPRS online
  Visitenos en www.perusms.com

On Wed, Dec 10, 2014 at 9:55 AM, Lam Nguyen Tuong lam...@outlook.com
wrote:

 :) I have similar situation but from the MO direction where upstream SMSC
 delivers message to kannel.
 My DLR table was not be indexed too, when the DLR queue is big enough
 (~50K dlr messages), kannel is very slow to generate deliver_sm_resp back
 to SMSC, thus SMSC treats that the message has not been delivered (time
 out), then it keeps resend again and again depend on SMSC's retry profile.
 Indexing the dlr table solved my problem. So i think kannel works like this:
 1. SMSC deliver_sm sms to kannel BB
 2. BB query the DLR table for any queue
 3. BB send deliver_sm_resp back to SMSC

 Once the step 2 takes a long time, the repeated SMS will be happen.
 I believe Stipe has the clear answer.

 ::Lamnt

 --
 Date: Wed, 10 Dec 2014 16:23:42 +0200
 Subject: Re: Same Sequence Number for many PDUs
 From: amir.mahm...@egyptlinx.com
 To: st...@kannel.org
 CC: users@kannel.org


 Hello Stipe,

 Actually i have detected the root cause behind this strange behavior, i'm
 using mysql storage for my dlrs pool and i didn't create index for the dlr
 table which leads to lacks in Kannel performance.

 I don't know why the above reason causes this critical issue as Kannel
 couldn't handle the PDUs that are coming from SMSC (*submit_sm_resp,
 deliver_sm*) which causes charging the customers twice at least based
 on the number of trials kannel made to submit the SMS.

 I have attached the corresponding pcap file for this issue for your
 reference (for example, just filter using smpp.sequence_number == 867).

 Thanks for your follow up on this issue.

 Regards,
 Amir

 On Mon, Dec 8, 2014 at 8:45 PM, Stipe Tolj st...@kannel.org wrote:

 Am 26.11.2014 20:51, schrieb Amir Mahmoud:

  Hello Guys,

 I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

 I have found that when i submit SMS to my number and after receiving it
 on my handset that kannel still keeps the sms on the store trying to
 re-submit it again and again to the SMSC and with each attempt i receive
 it again on my handset and finally after finishing the retrials kannel
 log it with status DISCARD 

 I have set the bearerbox in debug mode and found that kannel already
 sent submit_sm successfully PDU but it didn't receive submit_sm_resp
 and i think this is the reason behind keeping it in the store and
 discard it.

 So, i have taken tcp dump and found that both submit_sm PDU and
 submit_sm_resp already sent but i can't understand why kannel didn't
 handle it Also i have found unusual thing while checking the dump, i
 found that many PDUs are having the sequence number (Enquire_Link 
 Submit_SM)

 Is that normal and why kannel is doing so ?


 please provide corresponding log file and tcpdump (pcap) parts of this so
 we can look into it.

 Stipe

 --
 ---
 Kölner Landstrasse 419
 40589 Düsseldorf, NRW, Germany

 tolj.org system architecture  Kannel Software Foundation (KSF)
 http://www.tolj.org/  http://www.kannel.org/

 mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
 ---





Re: Same Sequence Number for many PDUs

2014-12-08 Thread Stipe Tolj

Am 26.11.2014 20:51, schrieb Amir Mahmoud:

Hello Guys,

I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

I have found that when i submit SMS to my number and after receiving it
on my handset that kannel still keeps the sms on the store trying to
re-submit it again and again to the SMSC and with each attempt i receive
it again on my handset and finally after finishing the retrials kannel
log it with status DISCARD 

I have set the bearerbox in debug mode and found that kannel already
sent submit_sm successfully PDU but it didn't receive submit_sm_resp
and i think this is the reason behind keeping it in the store and
discard it.

So, i have taken tcp dump and found that both submit_sm PDU and
submit_sm_resp already sent but i can't understand why kannel didn't
handle it Also i have found unusual thing while checking the dump, i
found that many PDUs are having the sequence number (Enquire_Link 
Submit_SM)

Is that normal and why kannel is doing so ?


please provide corresponding log file and tcpdump (pcap) parts of this 
so we can look into it.


Stipe

--
---
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture  Kannel Software Foundation (KSF)
http://www.tolj.org/  http://www.kannel.org/

mailto:st_{at}_tolj.org   mailto:stolj_{at}_kannel.org
---



Re: Same Sequence Number for many PDUs

2014-11-30 Thread Amir Mahmoud
I have tried the latest kannel from svn with no luck, still facing the same
issue.

My server is Xen-based HVM, and i have some doubts that kannel is not
acting properly in a virtualized environment. it seems that PDUs are
malformed or can't handle the flow of them properly.

I have already many dedicated servers with kannel installed for many years
and i didn't face such behavior before with them, the issue started to
appear with my HVM servers only.

Regards,
Amir

On Thu, Nov 27, 2014 at 5:54 PM, Amir Mahmoud amir.mahm...@egyptlinx.com
wrote:

 Hi Alvaro,

 I have tested this issue with many subscribers phones and all of them are
 having the same behavior, the SMS is received but kannel state it as
 DISCARD meanwhile the tcp dump that i have extracted from my firewall shows
 that the SMSC had actually submitted the corresponding submit_sm_resp PDU
 but it seems that kannel ignored it or couldn't match it properly.

 Regards,
 Amir

 On Thu, Nov 27, 2014 at 5:44 PM, Alvaro Cornejo cornejo.alv...@gmail.com
 wrote:

 Hi

 It does happen with some phones when your phone memory/sim is full. In
 those phones, it fails to report smsc that it received the last sms that
 fits its memory; therefore smsc never receives the delivered PDU, and thus
 kannel retries until it expires. This usually happens when storing sms on
 SIM.

 Try to delete some sms from phone memory and sim.

 Regards

 Alvaro




 |-|
 Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
 celular y Nextel
 en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via
 SMS y GPRS online
   Visitenos en www.perusms.com

 On Wed, Nov 26, 2014 at 8:38 PM, Tapan Kumar Thapa 
 tapan.thapa2...@gmail.com wrote:

 Have you tried latest kannel from svn?

 Sent from my Windows Phone
 --
 From: Amir Mahmoud amir.mahm...@egyptlinx.com
 Sent: 27-11-2014 01:21
 To: users users@kannel.org
 Subject: Same Sequence Number for many PDUs

 Hello Guys,

 I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS
 7,

 I have found that when i submit SMS to my number and after receiving it
 on my handset that kannel still keeps the sms on the store trying to
 re-submit it again and again to the SMSC and with each attempt i receive it
 again on my handset and finally after finishing the retrials kannel log it
 with status DISCARD 

 I have set the bearerbox in debug mode and found that kannel already
 sent submit_sm successfully PDU but it didn't receive submit_sm_resp
 and i think this is the reason behind keeping it in the store and discard
 it.

 So, i have taken tcp dump and found that both submit_sm PDU and
 submit_sm_resp already sent but i can't understand why kannel didn't
 handle it Also i have found unusual thing while checking the dump, i found
 that many PDUs are having the sequence number (Enquire_Link 
 Submit_SM)

 Is that normal and why kannel is doing so ?

 Regards,
 Amir






Re: Same Sequence Number for many PDUs

2014-11-27 Thread Alvaro Cornejo
Hi

It does happen with some phones when your phone memory/sim is full. In
those phones, it fails to report smsc that it received the last sms that
fits its memory; therefore smsc never receives the delivered PDU, and thus
kannel retries until it expires. This usually happens when storing sms on
SIM.

Try to delete some sms from phone memory and sim.

Regards

Alvaro



|-|
Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
celular y Nextel
en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS
y GPRS online
  Visitenos en www.perusms.com

On Wed, Nov 26, 2014 at 8:38 PM, Tapan Kumar Thapa 
tapan.thapa2...@gmail.com wrote:

 Have you tried latest kannel from svn?

 Sent from my Windows Phone
 --
 From: Amir Mahmoud amir.mahm...@egyptlinx.com
 Sent: 27-11-2014 01:21
 To: users users@kannel.org
 Subject: Same Sequence Number for many PDUs

 Hello Guys,

 I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

 I have found that when i submit SMS to my number and after receiving it on
 my handset that kannel still keeps the sms on the store trying to re-submit
 it again and again to the SMSC and with each attempt i receive it again on
 my handset and finally after finishing the retrials kannel log it with
 status DISCARD 

 I have set the bearerbox in debug mode and found that kannel already sent
 submit_sm successfully PDU but it didn't receive submit_sm_resp and i
 think this is the reason behind keeping it in the store and discard it.

 So, i have taken tcp dump and found that both submit_sm PDU and
 submit_sm_resp already sent but i can't understand why kannel didn't
 handle it Also i have found unusual thing while checking the dump, i found
 that many PDUs are having the sequence number (Enquire_Link 
 Submit_SM)

 Is that normal and why kannel is doing so ?

 Regards,
 Amir



Re: Same Sequence Number for many PDUs

2014-11-27 Thread Amir Mahmoud
Hi Alvaro,

I have tested this issue with many subscribers phones and all of them are
having the same behavior, the SMS is received but kannel state it as
DISCARD meanwhile the tcp dump that i have extracted from my firewall shows
that the SMSC had actually submitted the corresponding submit_sm_resp PDU
but it seems that kannel ignored it or couldn't match it properly.

Regards,
Amir

On Thu, Nov 27, 2014 at 5:44 PM, Alvaro Cornejo cornejo.alv...@gmail.com
wrote:

 Hi

 It does happen with some phones when your phone memory/sim is full. In
 those phones, it fails to report smsc that it received the last sms that
 fits its memory; therefore smsc never receives the delivered PDU, and thus
 kannel retries until it expires. This usually happens when storing sms on
 SIM.

 Try to delete some sms from phone memory and sim.

 Regards

 Alvaro




 |-|
 Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier
 celular y Nextel
 en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS
 y GPRS online
   Visitenos en www.perusms.com

 On Wed, Nov 26, 2014 at 8:38 PM, Tapan Kumar Thapa 
 tapan.thapa2...@gmail.com wrote:

 Have you tried latest kannel from svn?

 Sent from my Windows Phone
 --
 From: Amir Mahmoud amir.mahm...@egyptlinx.com
 Sent: 27-11-2014 01:21
 To: users users@kannel.org
 Subject: Same Sequence Number for many PDUs

 Hello Guys,

 I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

 I have found that when i submit SMS to my number and after receiving it
 on my handset that kannel still keeps the sms on the store trying to
 re-submit it again and again to the SMSC and with each attempt i receive it
 again on my handset and finally after finishing the retrials kannel log it
 with status DISCARD 

 I have set the bearerbox in debug mode and found that kannel already sent
 submit_sm successfully PDU but it didn't receive submit_sm_resp and i
 think this is the reason behind keeping it in the store and discard it.

 So, i have taken tcp dump and found that both submit_sm PDU and
 submit_sm_resp already sent but i can't understand why kannel didn't
 handle it Also i have found unusual thing while checking the dump, i found
 that many PDUs are having the sequence number (Enquire_Link 
 Submit_SM)

 Is that normal and why kannel is doing so ?

 Regards,
 Amir





Same Sequence Number for many PDUs

2014-11-26 Thread Amir Mahmoud
Hello Guys,

I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

I have found that when i submit SMS to my number and after receiving it on
my handset that kannel still keeps the sms on the store trying to re-submit
it again and again to the SMSC and with each attempt i receive it again on
my handset and finally after finishing the retrials kannel log it with
status DISCARD 

I have set the bearerbox in debug mode and found that kannel already sent
submit_sm successfully PDU but it didn't receive submit_sm_resp and i
think this is the reason behind keeping it in the store and discard it.

So, i have taken tcp dump and found that both submit_sm PDU and
submit_sm_resp already sent but i can't understand why kannel didn't
handle it Also i have found unusual thing while checking the dump, i found
that many PDUs are having the sequence number (Enquire_Link 
Submit_SM)

Is that normal and why kannel is doing so ?

Regards,
Amir


RE: Same Sequence Number for many PDUs

2014-11-26 Thread Tapan Kumar Thapa
Have you tried latest kannel from svn?

Sent from my Windows Phone
--
From: Amir Mahmoud amir.mahm...@egyptlinx.com
Sent: ‎27-‎11-‎2014 01:21
To: users users@kannel.org
Subject: Same Sequence Number for many PDUs

Hello Guys,

I'm facing abnormal behavior with my kannel (1.4.4) installed on CentOS 7,

I have found that when i submit SMS to my number and after receiving it on
my handset that kannel still keeps the sms on the store trying to re-submit
it again and again to the SMSC and with each attempt i receive it again on
my handset and finally after finishing the retrials kannel log it with
status DISCARD 

I have set the bearerbox in debug mode and found that kannel already sent
submit_sm successfully PDU but it didn't receive submit_sm_resp and i
think this is the reason behind keeping it in the store and discard it.

So, i have taken tcp dump and found that both submit_sm PDU and
submit_sm_resp already sent but i can't understand why kannel didn't
handle it Also i have found unusual thing while checking the dump, i found
that many PDUs are having the sequence number (Enquire_Link 
Submit_SM)

Is that normal and why kannel is doing so ?

Regards,
Amir