RE: OpenSMPPBox won't create DLR

2021-04-29 Thread Rene Kluwen
Hi Martin,

 

About Github: +1 from me, how about the main developer(s) in charge?

 

The force-dlr option is a good idea, but it’s better to implement it in 
bearerbox, as in your use-case you always want it – not just for messages 
relayed via opensmppbox?

I’m not sure if something like that already exists.

 

True, that -besides that- also it needs to be implemented in opensmppbox to 
keep the dlr store.

 

== Rene

 

Van: Martin Caetano  
Verzonden: vrijdag 30 april 2021 02:18
Aan: Rene Kluwen 
CC: us...@kannel.org
Onderwerp: Re: OpenSMPPBox won't create DLR

 

 

Are the submit_sm's sent with registered_delivery set to 1?

 

It wasn’t and that was the issue. Now it is creating the DLR and storing them 
in the db. Thank you!

 

However, for our case this option is inconvenient as we plan to allow customers 
to connect via SMPP and use DLR for tracking billing. If we allow the customers 
to set dlr off we won’t be able to charge them.

 

As a solution I manually edited the opensmppbox.c file and “forced” a dlr-mask 
setting and removed the registered_delivery check: 

 

https://redmine.kannel.org/projects/smppbox/repository/entry/trunk/gw/opensmppbox.c#L1254
 

 

I believe it would be useful to enable this functionality (force-dlr) as an 
option on the smppopenbox settings.

 

I’m happy to send it as a patch if it is considered worth of adding to the 
project.

 

By the way, wouldn’t be better to migrate the kannel to Github and ditch 
subversion? I guess it would encourage more collaboration and make life easier 
for everybody.

 

Martin.





On Apr 29, 2021, at 4:18 PM, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

 

Hi Martin,

Looks like you got opensmppbox setup correctly for dlr.
Adding or omitting sqlbox won't make a difference, like you already saw that
correctly.

Could you list if there is any rows available in the dlr table in your
postgres database?

Are the submit_sm's sent with registered_delivery set to 1?

It could be a msg-id-type issue. I'm not even sure if that's implemented in
opensmppbox.

== Rene


-Oorspronkelijk bericht-
Van: users mailto:users-boun...@kannel.org> > Namens 
Martin Caetano
Verzonden: donderdag 29 april 2021 21:01
Aan: us...@kannel.org <mailto:us...@kannel.org> 
Onderwerp: OpenSMPPBox won't create DLR

I've spent a significant amount of time around this issue. I've read the
complete Kannel guide, SO, Nabble and any other resource I could find yet I
couldn't find any solution or hint on why the DLR aren't being created. 

I believe what I'm trying to do is very straightforward: 

I'm connected using SMPP to OpenSMPPBox, using PostgreSQL and routing to a
SMPP SMSC like this: 

opensmppbox --> sqlbox ->  bearerbox -> smsc 

I can send SMS with no problem to the other end and I can see the pdu
responses back in the logs. However, the DLRs aren't being created as they
are when I use HTTP with smsbox and dlr-mask/dlr-url params. 

It doesn't matter if I remove the sqlbox and use internal storage, the DLRs
are never being created (or at least never appear as created in the logs)
when connecting via smpp to opensmppbox. 

2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1]: throughput (0.00,0.00)
2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP[smsc1]: Got PDU:
2021-04-29 05:28:14 [35121] [6] DEBUG: SMPP PDU 0x7eff380010e0 dump:
2021-04-29 05:28:14 [35121] [6] DEBUG:   type_name: deliver_sm
2021-04-29 05:28:14 [35121] [6] DEBUG:   command_id: 5 = 0x0005
2021-04-29 05:28:14 [35121] [6] DEBUG:   command_status: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   sequence_number: 31 = 0x001f
2021-04-29 05:28:14 [35121] [6] DEBUG:   service_type: NULL
2021-04-29 05:28:14 [35121] [6] DEBUG:   source_addr_ton: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   source_addr_npi: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   source_addr: "xx"
2021-04-29 05:28:14 [35121] [6] DEBUG:   dest_addr_ton: 5 = 0x0005
2021-04-29 05:28:14 [35121] [6] DEBUG:   dest_addr_npi: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   destination_addr: "MySender"
2021-04-29 05:28:14 [35121] [6] DEBUG:   esm_class: 4 = 0x0004
2021-04-29 05:28:14 [35121] [6] DEBUG:   protocol_id: 8 = 0x0008
2021-04-29 05:28:14 [35121] [6] DEBUG:   priority_flag: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   schedule_delivery_time: NULL
2021-04-29 05:28:14 [35121] [6] DEBUG:   validity_period: NULL
2021-04-29 05:28:14 [35121] [6] DEBUG:   registered_delivery: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   replace_if_present_flag: 0 =
0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   data_coding: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   sm_default_msg_id: 0 = 0x
2021-04-29 05:28:14 [35121] [6] DEBUG:   sm_length: 105 = 0x0069
2021-04-29 05:28:14 [35121] [6] DEBUG:   short_message:

RE: Patch for opensmppbox

2020-09-23 Thread Rene Kluwen
+1 for me. Please commit.

 

Van: devel  Namens Alexander Malysh
Verzonden: woensdag 23 september 2020 20:56
Aan: Akis Stamatiou 
CC: devel@kannel.org
Onderwerp: Re: Patch for opensmppbox

 

Hi,

 

looks ok, +1 from me.

 

Any objections or should I commit it ?

 

Thanks,

Alex

 





Am 16.09.2020 um 11:00 schrieb Akis Stamatiou
mailto:akis.stamat...@upstreamsystems.com> >:

 

Dear Kannel,

 

We are submitting for your consideration a patch for opensmppbox.

 

As per https://www.kannel.org/download.shtml#svn, you may find in the email,
as plain text, the output of svn diff.

 

Thank you,

 



  




Akis Stamatiou

Technical Product Manager






  



  



  



  



T   +302106618500 (ext.279)
M   +306986973922
Skype: live:stamprok_1

 

  

 

PRIVILEGED AND CONFIDENTIAL COMMUNICATION

 

This e-mail transmission, and any documents, files or previous e-mail
messages attached to it, may contain confidential information that is
legally privileged. If you are not the intended recipient or a person
responsible for delivering it to the intended recipient, you are hereby
notified that any disclosure, copying, distribution or use of any of the
information contained in or attached to this transmission is STRICTLY
PROHIBITED. If you have received this transmission in error, please: (1)
immediately notify me by reply e-mail, or by collect telephone call; and (2)
destroy the original transmission and its attachments without reading or
saving in any manner.



 



Re: [PATCH] constant SMPP TLV support

2017-10-02 Thread Rene Kluwen

+1 from me.

-- Origineel bericht --
Van: "Stipe Tolj" 
Aan: "devel@kannel.org" 
Verzonden: 2-10-2017 13:03:34
Onderwerp: [PATCH] constant SMPP TLV support


Hi list,

we have a fairly robust construct to add optional TLVs for SMPP SMSCs 
via the meta-data construct, when messages are injected via smsbox's 
sendsms HTTP interface.


Though, it would be nice if we could set "constant default" values for 
smsc-ids that would be set as optional TLVs, even if no values in 
msg->sms.meta_data are provided.


The attached patch implements such a functionality, by allowing to 
define:


 group = smpp-tlv
 name = charging-id
 tag = 0x2010
 type = octetstring
 length = 10
 smsc-id = "smpp_deadend"
 const = "xyz"

and adding the 'const' directive that can set a constant value.

So, if there is no TLV coming via the msg->sms.meta_data part, then the 
constant is set for that particular TLV.


Comments welcome. If no objections, will commit to SVN trunk the coming 
days.


-- Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/ http://www.tolj.org/

st...@kannel.org s...@tolj.org
---





Re: Weighted round-robin SMS load balancer

2017-03-12 Thread Rene Kluwen

There's a commercial product "Routingbox" available that does just that.
Enquiries via me.

== Rene

-- Origineel bericht --
Van: "José Héctor Galimberti" 
Aan: devel@kannel.org
Verzonden: 9-3-2017 6:03:51
Onderwerp: Weighted round-robin SMS load balancer


Anyone have a clue on what happen with this subject?

https://redmine.kannel.org/issues/47

I see that the actual behavior its: (Quoted from:
http://www.kannel.org/pipermail/users/2012-April/017647.html)

"I believe the "load balance" happens only in the sence that if one 
bind is
 busy sending an SMS and a new request comes, instead of queuing it, it 
goes
 to the second bind of the same name, rather than doing "round-robin" 
load
 balancing which seems to be what most people expect/assume. If your 
send

 rate is fairly low, then most messages will leave via the 1st bind."

It would be nice to have a real load balancing between smsc's






__ Información de ESET Smart Security, versión de la base de 
datos

de firmas de virus 15057 (20170308) __

El mensaje fue verificado por ESET Smart Security.

http://www.eset-la.com









opensmppbox patch

2017-01-12 Thread Rene Kluwen

I made a small patch to opensmppbox.

It seems the dlr-type = spool (and others) didn't work at all and made 
opensmppbox crash.


This should be fixed now.

== Rene

Re: Why does octstr_cat() require ostr1 to be non-immutable?

2016-12-25 Thread Rene Kluwen

First of all, let me say that I agree with you.
But a possible way of thinking could have been to make octstr_cat make 
like (or look like) strcat().


== Rene

-- Origineel bericht --
Van: "Werner Coetzee" 
Aan: "devel@kannel.org" 
Verzonden: 21-12-2016 15:39:50
Onderwerp: Why does octstr_cat() require ostr1 to be non-immutable?


Hi



Why does the octstr_cat(Octstr *ostr1, Octstr *ostr2) function in 
gwlib/octstr.c require that ostr1 be non-immutable?


It contains:

gw_assert(!ostr1->immutable);



I can't see any reason for the requirement since ostr1 is never 
modified in octstr_cat() so to me octstr_cat() should work perfectly 
fine/safely if ostr1 is immutable.


And since the requirement is there for ostr1, why is it not there for 
ostr2?  There's no difference in the way that ostr1 and ostr2 is used.




I now have to resort to much slower functions such as octstr_format or 
octstr_insert or octstr_append to get the same result.




My use case:



void myfunc(const Octstr *param) // param should/will not be modified

{

Octstr *newvar = octstr_cat(octstr_imm("PREFIX"), param);  // this 
will panic


// Do something with newvar

}



So my work around is newvar = octstr_format("%s%S", "PREFIX", param); 
but could also have newvar = octstr_create("PREFIX"); 
octstr_append(newvar, param); or even newvar = octstr_duplicate(param); 
octstr_insert(newvar, octstr_imm("PREFIX"), 0);




I would really appreciate it if someone could shed some light on this, 
and if the powers that be agree with me remove the assertion?




Thanks in advance

Werner




  Werner CoetzeeSenior Message Engine Engineer T  +27 21 910 
7700werner.coet...@clickatell.comwww.clickatell.com 



RE: [RFC] New 'box' Kannel Pluginbox

2016-10-12 Thread Rene Kluwen
What exactly do the done() and callback() functions in the plugin structure?

Are they required?

 

== Rene

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Donald Jackson
Verzonden: vrijdag 7 oktober 2016 11:50
Aan: kannel_dev_mailinglist 
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi everyone (again),

 

Thank you for the great feedback yesterday (publicly and privately).

 

I have updated the repository here: 
https://github.com/donald-jackson/kannel-pluginbox

 

And have included the HTTP plugin as promised with an example of how to modify 
and reject traffic. If you have any issues please make use of the issue tracker 
on Github.

 

I'd also like to correct my mistake of only crediting Alejandro in my original 
mail - thanks too to Rene actually started SQLBox ;)

 

Thanks,

Donald

 

On 6 October 2016 at 09:25, Donald Jackson mailto:djack...@kannel.org> > wrote:

Hi everyone,

 

I have started laying the foundations for a new 'box' for Kannel which intends 
to allow users more flexibility in terms of the platform.

 

At the moment there are many ways to get messages into the bearerbox, namely: 
smsbox, wapbox, opensmppbox, smppbox, ksmppd, sqlbox. Some rely on routing in 
their own process and others allow bearerbox to do the routing. What they all 
have in common is they don't allow external or third party applications help 
make decisions at processing time (with the exception of ksmppd/smppbox). 

 

My new planned box is called pluginbox which will basically be like SQLBox - 
but instead of using database callbacks, it will allow linking of dynamic 
libraries (.so|.dylib) which will allow custom 
interception/filtering/modification of message packages to and from various 
boxes.

 

So a hypothetical scenario for this box could be something like

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> PluginBox <--> Bearerbox

 

Or even

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> SQLBox <--> PluginBox <--> Bearerbox

 

For those who want to still make use of SQLBox.

 

My initial design is to use an asynchronous callback chain to allow slow 
plugins to not hold up the processing of faster messages. This would be 
especially useful in the context of people using HTTP and other external 
services to process routing decisions. The plugin would also be able to return 
a status to 'reject' a message packet which would in turn not submit to the 
target receiver.

 

My plan is also to implement at least one example plugin (probably an HTTP 
plugin?) which can show the submission and manipulation of a message packet in 
both directions.

 

So here I am looking for comments.

 

1) Is this something worthwhile doing, does anyone else have a need for this?

2) Are there any considerations you wish to add at this time?

3) Are there any features you would like to see added?

4) Would there be any problem including this in the Kannel repository?

 

Here is the initial version : https://github.com/donald-jackson/kannel-pluginbox

 

Thanks Alejandro for SQLBox, its largely based on your code.

 

Regards,

-- 

Donald Jackson
  http://www.ddj.co.za





 

-- 

Donald Jackson
  http://www.ddj.co.za



RE: [RFC] New 'box' Kannel Pluginbox

2016-10-06 Thread Rene Kluwen
I’ll see what I can do. It’s a great initiative!

Having said that… I don’t have much time. So it may take a while.

 

Van: donaldjs...@gmail.com [mailto:donaldjs...@gmail.com] Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 16:42
Aan: Rene Kluwen 
CC: kannel_dev_mailinglist 
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

That could be possible too, we would just need to expose some methods for 
injection of messages from the plugins.

 

Currently the only mechanisms they have are event driven (on Msg received from 
a Box) - we would need one that you could manually inject from the database 
tables at a non-event time.

 

Pull requests welcome :D

 

On 6 October 2016 at 16:25, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

True, you are right.

“Your” plugins are generally more abstracted. Which is better.

 

Another thing that I was thinking about: Sqlbox can be converted to a plugin. 
No need for an extra box anymore.

 

== Rene

 

 

Van: donaldjs...@gmail.com <mailto:donaldjs...@gmail.com>  
[mailto:donaldjs...@gmail.com <mailto:donaldjs...@gmail.com> ] Namens Donald 
Jackson
Verzonden: donderdag 6 oktober 2016 13:02


Aan: Rene Kluwen mailto:rene.klu...@chimit.nl> >
CC: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi Rene,

 

OK. I am familiar with SMPPBox (have written plugins too ;)) which is why I was 
wondering. The 'problem' with this would be that SMPPBox plugin architecture 
functions on PDUs (submit_sm, deliver_sm, data_sm etc) and not Msg * 
structures, so in order to make the plugins compatible it would need to convert 
messages to and from PDU structs's which may not be an ideal architecture at 
this layer. It also wouldn't be able to deal with authentication (bind_* PDUs) 
as SMPPBox does at the plugin level.

 

Of course if someone else needs this they can write a plugin to do these 
conversions and process :) 

 

Thanks,

Donald

 

 

 

On 6 October 2016 at 12:50, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

This is more Stipe’s area.

But his smppbox uses a plugin structure as well.

If you use the same structure, people can upgrade/downgrade between smppbox 
server and opensmppbox while maintaining plugin compatibility.

 

== Rene

 

Van: donaldjs...@gmail.com <mailto:donaldjs...@gmail.com>  
[mailto:donaldjs...@gmail.com <mailto:donaldjs...@gmail.com> ] Namens Donald 
Jackson
Verzonden: donderdag 6 oktober 2016 11:26
Aan: Rene Kluwen mailto:rene.klu...@chimit.nl> >
CC: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi Rene,

 

Glad to have saved you some work :)


Could you explain what you mean about making it compatible with SMPPBox plugin 
architecture?

 

Thanks,

Donald

 

On 6 October 2016 at 10:55, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

Yeah, I think it’s useful.

Mainly to prevent having a chain of many boxes if you want some extra 
functionality.

In fact, just now I was thinking of making such a box. So you saved me some 
work.

 

Tip: Maybe you can make it source-code compatible with the smppbox server 
plugin architecture.

 

== Rene

 

 

Van: devel [mailto:devel-boun...@kannel.org <mailto:devel-boun...@kannel.org> ] 
Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 9:25
Aan: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: [RFC] New 'box' Kannel Pluginbox

 

Hi everyone,

 

I have started laying the foundations for a new 'box' for Kannel which intends 
to allow users more flexibility in terms of the platform.

 

At the moment there are many ways to get messages into the bearerbox, namely: 
smsbox, wapbox, opensmppbox, smppbox, ksmppd, sqlbox. Some rely on routing in 
their own process and others allow bearerbox to do the routing. What they all 
have in common is they don't allow external or third party applications help 
make decisions at processing time (with the exception of ksmppd/smppbox). 

 

My new planned box is called pluginbox which will basically be like SQLBox - 
but instead of using database callbacks, it will allow linking of dynamic 
libraries (.so|.dylib) which will allow custom 
interception/filtering/modification of message packages to and from various 
boxes.

 

So a hypothetical scenario for this box could be something like

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> PluginBox <--> Bearerbox

 

Or even

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> SQLBox <--> PluginBox <--> Bearerbox

 

For those who want to still make use of SQLBox.

 

My initial design is to use an asynchronous callback chain to allow slow 
plugins to not hold up the processing of faster messages. This would be 
especially useful in the context of people using HTTP and other external 
services to process routin

RE: [RFC] New 'box' Kannel Pluginbox

2016-10-06 Thread Rene Kluwen
True, you are right.

“Your” plugins are generally more abstracted. Which is better.

 

Another thing that I was thinking about: Sqlbox can be converted to a plugin. 
No need for an extra box anymore.

 

== Rene

 

 

Van: donaldjs...@gmail.com [mailto:donaldjs...@gmail.com] Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 13:02
Aan: Rene Kluwen 
CC: kannel_dev_mailinglist 
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi Rene,

 

OK. I am familiar with SMPPBox (have written plugins too ;)) which is why I was 
wondering. The 'problem' with this would be that SMPPBox plugin architecture 
functions on PDUs (submit_sm, deliver_sm, data_sm etc) and not Msg * 
structures, so in order to make the plugins compatible it would need to convert 
messages to and from PDU structs's which may not be an ideal architecture at 
this layer. It also wouldn't be able to deal with authentication (bind_* PDUs) 
as SMPPBox does at the plugin level.

 

Of course if someone else needs this they can write a plugin to do these 
conversions and process :) 

 

Thanks,

Donald

 

 

 

On 6 October 2016 at 12:50, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

This is more Stipe’s area.

But his smppbox uses a plugin structure as well.

If you use the same structure, people can upgrade/downgrade between smppbox 
server and opensmppbox while maintaining plugin compatibility.

 

== Rene

 

Van: donaldjs...@gmail.com <mailto:donaldjs...@gmail.com>  
[mailto:donaldjs...@gmail.com <mailto:donaldjs...@gmail.com> ] Namens Donald 
Jackson
Verzonden: donderdag 6 oktober 2016 11:26
Aan: Rene Kluwen mailto:rene.klu...@chimit.nl> >
CC: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi Rene,

 

Glad to have saved you some work :)


Could you explain what you mean about making it compatible with SMPPBox plugin 
architecture?

 

Thanks,

Donald

 

On 6 October 2016 at 10:55, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

Yeah, I think it’s useful.

Mainly to prevent having a chain of many boxes if you want some extra 
functionality.

In fact, just now I was thinking of making such a box. So you saved me some 
work.

 

Tip: Maybe you can make it source-code compatible with the smppbox server 
plugin architecture.

 

== Rene

 

 

Van: devel [mailto:devel-boun...@kannel.org <mailto:devel-boun...@kannel.org> ] 
Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 9:25
Aan: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: [RFC] New 'box' Kannel Pluginbox

 

Hi everyone,

 

I have started laying the foundations for a new 'box' for Kannel which intends 
to allow users more flexibility in terms of the platform.

 

At the moment there are many ways to get messages into the bearerbox, namely: 
smsbox, wapbox, opensmppbox, smppbox, ksmppd, sqlbox. Some rely on routing in 
their own process and others allow bearerbox to do the routing. What they all 
have in common is they don't allow external or third party applications help 
make decisions at processing time (with the exception of ksmppd/smppbox). 

 

My new planned box is called pluginbox which will basically be like SQLBox - 
but instead of using database callbacks, it will allow linking of dynamic 
libraries (.so|.dylib) which will allow custom 
interception/filtering/modification of message packages to and from various 
boxes.

 

So a hypothetical scenario for this box could be something like

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> PluginBox <--> Bearerbox

 

Or even

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> SQLBox <--> PluginBox <--> Bearerbox

 

For those who want to still make use of SQLBox.

 

My initial design is to use an asynchronous callback chain to allow slow 
plugins to not hold up the processing of faster messages. This would be 
especially useful in the context of people using HTTP and other external 
services to process routing decisions. The plugin would also be able to return 
a status to 'reject' a message packet which would in turn not submit to the 
target receiver.

 

My plan is also to implement at least one example plugin (probably an HTTP 
plugin?) which can show the submission and manipulation of a message packet in 
both directions.

 

So here I am looking for comments.

 

1) Is this something worthwhile doing, does anyone else have a need for this?

2) Are there any considerations you wish to add at this time?

3) Are there any features you would like to see added?

4) Would there be any problem including this in the Kannel repository?

 

Here is the initial version : https://github.com/donald-jackson/kannel-pluginbox

 

Thanks Alejandro for SQLBox, its largely based on your code.

 

Regards,

-- 

Donald Jackson
 <http://www.ddj.co.za/> http://www.ddj.co.za





 

-- 

Donald Jackson
 <http://www.ddj.co.za/> http://www.ddj.co.za





 

-- 

Donald Jackson
 <http://www.ddj.co.za/> http://www.ddj.co.za



RE: [RFC] New 'box' Kannel Pluginbox

2016-10-06 Thread Rene Kluwen
This is more Stipe’s area.

But his smppbox uses a plugin structure as well.

If you use the same structure, people can upgrade/downgrade between smppbox 
server and opensmppbox while maintaining plugin compatibility.

 

== Rene

 

Van: donaldjs...@gmail.com [mailto:donaldjs...@gmail.com] Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 11:26
Aan: Rene Kluwen 
CC: kannel_dev_mailinglist 
Onderwerp: Re: [RFC] New 'box' Kannel Pluginbox

 

Hi Rene,

 

Glad to have saved you some work :)


Could you explain what you mean about making it compatible with SMPPBox plugin 
architecture?

 

Thanks,

Donald

 

On 6 October 2016 at 10:55, Rene Kluwen mailto:rene.klu...@chimit.nl> > wrote:

Yeah, I think it’s useful.

Mainly to prevent having a chain of many boxes if you want some extra 
functionality.

In fact, just now I was thinking of making such a box. So you saved me some 
work.

 

Tip: Maybe you can make it source-code compatible with the smppbox server 
plugin architecture.

 

== Rene

 

 

Van: devel [mailto:devel-boun...@kannel.org <mailto:devel-boun...@kannel.org> ] 
Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 9:25
Aan: kannel_dev_mailinglist mailto:devel@kannel.org> >
Onderwerp: [RFC] New 'box' Kannel Pluginbox

 

Hi everyone,

 

I have started laying the foundations for a new 'box' for Kannel which intends 
to allow users more flexibility in terms of the platform.

 

At the moment there are many ways to get messages into the bearerbox, namely: 
smsbox, wapbox, opensmppbox, smppbox, ksmppd, sqlbox. Some rely on routing in 
their own process and others allow bearerbox to do the routing. What they all 
have in common is they don't allow external or third party applications help 
make decisions at processing time (with the exception of ksmppd/smppbox). 

 

My new planned box is called pluginbox which will basically be like SQLBox - 
but instead of using database callbacks, it will allow linking of dynamic 
libraries (.so|.dylib) which will allow custom 
interception/filtering/modification of message packages to and from various 
boxes.

 

So a hypothetical scenario for this box could be something like

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> PluginBox <--> Bearerbox

 

Or even

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> SQLBox <--> PluginBox <--> Bearerbox

 

For those who want to still make use of SQLBox.

 

My initial design is to use an asynchronous callback chain to allow slow 
plugins to not hold up the processing of faster messages. This would be 
especially useful in the context of people using HTTP and other external 
services to process routing decisions. The plugin would also be able to return 
a status to 'reject' a message packet which would in turn not submit to the 
target receiver.

 

My plan is also to implement at least one example plugin (probably an HTTP 
plugin?) which can show the submission and manipulation of a message packet in 
both directions.

 

So here I am looking for comments.

 

1) Is this something worthwhile doing, does anyone else have a need for this?

2) Are there any considerations you wish to add at this time?

3) Are there any features you would like to see added?

4) Would there be any problem including this in the Kannel repository?

 

Here is the initial version : https://github.com/donald-jackson/kannel-pluginbox

 

Thanks Alejandro for SQLBox, its largely based on your code.

 

Regards,

-- 

Donald Jackson
 <http://www.ddj.co.za/> http://www.ddj.co.za





 

-- 

Donald Jackson
 <http://www.ddj.co.za/> http://www.ddj.co.za



RE: [RFC] New 'box' Kannel Pluginbox

2016-10-06 Thread Rene Kluwen
Yeah, I think it’s useful.

Mainly to prevent having a chain of many boxes if you want some extra 
functionality.

In fact, just now I was thinking of making such a box. So you saved me some 
work.

 

Tip: Maybe you can make it source-code compatible with the smppbox server 
plugin architecture.

 

== Rene

 

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Donald Jackson
Verzonden: donderdag 6 oktober 2016 9:25
Aan: kannel_dev_mailinglist 
Onderwerp: [RFC] New 'box' Kannel Pluginbox

 

Hi everyone,

 

I have started laying the foundations for a new 'box' for Kannel which intends 
to allow users more flexibility in terms of the platform.

 

At the moment there are many ways to get messages into the bearerbox, namely: 
smsbox, wapbox, opensmppbox, smppbox, ksmppd, sqlbox. Some rely on routing in 
their own process and others allow bearerbox to do the routing. What they all 
have in common is they don't allow external or third party applications help 
make decisions at processing time (with the exception of ksmppd/smppbox). 

 

My new planned box is called pluginbox which will basically be like SQLBox - 
but instead of using database callbacks, it will allow linking of dynamic 
libraries (.so|.dylib) which will allow custom 
interception/filtering/modification of message packages to and from various 
boxes.

 

So a hypothetical scenario for this box could be something like

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> PluginBox <--> Bearerbox

 

Or even

 

SMSBox, SMPPBox/KSMPPD, WapBox <--> SQLBox <--> PluginBox <--> Bearerbox

 

For those who want to still make use of SQLBox.

 

My initial design is to use an asynchronous callback chain to allow slow 
plugins to not hold up the processing of faster messages. This would be 
especially useful in the context of people using HTTP and other external 
services to process routing decisions. The plugin would also be able to return 
a status to 'reject' a message packet which would in turn not submit to the 
target receiver.

 

My plan is also to implement at least one example plugin (probably an HTTP 
plugin?) which can show the submission and manipulation of a message packet in 
both directions.

 

So here I am looking for comments.

 

1) Is this something worthwhile doing, does anyone else have a need for this?

2) Are there any considerations you wish to add at this time?

3) Are there any features you would like to see added?

4) Would there be any problem including this in the Kannel repository?

 

Here is the initial version : https://github.com/donald-jackson/kannel-pluginbox

 

Thanks Alejandro for SQLBox, its largely based on your code.

 

Regards,

-- 

Donald Jackson
  http://www.ddj.co.za



RE: [PATCH] KSMPPD (and other?) utility methods for smpp_pdu.c

2016-09-24 Thread Rene Kluwen
Sure, but why not change KSMPPD to use smpp_pdu_pack() function without the 
length?

 

== Rene

 

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Donald Jackson
Verzonden: zaterdag 24 september 2016 12:07
Aan: kannel_dev_mailinglist 
Onderwerp: [PATCH] KSMPPD (and other?) utility methods for smpp_pdu.c

 

Hi all, 

 

Currently KSMPPD runs a patch against Kannel SVN trunk, I believe it would be 
better if we could just include this patch in the mainline Kannel as they don't 
have any negative implications.

 

Currently the smpp_pdu_unpack() function takes data without length but the 
smpp_pdu_pack() function provides length so these two functions are not 
compatible with each other.  This simple patch just allows for compatibility 
convenience.

 

Thanks,

Donald



RE: [PATCH] Reduce logging in dbpool_mysql.c

2016-09-24 Thread Rene Kluwen
I don’t agree completely with your reasoning.

Either you want debug information or you don’t.

Enabling debug information yields a lot of information.

What about if you want to debug the mysql pool usage?

 

Still +0 from me in case it’s redundant info.

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Donald Jackson
Verzonden: zaterdag 24 september 2016 12:03
Aan: kannel_dev_mailinglist 
Onderwerp: [PATCH] Reduce logging in dbpool_mysql.c

 

Hi there, 

 

This is a simple patch to reduce excessive logging output of dbpool_mysql.c

 

As we know many people run their Kannel systems with debug logging enabled so 
running with '-v 1' isn't a solution to this problem and I see no benefit of 
having this repetitive logging.

 

Thanks,

Donald



RE: [PATCH] Memory leak in smpp_pdu.c

2016-09-24 Thread Rene Kluwen
+1 from me.

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Donald Jackson
Verzonden: zaterdag 24 september 2016 12:00
Aan: kannel_dev_mailinglist 
Onderwerp: [PATCH] Memory leak in smpp_pdu.c

 

Hi all, 

 

I have been assisting with a KSMPPD implementation and couldn't figure out why 
the application was leaking memory.

 

After a long search I found that an SMPP client was sending the same TLV 
multiple times which was causing lost pointers/memory leaks.

 

I believe this would effect all Kannel derivatives (OpenSMPPBox, Commercial 
SMPPBox and Bearerbox) in the cases where an incorrectly implemented (or 
malicious?) client or gateway could be the cause of memory leaks.

 

Herewith patch to fix.

 

Thanks,

Donald



RE: [Couldnot parse DLR string sscanf way, fallback to old way. Please report!] -- problem with message id

2016-08-14 Thread Rene Kluwen
Even, the message appears in your log files.
If you set the debug level high enough, you can just see it appear there.

-Oorspronkelijk bericht-
Van: devel [mailto:devel-boun...@kannel.org] Namens Milan P. Stanic
Verzonden: zondag 14 augustus 2016 12:44
Aan: devel@kannel.org
Onderwerp: Re: [Couldnot parse DLR string sscanf way,fallback to old way. 
Please report!] -- problem with message id

On Fri, 2016-08-12 at 15:27, Черепанов Алексей Владиславович wrote:
> Hi, there. Having a problem with handling deliver_sm.
> Kannel couldn't parse message id:
> 
> 2016-08-12 14:45:59 [2952] [6] DEBUG: SMPP[SMSC]: Couldnot parse DLR 
> string sscanf way,fallback to old way. Please report!
> 2016-08-12 14:45:59 [2952] [6] ERROR: SMPP[SMSC]: got DLR but could 
> not find message or was not interested in it id<> dst<79028710256>, 
> type<2>
> 2016-08-12 14:45:59 [2952] [6] DEBUG: message_id: NULL

Look like your provider (upstream SMPP server) does not send 'standard'
DLR message.
Actually there is no standard format for DLR message but most providers format 
it following sample in SMPP specification document.

Could you check with your provider in what format their server send message to 
your kannel. Or, you can extract it with some network capture tools (tcpdump, 
tshark/wireshark) and see in what format messages are.





RE: KSMPPD (alternative Kannel SMPP server) now available

2016-07-14 Thread Rene Kluwen
Great initiative!

We need more of those, keeping Kannel alive :)

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Kurt Neo
Verzonden: woensdag 13 juli 2016 18:36
Aan: devel@kannel.org
Onderwerp: KSMPPD (alternative Kannel SMPP server) now available

 

Hi everyone,

 

I have been working in telecommunications for a while and I've come across both 
OpenSMPPBox and commercial SMPPBox in my career. These are both excellent 
pieces of software but I found certain limitations repeated themselves in large 
scale deployments (large numbers of ESMEs, massive amounts of queues, etc).

 

This is why I decided to make my own attempt at a free and open source SMPP 
server which works with Kannel (connects to bearerbox and/or sqlbox). I won't 
go into too much detail in this initial email but just that the code and readme 
is now available at https://github.com/kneodev/ksmppd

 

As it stands it features database driven authentication + routing (MySQL only 
currently) and also HTTP based authentication + routing as options. It is fully 
asynchronous during the routing chains and also makes use of libevent so it is 
not limited to a thread per ESME.

 

If anyone wishes to contribute code to this - please let me know. I'd happily 
contribute this to the Kannel foundation but I think it deviates too much from 
the principals of the current box mechanisms (billing, etc).

 

Enjoy (I hope).

 

 

 



RE: [PATCH] priority with sqlbox

2016-05-05 Thread Rene Kluwen
Patch commited. Thanks for the contribution.

 

 

Van: Giulio Giovannini [mailto:giulio.giovann...@mobyt.it] 
Verzonden: maandag 2 mei 2016 10:43
Aan: Rene Kluwen 
CC: devel@kannel.org
Onderwerp: Re: [PATCH] priority with sqlbox

 

Actually, I have it working in production and the foreign id is stored in the 
sent_sms table.

 

I probably don't know the code as you do, but if I removed the foreign id it 
was by accident. It wasn't my intention and it should not be needed to make 
this patch work. The priority is just another parameters added to the many 
other we already have in the send_sms table.

 

Almost all changes in the patch are like the one below. You can see that the 
priority is added just before the foreign id.

 

-st_str(msg->sms.boxc_id), st_str(msg->sms.binfo), 
st_str(msg->sms.meta_data), st_str(msg->sms.foreign_id));

+st_str(msg->sms.boxc_id), st_str(msg->sms.binfo), 
st_str(msg->sms.meta_data), st_num(msg->sms.priority), 
st_str(msg->sms.foreign_id));

 

 




--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:  <mailto:giulio.giovann...@mobyt.it> giulio.giovann...@mobyt.it - Web:  
<http://www.mobyt.it/> http://www.mobyt.it

Mobyt ® - messaging services

 

2016-05-02 10:11 GMT+02:00 Rene Kluwen mailto:rene.klu...@chimit.nl> >:

If you look at the patch, you’ll see that the foreign_id field is removed 
completely from the table and it is not stored anymore.

 

Van: Giulio Giovannini [mailto:giulio.giovann...@mobyt.it 
<mailto:giulio.giovann...@mobyt.it> ] 
Verzonden: maandag 2 mei 2016 9:22
Aan: Rene Kluwen mailto:rene.klu...@chimit.nl> >
Onderwerp: Re: [PATCH] priority with sqlbox

 

Hello Rene,

 

I don't get what you mean. What does the 'foreign id' value refer to and why 
would you lose it with this patch?

 

Best regards,

Giulio




--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:  <mailto:giulio.giovann...@mobyt.it> giulio.giovann...@mobyt.it - Web:  
<http://www.mobyt.it/> http://www.mobyt.it

Mobyt ® - messaging services

 

2016-04-29 18:08 GMT+02:00 Rene Kluwen mailto:rene.klu...@chimit.nl> >:

Possibly useful patch. But I think it’s mainly useful for internal purposes, 
where you will be sure you want to sacrifice the loss of getting the foreign id 
value to gain access to the priority field.


So -1 from me to include this in the official repository in this form.

 

== Rene

 

Van: devel [mailto:devel-boun...@kannel.org <mailto:devel-boun...@kannel.org> ] 
Namens Giulio Giovannini
Verzonden: woensdag 27 april 2016 15:04
Aan: devel@kannel.org <mailto:devel@kannel.org> 
Onderwerp: [PATCH] priority with sqlbox

 

Hi all,

 

I needed to be able to pass the 'priority' parameter to the bearerbox using the 
sqlbox so I developed the patch in the attachement.

 

It has been working in production for a while now.

 

My setup is very easy: sqlbox is attached to bearerbox and is used to inject 
SMS into bearerbox with simple inserts in sqlbox MySQL send_sms table. I 
haven't got a smsbox attached to the sqlbox so I don't know if there might be 
issues with that.

 

The patch only works for MySQL.

 

Best regards,

Giulio Giovannini

--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:  <mailto:giulio.giovann...@mobyt.it> giulio.giovann...@mobyt.it - Web:  
<http://www.mobyt.it/> http://www.mobyt.it

Mobyt ® - messaging services

 

 



RE: [PATCH] priority with sqlbox

2016-05-02 Thread Rene Kluwen
If you look at the patch, you’ll see that the foreign_id field is removed 
completely from the table and it is not stored anymore.

 

Van: Giulio Giovannini [mailto:giulio.giovann...@mobyt.it] 
Verzonden: maandag 2 mei 2016 9:22
Aan: Rene Kluwen 
Onderwerp: Re: [PATCH] priority with sqlbox

 

Hello Rene,

 

I don't get what you mean. What does the 'foreign id' value refer to and why 
would you lose it with this patch?

 

Best regards,

Giulio




--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:  <mailto:giulio.giovann...@mobyt.it> giulio.giovann...@mobyt.it - Web:  
<http://www.mobyt.it/> http://www.mobyt.it

Mobyt ® - messaging services

 

2016-04-29 18:08 GMT+02:00 Rene Kluwen mailto:rene.klu...@chimit.nl> >:

Possibly useful patch. But I think it’s mainly useful for internal purposes, 
where you will be sure you want to sacrifice the loss of getting the foreign id 
value to gain access to the priority field.


So -1 from me to include this in the official repository in this form.

 

== Rene

 

Van: devel [mailto:devel-boun...@kannel.org <mailto:devel-boun...@kannel.org> ] 
Namens Giulio Giovannini
Verzonden: woensdag 27 april 2016 15:04
Aan: devel@kannel.org <mailto:devel@kannel.org> 
Onderwerp: [PATCH] priority with sqlbox

 

Hi all,

 

I needed to be able to pass the 'priority' parameter to the bearerbox using the 
sqlbox so I developed the patch in the attachement.

 

It has been working in production for a while now.

 

My setup is very easy: sqlbox is attached to bearerbox and is used to inject 
SMS into bearerbox with simple inserts in sqlbox MySQL send_sms table. I 
haven't got a smsbox attached to the sqlbox so I don't know if there might be 
issues with that.

 

The patch only works for MySQL.

 

Best regards,

Giulio Giovannini

--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:  <mailto:giulio.giovann...@mobyt.it> giulio.giovann...@mobyt.it - Web:  
<http://www.mobyt.it/> http://www.mobyt.it

Mobyt ® - messaging services

 



RE: [PATCH] SMPP DLR item scan (old way)

2016-04-29 Thread Rene Kluwen
+1 from me.

-Oorspronkelijk bericht-
Van: devel [mailto:devel-boun...@kannel.org] Namens Stipe Tolj
Verzonden: woensdag 27 april 2016 14:05
Aan: devel@kannel.org
Onderwerp: [PATCH] SMPP DLR item scan (old way)

Hi list,

we had a case recently with an SMSC that provided the following SMPP DLR
payload:

   id:2516372655 submit date:1604131525 done date:1604131525 stat:DELIVRD

which of course doesn't comply with the official DLR format of SMPP v3.4
spec. Nevertheless, we have a way to scan for needed items of the DLR
payload in gw/smsc/smsc_smpp.c, even if the sscanf() way doesn't work out.

But, it was not recognizing the 'stat:DELIVRD' part, due that it assumes
there is ALWAYS a ' ' character trailing the item sequence, which is not the
case here.

Since we DO only need the msg ID and the stat itself for the DLR lookup,
this would result in a false negative state here, since the stat would not
be recognized and defaults to DLR FAIL.

The following patch simply takes into account that the "fallback mode" 
scan does obey that an item MAY end in the end-of-line, without a space. 
It does not impact any current pattern matching.

If qualified objections arise, I will be committing the patch these days.

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

stolj at kannel.org   st at tolj.org
---




RE: [PATCH] priority with sqlbox

2016-04-29 Thread Rene Kluwen
Possibly useful patch. But I think it’s mainly useful for internal purposes, 
where you will be sure you want to sacrifice the loss of getting the foreign id 
value to gain access to the priority field.


So -1 from me to include this in the official repository in this form.

 

== Rene

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Giulio Giovannini
Verzonden: woensdag 27 april 2016 15:04
Aan: devel@kannel.org
Onderwerp: [PATCH] priority with sqlbox

 

Hi all,

 

I needed to be able to pass the 'priority' parameter to the bearerbox using the 
sqlbox so I developed the patch in the attachement.

 

It has been working in production for a while now.

 

My setup is very easy: sqlbox is attached to bearerbox and is used to inject 
SMS into bearerbox with simple inserts in sqlbox MySQL send_sms table. I 
haven't got a smsbox attached to the sqlbox so I don't know if there might be 
issues with that.

 

The patch only works for MySQL.

 

Best regards,

Giulio Giovannini

--

Mobyt S.p.A.
Via Aldighieri, 10 - 44121 Ferrara - Italy
--
Phone :   +39 0532 207296 - Fax :  
 +39 0532 242952
E-mail:   giulio.giovann...@mobyt.it - Web:  
 http://www.mobyt.it

Mobyt ® - messaging services



RE: [PATCH] SMSC specific 'sms-combine-concatenated-mo[-timeout]'

2016-02-09 Thread Rene Kluwen
Looks like a neccesary patch.

-Oorspronkelijk bericht-
Van: devel [mailto:devel-boun...@kannel.org] Namens Stipe Tolj
Verzonden: dinsdag 9 februari 2016 18:26
Aan: devel@kannel.org
Onderwerp: [PATCH] SMSC specific 'sms-combine-concatenated-mo[-timeout]'

Hi list,

please find attached a proposed patchset for a SMSC specific configuration
of the 'sms-combine-concatenated-mo[-timeout]' config directives.

So you have now the config directives:

   group = smsc
   ...
   sms-combine-concatenated-mo = [yes|no]
   sms-combine-concatenated-mo-timeout = 1800

available.

If they are NOT set in the 'group = smsc' the values (or defaults) of the
global 'group = core' values are applied.

I revised an initial version with this more simpler approach that simply
adds a 'long timeout' in the ConcatMsg struct directly, being able to check
the SMSC specific timeout value at the time the clean-up is running. Added
the fields to the SMSCconn struct and took care they are handled as they
should.

Please review and comment.

--
Best Regards,
Stipe Tolj

---
Düsseldorf, NRW, Germany

Kannel Foundation tolj.org system architecture
http://www.kannel.org/http://www.tolj.org/

stolj at kannel.org   st at tolj.org
---




RE: PATCH: Fix use of uninitialized variable (mysql port) in sqlbox

2015-11-10 Thread Rene Kluwen
Patch committed.

 

Van: devel [mailto:devel-boun...@kannel.org] Namens Vyronas Tsingaras
Verzonden: maandag 9 november 2015 16:41
Aan: spameden 
CC: kannel_dev_mailinglist devel@kannel.org 
Onderwerp: Re: PATCH: Fix use of uninitialized variable (mysql port) in sqlbox

 

Yes and even then, well the signature of mysql_real_connect that is used in 
dbpool_mysql:101 is MYSQL *mysql_real_connect(MYSQL *mysql, const char *host, 
const char *user, const char *passwd, const char *db, unsigned int port, const 
char *unix_socket, unsigned long client_flag). You have to specify a value for 
port and providing '0' instead of an unitialized variable seems best in my 
opinion.

 

Kind Regards,

Vyronas Tsingaras

 

On Mon, Nov 9, 2015 at 5:37 PM, spameden mailto:spame...@gmail.com> > wrote:

That's correct, host should be 'localhost'.

 

2015-11-09 18:31 GMT+03:00 Vyronas Tsingaras mailto:vtsinga...@amdtelecom.net> >:

But according to 
https://dev.mysql.com/doc/refman/5.7/en/mysql-real-connect.html only when host 
is either NULL or "localhost" will mysql_real_connect do UNIX socket 
connection. The 'port' argument only applies to TCP/IP connections and thus 
should default to 0 if not specified.

 

Kind Regards,

Vyronas Tsingaras

 

On Mon, Nov 9, 2015 at 5:24 PM, spameden mailto:spame...@gmail.com> > wrote:

If port wasn't specified that means kannel will use socket instead, so no need 
to specify default port.

 

2015-11-09 17:23 GMT+03:00 Vyronas Tsingaras mailto:vtsinga...@amdtelecom.net> >:

sqlbox would try to connect to random ports on the mysql host if no port was 
defined due to an uninitialized variable use.

 

Index: sqlbox_mysql.c

===

--- sqlbox_mysql.c (revision 55)

+++ sqlbox_mysql.c (working copy)

@@ -396,6 +396,9 @@

 if (have_port) {

 db_conf->mysql->port = mysql_port;

 }

+else {

+db_conf->mysql->port = 3306;

+}

 

 pool = dbpool_create(DBPOOL_MYSQL, db_conf, pool_size);

 gw_assert(pool != NULL);

 

-- 





Vyronas Tsingaras | IT Department


12th Km Thessaloniki - Liti, Zip.57200, Greece


Tel.: +30.23940.20336, Fax: +30.23940.25922


Skype id: vtsingaras.amdtelecom


E-mail:   vtsinga...@amdtelecom.net


  www.amdtelecom.net   


 





Please consider the environment before printing this email


This e-mail message and all attachments transmitted with it are confidential 
and are intended solely for the addressee(s). If the reader of this message is 
not the intended recipient, you are hereby notified that any reading, 
dissemination, distribution, copying, or other use of this message or its 
attachment(s) is strictly prohibited.

 





 

-- 





Vyronas Tsingaras | IT Department


12th Km Thessaloniki - Liti, Zip.57200, Greece


Tel.: +30.23940.20336, Fax: +30.23940.25922


Skype id: vtsingaras.amdtelecom


E-mail:   vtsinga...@amdtelecom.net


  www.amdtelecom.net   


 





Please consider the environment before printing this email


This e-mail message and all attachments transmitted with it are confidential 
and are intended solely for the addressee(s). If the reader of this message is 
not the intended recipient, you are hereby notified that any reading, 
dissemination, distribution, copying, or other use of this message or its 
attachment(s) is strictly prohibited.

 





 

-- 





Vyronas Tsingaras | IT Department


12th Km Thessaloniki - Liti, Zip.57200, Greece


Tel.: +30.23940.20336, Fax: +30.23940.25922


Skype id: vtsingaras.amdtelecom


E-mail:   vtsinga...@amdtelecom.net


  www.amdtelecom.net   


 





Please consider the environment before printing this email


This e-mail message and all attachments transmitted with it are confidential 
and are intended solely for the addressee(s). If the reader of this message is 
not the intended recipient, you are hereby notified that any reading, 
dissemination, distribution, copying, or other use of this message or its 
attachment(s) is strictly prohibited.

 



RE: Throughput discussion

2015-10-26 Thread Rene Kluwen
Thanks for your response.

 

In our case, it’s probably not the message queue issue, because we do
receive a message queue full error on other occasions, seperately.

 

 

Van: marc.bazi...@orange.com [mailto:marc.bazi...@orange.com] 
Verzonden: maandag 26 oktober 2015 8:15
Aan: 'Rene Kluwen' ; devel@kannel.org
Onderwerp: RE: Throughput discussion

 

Hi REne ,

We faced to this behaviour for some smsc supplier, 

The error message is trhtolling error but in fact the smsc did map to this
error when it faced to queue full error on smsc side.

This queue full is receive on the “store and forward” feature from smsc. The
DB were the sm is saved when the subscriber shutdown his mobile , or on
undercover network.

If you don’t know the limit ( on our case it is only 10 max messages in the
queue ) turned off your mobile and send notification, once you will have the
trottling error , you can have the max pessage per subscriber. Do this not
on Nusy hour in case the throttling error is real ;)).

Hope it helps,

Br

Marc

 

De : devel [mailto:devel-boun...@kannel.org] De la part de Rene Kluwen
Envoyé : samedi 24 octobre 2015 01:20
À : devel@kannel.org <mailto:devel@kannel.org> 
Objet : Throughput discussion

 

We are facing a case with the smpp smsc where throughput is set to 20.

Kannel obeys this nicely, according to it’s own message count.

But viewing a tcpdump of the same session, we see that there’s a lot more
messages going out the pipe; like 30 or more.

So Kannel doesn’t seem to count the throughput correctly. This causes
throttling errors, which of course we don’t want. It stalls the throughput
of the entire batch.

 

The questions:

1: Has anybody seen this behaviour before?

2: When is a message “counted” for? Is it upon sending a submit_sm or when
receiving the submit_sm_resp?

 

== Rene

 


_
 
Ce message et ses pieces jointes peuvent contenir des informations
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu
ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou
falsifie. Merci.
 
This message and its attachments may contain confidential or privileged
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and
delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been
modified, changed or falsified.
Thank you.


RE: Throughput discussion

2015-10-25 Thread Rene Kluwen
Yes, it is with one of the latest versions. -r 5148 to be exact.

We expect that it has to do with slow responses to submit_sm pdu’s.

 

== Rene

 

 

Van: Alexander Malysh [mailto:malys...@gmail.com] Namens amal...@kannel.org
Verzonden: zondag 25 oktober 2015 1:05
Aan: Rene Kluwen 
CC: devel@kannel.org
Onderwerp: Re: Throughput discussion

 

Hi Rene,

 

is this with a new version of Kannel?

 

Alex

 

Am 23.10.2015 um 23:19 schrieb Rene Kluwen mailto:rene.klu...@chimit.nl> >:

 

We are facing a case with the smpp smsc where throughput is set to 20.

Kannel obeys this nicely, according to it’s own message count.

But viewing a tcpdump of the same session, we see that there’s a lot more 
messages going out the pipe; like 30 or more.

So Kannel doesn’t seem to count the throughput correctly. This causes 
throttling errors, which of course we don’t want. It stalls the throughput of 
the entire batch.

 

The questions:

1: Has anybody seen this behaviour before?

2: When is a message “counted” for? Is it upon sending a submit_sm or when 
receiving the submit_sm_resp?

 

== Rene

 



Throughput discussion

2015-10-23 Thread Rene Kluwen
We are facing a case with the smpp smsc where throughput is set to 20.

Kannel obeys this nicely, according to it's own message count.

But viewing a tcpdump of the same session, we see that there's a lot more
messages going out the pipe; like 30 or more.

So Kannel doesn't seem to count the throughput correctly. This causes
throttling errors, which of course we don't want. It stalls the throughput
of the entire batch.

 

The questions:

1: Has anybody seen this behaviour before?

2: When is a message "counted" for? Is it upon sending a submit_sm or when
receiving the submit_sm_resp?

 

== Rene

 



RE: how to generate rpm from src

2015-06-15 Thread Rene Kluwen
For opensmppbox and sqlbox "make rpm" should do the trick.

I know it always used to work for me. But I think meanwhile Stipe has made
some changes, so you need the proper autotools, etc.

 

== Rene

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Ajay Patel
Sent: maandag 15 juni 2015 9:41
To: devel@kannel.org
Subject: how to generate rpm from src

 

Hi All,

 

Previously I have used 1.4.2, I have directly install this version using
rpm. But now I wanted to install 1.4.4 (but I could not find rpm) So I have
download and configure source ("
 gateway.tar.gz")
in RHEL 6.4 64bit server, Now I wanted to generate rpm for the same.

 

Can anyone help me for the same? How can I generate rpm.

 

Thanks & Regards,

Ajay Patel

(M) 9228114542

 



RE: kannel dlr.c.patch to track dlr status via database triggers

2014-10-07 Thread Rene Kluwen
Also for that, you can use sqlbox, instead of the dlr table.

-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Anton Osennikov
Sent: zondag 5 oktober 2014 8:15
To: devel@kannel.org
Subject: kannel dlr.c.patch to track dlr status via database triggers

Hi!

Thank you for great work on Kannel project.

We wanted to track SMS DLR delivery via database table, for example to know
when some SMS was actually delivered.

This is almost possible, clear and simple via standard kannel "dlr"
table PLUS database trigger to track "dlr" table changes.

One thing wasn't possible. When kannel receives DLR, it immediately deletes
a record from dlr table, giving no chance for database to track DLR
reception.

I propose a simple patch that forces kannel to first change dlr record
status to "success" or "fail", before it's deletion.

Also attached is MySQL tables and triggers definition to track dlr status.

First table, dlr_wait, is almost the same as standard kannel "dlr"
table, but have more checks, and have uniqie key. Second table, "dlr_track"
is similar to "dlr_wait", but due to triggers, keeps last dlr status for
every sent SMS along with times of dlr creation and update.

Of course, this creates a need to remove old data from "dlr_track" time to
time. It's up to sysadmin.

--
Best regards, Anton Osennikov.




RE: Does opensmppbox and smsbox have serious memory issues?

2014-05-07 Thread Rene Kluwen
Would you happen to have a valgrind output for this?

 

== Rene

 

From: Hanh Le Bich [mailto:hanhmi...@gmail.com] 
Sent: woensdag 7 mei 2014 9:20
To: hbil...@ecommunicate.biz
Cc: Rene Kluwen; af...@list.fink.org; devel@kannel.org
Subject: Re: Does opensmppbox and smsbox have serious memory issues?

 

Hello again,

Hope you are doing great. 
After close monitoring opensmppbox after > 4 days continuous running, I just 
want to inform the mem leak still happen, the box is eating few tens (or nearly 
hundred) byte per day at throughput 100TPS (at max) and keep increasing.

Regards, Hanh.

 



RE: Does opensmppbox and smsbox have serious memory issues?

2014-04-28 Thread Rene Kluwen
Hello Andreas,

 

The smsc_id that is returned by boxc_route_msg_to_smsc is NOT a copy, so it
shouldn't be destroyed afterwards.

But you put the finger on the right spot. There was a memory leak in that
function.

 

I commited attached diff to svn. Please, can somebody test it and see if
this makes _the_ difference for opensmppbox?

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: maandag 28 april 2014 12:51
To: Rene Kluwen
Cc: hbil...@ecommunicate.biz; devel Devel; Hanh Le Bich
Subject: Re: Does opensmppbox and smsbox have serious memory issues?

 

 





==31087== 4,986,528 (77,472 direct, 4,909,056 indirect) bytes in 4,842
blocks are definitely lost in loss record 813 of 813
==31087==at 0x4027434: malloc (vg_replace_malloc.c:291)
==31087==by 0x80970B3: gw_native_malloc (gwmem-native.c:87)
==31087==by 0x80A37A1: octstr_create_from_data_real (octstr.c:263)
==31087==by 0x80A3916: octstr_create_real (octstr.c:245)
==31087==by 0x80A908E: octstr_format_valist_real (octstr.c:2480)
==31087==by 0x80A9366: octstr_format (octstr.c:2469)
==31087==by 0x80534F5: boxc_route_msg_to_smsc (opensmppbox.c:1791)
==31087==by 0x8057AAE: smpp_to_bearerbox (opensmppbox.c:1638)
==31087==by 0x80983AE: new_thread (gwthread-pthread.c:385)
==31087==by 0x46F9C38: start_thread (pthread_create.c:304)
==31087==by 0x482F78D: clone (clone.S:130)

 

this seems to be a leak in opensmppbox in this code segment (handle_pdu) in
opensmppbox.c around line 1634

 

 

case submit_sm:
msg = pdu_to_msg(box, pdu, &reason);
msg2 = msg;
if (msg == NULL) {
   resp = smpp_pdu_create(generic_nack,
pdu->u.submit_sm.sequence_number);
   resp->u.generic_nack.command_status =
SMPP_ESME_RUNKNOWNERR;
}
else {
   Octstr *smsc_id =
boxc_route_msg_to_smsc(box, msg);  <-smsc_id is allocated but never freeed.
   check_multipart(box, msg, &msg_to_send,
&msg2, &parts_list);
   msg->sms.smsc_id = smsc_id ?
octstr_duplicate(smsc_id) : NULL; /* its duplicated here... */
   msg->sms.boxc_id =
octstr_duplicate(box->boxc_id);
   msg_dump(msg, 0);
   resp = smpp_pdu_create(submit_sm_resp,
pdu->u.submit_sm.sequence_number);
   msgid = generate_smppid(msg);
   msg->sms.dlr_url =
octstr_duplicate(msgid);
   resp->u.submit_sm_resp.message_id =
msgid;
   if (msg_to_send) {
   if
(DLR_IS_ENABLED(msg2->sms.dlr_mask)) {
   hold_service =
msg2->sms.service;
   msg2->sms.service
= octstr_format("%ld", msg2->sms.time);
   msgid =
generate_smppid(msg2);
   if (parts_list) {
 
msg2->sms.dlr_url = concat_msgids(msgid, parts_list);
   }
 
dlr_add(box->boxc_id, msgid, msg2);
 
octstr_destroy(msgid);
 
octstr_destroy(msg2->sms.service);
   msg2->sms.service
= hold_service;
   }
   uuid_unparse(msg2->sms.id,
id);
   msgid = octstr_create(id);
   dict_put(box->msg_acks,
msgid, resp);
   octstr_destroy(msgid);
   resp = NULL;
 
send_msg(box->bearerbox_connection, box, msg2);
   if (parts_list) {
   /* destroy values
*/
 
gwlist_destroy(parts_list, msg_destroy_item);
   }
   }

   octstr_destroy(smsc_id); /* fix for this
leak */
}
break;

 

This is a leak which would leak a few bytes per SMS.

 

 



leak.diff
Description: Binary data


RE: Does opensmppbox and smsbox have serious memory issues?

2014-04-28 Thread Rene Kluwen
More people have confirmed this.
Point is that I am not able to reproduce in a test setup.

Could you re-run with:

valgrind --leak-check=full --track-origins=yes ./opensmppbox?

Track origins should be the key. Trying to get this nailed for a while now.

== Rene

-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of
hbil...@ecommunicate.biz
Sent: zondag 27 april 2014 19:25
To: devel@kannel.org
Subject: Does opensmppbox and smsbox have serious memory issues?

Hi Kannel developers,

Hanh posted his Valgrind research to the user group for smsbox and
opensmppbox.  His results seem interesting and so I'm copying them to this
thread so the Kannel developers can view them.
These results can be viewed by following the thread on Wed, Apr 23, 2014 at
3:41 AM, by Hanh Le Bich  with the Subject: Re: 2
Questions re Redis/Debian. (The email subject is not related to this issue.)

His research shows that opensmppbox and smsbox may have serious memory
issues.
I use the word "may" as until others have confirmed his results, there could
be a mistake somewhere.
Is there anyone who has a test environment that can follow his approach and
confirm for the Kannel community if opensmppbox and smsbox have serious
memory issues or if his testing approach has flaws?

His approach is:
>> Let me describe a little bit for my application back end. It's  
>> pretty
>> simple: i make a loop that for each second, it push an sms via kannel 
>> CGI for 1K mobile numbers, that mean throughput is 1000 msg/sec.
>> My kannel configuration is simple too, it's only smsbox -> bearerbox
>> -> SMSC (via smpp), no file storage, no SQL, no dlr (actually
dlr-mask=8).
>  I even don't expect the sms can deliver > to all end users and the 
> app
run some hours per day only. That why i 
> can play with the lasted SVN which don't care so much for the reliability.

For smsbox:
>>In the pass when using ver 1.4.3, it was fine for years. After  
>>upgrade to 1.5.0, after each few days, i realized smsbox is reset,  
>>then i found it exhaust my memory. It's funny that smsbox consume the  
>>mem and doesn't release. Example, if it occupies 50% your mem and you  
>>stop sms pushing, it will 50% forever except the box restarting.
>> That's all, same server with no other tasks, same back end, just  
>>different kannel version.
>>
>> Just paste the valgrind sum in here:
>>
>> ==27581== LEAK SUMMARY:
>> ==27581==definitely lost: 1,077,904 bytes in 67,369 blocks
>> ==27581==indirectly lost: 673,660 bytes in 67,366 blocks
>> ==27581==  possibly lost: 160 bytes in 13 blocks
>> ==27581==still reachable: 1,240 bytes in 39 blocks
>> ==27581== suppressed: 0 bytes in 0 blocks
>> ==27581== Reachable blocks (those to which a pointer was found) are 
>> not shown.
>> ==27581== To see them, rerun with: --leak-check=full 
>> --show-leak-kinds=all ==27581== ==27581== For counts of detected and 
>> suppressed errors, rerun with: -v ==27581== ERROR SUMMARY: 3 errors 
>> from 3 contexts (suppressed: 45 from 10)

For opensmppbox 
>opensmppbox  drains your memory 10 times faster than smsbox
==31087== Memcheck, a memory error detector ==31087== Copyright (C)
2002-2013, and GNU GPL'd, by Julian Seward et al.
==31087== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==31087== Command: /usr/local/sbin/opensmppbox -v -d --
/etc/kannel/opensmppbox.conf ==31087== Parent PID: 31085 ==31087== ==31087==
==31087== HEAP SUMMARY:
==31087== in use at exit: 8,163,073 bytes in 36,550 blocks
==31087==   total heap usage: 893,827 allocs, 857,277 frees, 295,662,079
bytes allocated
==31087==
==31087== 49 (32 direct, 17 indirect) bytes in 2 blocks are definitely lost
in loss record 485 of 813
==31087==at 0x4027434: malloc (vg_replace_malloc.c:291)
==31087==by 0x80970B3: gw_native_malloc (gwmem-native.c:87)
==31087==by 0x80A37A1: octstr_create_from_data_real (octstr.c:263)
==31087==by 0x80A3D81: octstr_duplicate_real (octstr.c:377)
==31087==by 0x808B106: cfg_get_real (cfg.c:670)
==31087==by 0x8052769: main (opensmppbox.c:2291)
==31087==
==31087== 79 (64 direct, 15 indirect) bytes in 4 blocks are definitely lost
in loss record 529 of 813
==31087==at 0x4027434: malloc (vg_replace_malloc.c:291)
==31087==by 0x80970B3: gw_native_malloc (gwmem-native.c:87)
==31087==by 0x80A37A1: octstr_create_from_data_real (octstr.c:263)
==31087==by 0x80A3D81: octstr_duplicate_real (octstr.c:377)
==31087==by 0x805D52F: msg_duplicate (msg-decl.h:80)
==31087==by 0x805651D: catenate_msg (opensmppbox.c:525)
==31087==by 0x805686B: check_multipart (opensmppbox.c:1481)
==31087==by 0x8057AD8: smpp_to_bearerbox (opensmppbox.c:1639)
==31087==by 0x80983AE: new_thread (gwthread-pthread.c:385)
==31087==by 0x46F9C38: start_thread (pthread_create.c:304)
==31087==by 0x482F78D: clone (clone.S:130)
==31087==
==31087== 100 (80 direct, 20 indirect) bytes in 5 blocks are definitely lost
in loss record 577 of 

RE: NodeJs SMS VAS application

2014-04-14 Thread Rene Kluwen
Maybe you should specify exactly what Kannel version your sources work with.

Because the internal ipc protocol may change in between versions.

 

== Rene

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Ulrich Badinga
Sent: maandag 14 april 2014 10:57
To: devel@kannel.org
Subject: NodeJs SMS VAS application

 

Hi,


I wrote a nodejs module to allow to write SMS VAS application using  kannel.

The module kannel.js is a ipc kannel box protocol implemented in full 
javascript, it allow to write a powerfull smsbox in javascript.

I wrote three smsbox's samples for testing this module

1.  A REPL for send SMS who reply automatically to each received SMS 
2.  A websocket chat application who can receive and send SMS
3.  A SMS VAS application, where services are scripts (javascript or 
coffeeScript), the http interface show a dashborad and allow send sms via 
"/cgi-bind/sendsms"

The module are located here :   
https://github.com/badlee/kannel.js.

 

I looking for some testers and contributer.

Regards.

 

-- 

 

Tel : (+241) 07086061

Github : badlee  

Skype : badinga.ulrich

   



RE: [Request] regex version of "smsc-id" directive in smpp-tlv group

2014-04-10 Thread Rene Kluwen
Allowed-smsc-id, accepted-smsc and smsc-id all serve different purposes.

So it wouldn’t make sense to give them all the same name.

 

== Rene

 

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Juan Nin
Sent: donderdag 10 april 2014 21:37
To: Kannel Devel
Subject: [Request] regex version of "smsc-id" directive in smpp-tlv group

 

Hi!

 

There are several groups which contain smsc-id related directives that allow to 
use a regex, e.g.:

 

- in group "smsc" we got "allowed-smsc-id" and the regex version is 
"allowed-smsc-id-regex"

- in group "sms-service"" we got "accepted-smsc" and the regex version is 
"accepted-smsc-regex"

 

But in group "smpp-tlv" we only got "smsc-id" and no regex version of the 
directive.

 

Is this something any of you would be willing to add?  :)

 

Also, shouldn't those directives be standarized?

On one case we got "allowed-smsc-id", on another one "accepted-smsc" and on the 
other "smsc-id".

Maybe one of them should be chosen as the standard, and for some time both ways 
could be accepted on each group, and then after a while we could remove the 
deprecated ones?

 

Thanks in advance.



RE: Opensmppbox compilation error on CentOS 6.5 x64

2014-04-04 Thread Rene Kluwen
I think you have to do a make install on the Kannel sources first.

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Ciaran Scolard
Sent: vrijdag 4 april 2014 14:53
To: devel@kannel.org
Subject: Opensmppbox compilation error on CentOS 6.5 x64

 

Hi All,

 

I’m trying to compile opensmppbox and I’m getting compilation errors. 

This isn’t my first install but either I appear to be doing something wrong
(or are there bugs in the code?).

Any ideas?

 

Install

svn co https://svn.kannel.org/gateway/trunk

cd trunk/addons/opensmppbox/

aclocal 

autoconf 

./bootstrap 

./configure --with-mssql=/usr --with-ssl=/usr/include/openssl
--enable-dependency-tracking --enable-ssl --enable-docs --enable-drafts
--prefix=/usr/local/kannel --with-kannel-dir=/root/trunk

make

 

Output

make  all-recursive

make[1]: Entering directory `/tmp/trunk/addons/opensmppbox'

Making all in gw

make[2]: Entering directory `/tmp/trunk/addons/opensmppbox/gw'

gcc -DHAVE_CONFIG_H -I. -I.. -I../gw -I../gw-g -O2 -D_XOPEN_SOURCE=600
-D_BSD_SOURCE -I/usr/include/openssl/include
-I/usr/local/kannel/include/kannel -g -O2 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
-D_LARGE_FILES= -I/usr/include/libxml2  -I/usr/include/openssl/include
-I/usr/include -MT opensmppbox.o -MD -MP -MF .deps/opensmppbox.Tpo -c -o
opensmppbox.o opensmppbox.c

opensmppbox.c: In function âsend_pduâ:

opensmppbox.c:622: warning: passing argument 1 of âsmpp_pdu_dumpâ from
incompatible pointer type

/usr/local/kannel/include/kannel/gw/smsc/smpp_pdu.h:239: note: expected
âstruct SMPP_PDU *â but argument is of type âstruct Octstr *â

opensmppbox.c:622: error: too many arguments to function âsmpp_pdu_dumpâ

opensmppbox.c: In function âhandle_pduâ:

opensmppbox.c:1513: warning: passing argument 1 of âsmpp_pdu_dumpâ from
incompatible pointer type

/usr/local/kannel/include/kannel/gw/smsc/smpp_pdu.h:239: note: expected
âstruct SMPP_PDU *â but argument is of type âstruct Octstr *â

opensmppbox.c:1513: error: too many arguments to function âsmpp_pdu_dumpâ

opensmppbox.c: In function ârun_smppboxâ:

opensmppbox.c:2099: warning: cast from pointer to integer of different size

opensmppbox.c: In function âwait_for_connectionsâ:

opensmppbox.c:2156: warning: cast to pointer from integer of different size

opensmppbox.c: In function âsmppboxc_runâ:

opensmppbox.c:2171: warning: cast from pointer to integer of different size

make[2]: *** [opensmppbox.o] Error 1

make[2]: Leaving directory `/tmp/trunk/addons/opensmppbox/gw'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/tmp/trunk/addons/opensmppbox'

make: *** [all] Error 2

 

 

 

Ciaran Scolard Network Manager phonovation limited
phonovation house, 8 clarinda park north, dun laoghaire, co. dublin,
ireland.
tel: + 353 1 284 3011 mobile: + 353 87 2115934 fax: + 353 1 284 3223
  www.phonovation.com registered in Ireland
number 127108

 

 

 



RE: SMPP DLR

2014-02-14 Thread Rene Kluwen
Your implementation is not correct.

 

Also the original value of 0x1f for registered_delivery is invalid.

Setting both the 2 last significant bits is a reserved value and hence not
supported.

If you follow the smpp specifications, you will get proper results.

 

== Rene

 

 

From: Porter, Kelvin [mailto:kelvin.por...@h3net.com] 
Sent: donderdag 13 februari 2014 20:18
To: Rene Kluwen
Cc: devel@kannel.org
Subject: RE: SMPP DLR

 

Hi,

 

Here is a proposal for a simple-minded patch…

 

[root@sms1 /usr/ports/www/kannel/work/gateway-1.5.0/addons/opensmppbox]# svn
diff

Index: gw/opensmppbox.c

===

--- gw/opensmppbox.c(revision 77)

+++ gw/opensmppbox.c(working copy)

@@ -1245,17 +1245,8 @@

 msg->sms.priority = pdu->u.submit_sm.priority_flag;

 

 /* ask for the delivery reports if needed */

-switch (pdu->u.submit_sm.registered_delivery & 0x03) {

-case 1:

-   msg->sms.dlr_mask = (DLR_SUCCESS | DLR_FAIL | DLR_SMSC_FAIL);

-   break;

-case 2:

-   msg->sms.dlr_mask = (DLR_FAIL | DLR_SMSC_FAIL);

-   break;

-default:

-   msg->sms.dlr_mask = 0;

-   break;

-}

+msg->sms.dlr_mask = pdu->u.submit_sm.registered_delivery;

+

 if (pdu->u.submit_sm.esm_class & (0x04|0x08)) {

msg->sms.sms_type = report_mo;

 }

 

However, I do not understand all nuances of the kannel design.  How should
the code know the source version of the protocol from the ESME (e.g., v3.3
or 3.4 or 5.0) and what version of the protocol to send to the SCMS (i.e.,
emit v3.4)?  

 

As a programmer,  I would tend to have a normalized PDU version for exchange
between the (opensmpp|sms)box and the bearerbox, but that may not be the way
it is intended to work.  

 

Regards,

 

Kelvin R. Porter

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Thursday, February 13, 2014 12:51 PM
To: Porter, Kelvin
Cc: devel@kannel.org
Subject: RE: SMPP DLR

 

Around line 1248 in gw/opensmppbox.c

 

It’s taking the SMPP v3.3 case only, and even that with a slight
modification.

 

== Rene

 

 

From: Porter, Kelvin [mailto:kelvin.por...@h3net.com] 
Sent: donderdag 13 februari 2014 19:36
To: Rene Kluwen; us...@kannel.org
Cc: devel@kannel.org
Subject: RE: SMPP DLR

 

Hi Renee,

 

Thank you for your response.  I will try it with the registered_delivery set
to 1.

 

Can you please give a hint as to where you think that the bug might reside
in opensmppbox?  I can take a look at the source and see if anything sticks
out?

 

Regards,

 

Kelvin R. Porter

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Thursday, February 13, 2014 5:12 AM
To: Porter, Kelvin; us...@kannel.org
Subject: RE: SMPP DLR

 

I see that’s a bug in opensmppbox.

 

Try to set registered_delivery to 1 instead, meanwhile I come up with a fix.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Porter, Kelvin
Sent: woensdag 12 februari 2014 23:52
To: us...@kannel.org
Subject: SMPP DLR

 

Hi,

 

I have a simple problem.  I have the following set up:

 

Client –[SMPP]à opensmppbox à sqlbox à bearerbox –[SMPP]à
SMSC

 

My clients sends a submit_sm request into the opensmppbox, I can see that
the submit_sm message is marked requested_delivery: 31 = 0x001f in the
logs; however, when I see the corresponding submit_sm sent to the SMSC, I
see that requested_delivery is set to 0, in the logs for the SMSC
connection.  

 

The only impediment that I can think of is that my client(s) bind as
transmitter and receiver separately and not as a transceiver.  I can send
and receive messages with no problem.

 

What do I need to do to insure that the requested_delivery flag is correctly
relayed to the SMSC?

 

Thank you.

 

Regards,

 

Kelvin R. Porter

 

 



RE: SMPP DLR

2014-02-13 Thread Rene Kluwen
Around line 1248 in gw/opensmppbox.c

 

It’s taking the SMPP v3.3 case only, and even that with a slight
modification.

 

== Rene

 

 

From: Porter, Kelvin [mailto:kelvin.por...@h3net.com] 
Sent: donderdag 13 februari 2014 19:36
To: Rene Kluwen; us...@kannel.org
Cc: devel@kannel.org
Subject: RE: SMPP DLR

 

Hi Renee,

 

Thank you for your response.  I will try it with the registered_delivery set
to 1.

 

Can you please give a hint as to where you think that the bug might reside
in opensmppbox?  I can take a look at the source and see if anything sticks
out?

 

Regards,

 

Kelvin R. Porter

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Thursday, February 13, 2014 5:12 AM
To: Porter, Kelvin; us...@kannel.org
Subject: RE: SMPP DLR

 

I see that’s a bug in opensmppbox.

 

Try to set registered_delivery to 1 instead, meanwhile I come up with a fix.

 

== Rene

 

From: users [mailto:users-boun...@kannel.org] On Behalf Of Porter, Kelvin
Sent: woensdag 12 februari 2014 23:52
To: us...@kannel.org
Subject: SMPP DLR

 

Hi,

 

I have a simple problem.  I have the following set up:

 

Client –[SMPP]à opensmppbox à sqlbox à bearerbox –[SMPP]à
SMSC

 

My clients sends a submit_sm request into the opensmppbox, I can see that
the submit_sm message is marked requested_delivery: 31 = 0x001f in the
logs; however, when I see the corresponding submit_sm sent to the SMSC, I
see that requested_delivery is set to 0, in the logs for the SMSC
connection.  

 

The only impediment that I can think of is that my client(s) bind as
transmitter and receiver separately and not as a transceiver.  I can send
and receive messages with no problem.

 

What do I need to do to insure that the requested_delivery flag is correctly
relayed to the SMSC?

 

Thank you.

 

Regards,

 

Kelvin R. Porter

 

 



RE: compiling and using opensmpp as a windows service

2014-01-29 Thread Rene Kluwen
What messages does it give you if you try to run it from the command line?
Does it start?

-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Tom Peak
Sent: woensdag 29 januari 2014 12:34
To: devel@kannel.org
Subject: compiling and using opensmpp as a windows service

compiled under cygwin opensmppbox.exe and tried to start as a windows 
service, but it does not start. bearerbox.exe starts..

relevant bearerbox config:

group = core
admin-port = 13000
smsbox-port = 13001
wapbox-port = 13002
admin-password = bar

group = smsc
smsc = fake
smsc-id = smsc
host = localhost
port = 8980
transceiver-mode = 0
connect-allow-ip = 127.0.0.1

opensmppbox  config:


group = core
dlr-storage = internal

# this group defines your opensmppbox
group = opensmppbox 
# our boxc type
opensmppbox-id = opensmppbox1
# the port to listen on for smpp connections
opensmppbox-port = 8980
# we connect to the following host as a box
bearerbox-host = 127.0.0.1
bearerbox-port = 13001
enable-pam = 1
log-level = 0
log-file = /logs/opensmppbox.log
our-system-id = opensmppbox
pam-acl = kannel
route-to-smsc = fake
#see sample smpplogins.txt
smpp-logins = "/logs/smpplogins.txt"
# If you set usesmppbox-id, you must set use-systemid-as-smsboxid, too
# See documentation for details of this flag.
#use-smppboxid = no
#use-systemid-as-smsboxid = 1


in the registry:

kannel_opensmppbox

ImagePath is: C:\Program Files (x86)\Kannel 1.4.3\cygrunsrv.exe

Parameters:

AppArgs are: --logfile 'C:\Program Files (x86)\Kannel 
1.4.3/logs/bearerbox.log' --verbosity 0 "'C:\Program Files (x86)\Kannel 
1.4.3/config/opensmppbox.conf'"

AppPath is: C:\Program Files (x86)\Kannel 1.4.3/opensmppbox.exe








RE: [PATCH] opensmppbox: ESME disconnection fix (plain text)

2013-11-12 Thread Rene Kluwen
Patch applied. Current revision is 76.

-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Alexander Malysh
Sent: maandag 11 november 2013 18:25
To: m...@apricot.net.in
Cc: devel@kannel.org org
Subject: Re: [PATCH] opensmppbox: ESME disconnection fix (plain text)

Hi,

similar issue was fixed in bearerbox itself, ++1

Alex

Am 09.11.2013 um 06:26 schrieb m...@apricot.net.in:

> Greetings.
> 
> There is an issue of sporadic disconnections of some ESMEs by 
> OPENSMPPBOX particularly when operated under high load and a high 
> latency ESME to OPENSMPPBOX network link. Please find the problem 
> explained in detail below. There is a suggested patch (against Revision:
> 75 of OPENSMPPBOX) attached. Kindly review and commit accordingly.
> 
> (A) The problem explained:
> 
> It is tricky to reproduce the bug. However one verified possibility of 
> occurrence is when the following conditions are met:
> 
> 1) The OPENSMPPBOX's client (ESME) sends submit_sm's with a high 
> submission rate. (for example, with a high 'max-pending-submits' 
> setting when using bearerbox as the ESME)
> 2) The high submission rate causes the transmission-layer between the 
> ESME and OPENSMPPBOX to often split a submit_sm PDU across 2 different 
> TCP segments.
> 3) OPENSMPPBOX calls a 'read_pdu' in the 'smpp_to_bearerbox' thread 
> between the arrival of these 2 segments.
> 4) The entire PDU-data is not available and 'smpp_pdu_read_data' call 
> returns NULL. The 'smpp_to_bearerbox' thread does not retain the value 
> of the PDU-length in these situations (although it is strictly 
> required to; refer to comments for 'read_pdu' in the source code)
> 5) The successive 'read_pdu' call forgets about the previously 
> unsuccessful 'smpp_pdu_read_data' call and now attempts to read the 
> 2nd four octets of the original PDU (via the 'smpp_pdu_read_len' call) 
> assuming this to be the 'command_length' field of a newly arrived PDU.
> (Actually what is now read is the "command_id" field of the original
> PDU)
> 6) This attempt to read a wrong value as the PDU-length, causes 
> 'smpp_pdu_read_len' to return -1 if the value read is decoded as less 
> than 'MIN_SMPP_PDU_LEN'. (This will always be the case for submit_sm 
> PDU's since the 'command_id' field is 0x0004 which decodes as 4 
> and is less than 16)
> 7) Subsequently 'read_pdu' returns -1 and the 'smpp_to_bearerbox' 
> thread shuts down the ESME connection and terminates.
> 
> 
> (B) SUGGESTED PATCH (against Revision: 75 of OPENSMPPBOX):
> 
> --- opensmppbox.c (revision 75)
> +++ opensmppbox.c (working copy)
> @@ -1862,8 +1862,8 @@
> long len;
> 
> box->last_pdu_received = time(NULL);
> +len = 0;
> while (smppbox_status == SMPP_RUNNING && box->alive) {
> -   len = 0;
>switch (read_pdu(box, conn, &len, &pdu)) {
>case -1:
>error(0, "Invalid SMPP PDU received.");
> 
> 
> 
> (C) Illustration of a reconnection:
> 
> (C.1) Relevant excerpts from the OPENSMPPBOX log-file with log-level =
> 0:
> 
> 2013-11-08 23:17:58 [20141] [9] DEBUG:   type_name: submit_sm_resp
> 2013-11-08 23:17:58 [20141] [9] DEBUG:   command_id: 2147483652 =
> 0x8004
> 2013-11-08 23:17:58 [20141] [9] DEBUG:   command_status: 0 = 0x
> 2013-11-08 23:17:58 [20141] [9] DEBUG:   sequence_number: 38101 =
> 0x94d5
> 2013-11-08 23:17:58 [20141] [9] DEBUG:   message_id:
> 2013-11-08 23:17:58 [20141] [9] DEBUG:Octet string at
> 0x7fcd0c016200:
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  len:  36
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  size: 37
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  immutable: 0
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  data: 38 36 65 36 38 35 31
> 63 2d 66 64 34 30 2d 34 63   86e6851c-fd40-4c
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  data: 38 62 2d 39 61 39 37
> 2d 31 62 31 39 63 39 61 30   8b-9a97-1b19c9a0
> 2013-11-08 23:17:58 [20141] [9] DEBUG:  data: 38 38 66 30   
>   88f0
> 2013-11-08 23:17:58 [20141] [9] DEBUG:Octet string dump ends.
> 2013-11-08 23:17:58 [20141] [9] DEBUG: SMPP PDU dump ends.
> 2013-11-08 23:17:59 [20141] [10] ERROR: SMPP: PDU length was too small 
> (4, minimum is 16).
> 2013-11-08 23:17:59 [20141] [10] ERROR: opensmppbox[user]: Server sent 
> garbage, ignored.
> 2013-11-08 23:17:59 [20141] [10] ERROR: Invalid SMPP PDU received.
> 2013-11-08 23:17:59 [20141] [10] DEBUG: Thread 10
> (opensmppbox.c:smpp_to_bearerbox) terminates.
> 2013-11-08 23:17:59 [20141] [9] DEBUG: Thread 9 
> (opensmppbox.c:function) terminates.
> 2013-11-08 23:18:10 [20141] [0] DEBUG: Started thread 11
> (opensmppbox.c:function)
> 2013-11-08 23:18:10 [20141] [11] DEBUG: Thread 11
> (opensmppbox.c:function) maps to pid 20141.
> 2013-11-08 23:18:10 [20141] [11] INFO: Client connected from 
> 
> 
> Note:
> (C.1.1) The last submit_sm_resp is being sent for the 'sequence_number:
> 38101'
> (C.1.2) Reading the PDU with se

RE: [PATCH] No PANIC on failing store_load()

2013-09-17 Thread Rene Kluwen
Agreed with Stipe here.
If the users enters a different value for sms_type, it is their
responsibility.

What is covered here, is an accidental wrong value for sms_type, because
nowhere is documented that sms_type should be set to MT (value '2') because
otherwise Kannel will panic.

Attached is a simple solution that will benefit everyone. Which is ready to
be committed.

== Rene

-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Stipe Tolj
Sent: dinsdag 17 september 2013 17:55
Cc: kannel_dev_mailinglist devel@kannel. org
Subject: Re: [PATCH] No PANIC on failing store_load()

Am 17.09.2013 17:22, schrieb Willy Mularto:
> Sorry,  it doesn't mean setting default value during table creation 
> right? Because this approach will still might be interupted by user's 
> value. Thanks.

The default value is defined during table creation, yes. The point is: 
IF the user doesn't insert a specific value for the field THEN the default
is applied. If the user specifically inserts -1 then he will get -1. But
that makes no logical sense.

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
---



default.diff
Description: Binary data


RE: [PATCH] No PANIC on failing store_load()

2013-09-17 Thread Rene Kluwen
Also +1.

A common "error" when using sqlbox is not setting sms_type to the proper
value (2) whilst inserting an MT to send_sms.
This will probably fill the store with messages with invalid sms_type
values.

== Rene


-Original Message-
From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Willy Mularto
Sent: dinsdag 17 september 2013 3:06
To: Alejandro Guerrieri
Cc: devel@kannel.org; Stipe Tolj
Subject: Re: [PATCH] No PANIC on failing store_load()

+1
It will be good to dump it to bearerbox-access log and flag it as FAILED MT
and maybe add more info into it so we can analyse it. Thanks Stipe.



On Sep 16, 2013, at 11:56 PM, Alejandro Guerrieri
 wrote:

> +1 this was really an annoyance IMHO
> 
> 
> --
> Alejandro Guerrieri
> 
> On Sep 16, 2013, at 11:59 AM, Stipe Tolj  wrote:
> 
>> Hi list,
>> 
>> attached is a very simple change in behavior in being more "runtime"
constraining, in case a message in the spool has an invalid 'sms_type' we
SHOULD NOT PANIC i.e. but rather dump an ERROR entry and try to continue.
>> 
>> Otherwise we may enter an infinite PANIC/restart loop for cases that such
messages get somehow injected to the spool.
>> 
>> If no objections, will be committing soon.
>> 
>> 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: Sqlbox performance patch (committed)

2013-08-18 Thread Rene Kluwen
Apologies. Current revision that works is 54, with a bug-fix:

 

ChangeLog:

 

Fixed a semantical error as where dlr's coming from smsbox were not
saved

in the log-table, even when save-dlr is true.

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Rene Kluwen
Sent: zaterdag 17 augustus 2013 0:29
To: devel@kannel.org
Subject: RE: Sqlbox performance patch (committed)

 

As nobody objected, within one week, I committed this patch to svn.

Current revision is 53.

 

ChangeLog:

 

Implemented configuration directives: limit-per-cycle (thanks to
Alejandro

Guerrieri for the original patch), save-dlr, save-mo, save-mt.

Speed improvements for messages sent via the insert-table should be

significant because we process batches of records both when selecting
and

inserting as well as deleting.

Thanks to Rinor Hoxha for reviewing the patch.

Besides, this patch allows for saving of the foreign id field in the

sql log table (all database engines). This is backward incompatible.

To continue a running installation perform:

alter table [log-table|insert-table] add column (foreign_id VARCHAR(255)
NULL);



RE: Sqlbox performance patch (committed)

2013-08-17 Thread Rene Kluwen
As nobody objected, within one week, I committed this patch to svn.

Current revision is 53.

 

ChangeLog:

 

Implemented configuration directives: limit-per-cycle (thanks to
Alejandro

Guerrieri for the original patch), save-dlr, save-mo, save-mt.

Speed improvements for messages sent via the insert-table should be

significant because we process batches of records both when selecting
and

inserting as well as deleting.

Thanks to Rinor Hoxha for reviewing the patch.

Besides, this patch allows for saving of the foreign id field in the

sql log table (all database engines). This is backward incompatible.

To continue a running installation perform:

alter table [log-table|insert-table] add column (foreign_id VARCHAR(255)
NULL);



RE: FW: Sqlbox performance patch

2013-08-11 Thread Rene Kluwen
I figure that the user will get an appropriate error message when
max_allowed_packet is not large enough.

-Original Message-
From: Rinor Hoxha [mailto:rinorho...@gmail.com] 
Sent: zondag 11 augustus 2013 20:31
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: FW: Sqlbox performance patch

One more thing to keep in consideration for users.
When using very  large values for "limit-per-cycle" make sure that
"max_allowed_packet" in MySQL config is large enough to support large
queries.

Br, Rinor





RE: Sqlbox performance patch (with support for foreign_id)

2013-08-11 Thread Rene Kluwen
I know it is not smart to change multiple issues in one development cycle.

But I added support for saving the foreign id field in the database at the
same time (all backends).
This is per request of Stipe Tolj on 05-10-2012. It makes sqlbox backward
incompatible without changing the insert table and the log table.
But we need to move on.

See attachment.

== Rene



sqlbox-rene-20130813r3.diff
Description: Binary data


FW: Sqlbox performance patch

2013-08-11 Thread Rene Kluwen
Sorry, forgot to copy the list.

I changed it to the following:

/* convert validity & deferred back to minutes */
if (save_mt && msg->sms.validity != SMS_PARAM_UNDEFINED)
msg->sms.validity = (msg->sms.validity - time(NULL))/60;
if (save_mt && msg->sms.deferred != SMS_PARAM_UNDEFINED)
msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;
gwlist_produce(save_list, msg);

to keep readability to a maximum. Difference is one Boolean compare extra in
my version.

== Rene

-Original Message-
From: Rinor Hoxha [mailto:rinorho...@gmail.com] 
Sent: zondag 11 augustus 2013 18:50
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Sqlbox performance patch

Also on static void sql_list(Boxc *boxc), perform /* convert validity &
deferred back to minutes */ only if save_mt == 1 ,(as you do in sql_single),
otherwise spare some unnecessary calculations.

if (save_mt) {
/* convert validity & deferred back to minutes */ if (msg->sms.validity !=
SMS_PARAM_UNDEFINED)
msg->sms.validity = (msg->sms.validity - time(NULL))/60; if
(msg->sms.deferred != SMS_PARAM_UNDEFINED)
msg->sms.deferred = (msg->sms.deferred - time(NULL))/60; }

Br, Rinor





RE: Sqlbox performance patch

2013-08-11 Thread Rene Kluwen
Rinor, you are right.
I changed it and also the two typo's from your other mail.
New patch is attached.

== Rene


-Original Message-
From: Rinor Hoxha [mailto:rinorho...@gmail.com] 
Sent: zondag 11 augustus 2013 17:58
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Sqlbox performance patch

Call sql_single also when limit_per_cycle == 1 (mysql - for those that want
to keep old behavior - would save some resources )

+if (gw_sql_fetch_msg_list == NULL || gw_sql_save_list == NULL ||
limit_per_cycle == 1) {
+sql_single(boxc);
+}

Br, Rinor



sqlbox-rene-20130813r2.diff
Description: Binary data


Sqlbox performance patch

2013-08-11 Thread Rene Kluwen
Attached is a patch (adapted from the one of Alejandro Guerrieri) which adds
the following features to sqlbox, patched against current sqlbox svn trunk
(revision 52).

 

1.   Configuration parameter: limit-per-cycle, which processes a number
of sql rows at a time.

2.   Configuration parameters: save-dlr, save-mo, save-mt which indicate
whether to save particular messages in the sql-log-table.

 

Also, a few other performance related improvements were made, such as
deleting all messages in the cycle at once (one DELETE statement) as well as
inserting those messages in one time as well.

All the improvements only apply to the MySQL driver. Other database back
ends work like usual.

More information in the documentation that also is included in the patch.

 

I would appreciate it if somebody could test this patch before committing it
to the trunk.

 

== Rene

 



sqlbox-rene-20130813.diff
Description: Binary data


RE: [PATCH] opensmppbox: message id generation fix

2013-08-07 Thread Rene Kluwen
Patch committed. Current trunk version is now 74.

Note that upgrading a running opensmppbox instance will break dlr's.

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Alexander
Kovalenko
Sent: woensdag 7 augustus 2013 16:25
To: devel@kannel.org
Subject: [PATCH] opensmppbox: message id generation fix

 

Greetings.

Recently we've noticed that under load opensmppbox may return same message
ids in submit_sm_resp responses.

Looking at the sources I see, that it returns only first 8 chars of
generated UUID. This is not correct, because these bytes may be same for
different UUIDs. I suppose it was coded in such way to support both smpp
v3.3 and v3.4. According to protocol v3.3 this field must be max 9 chars
including '\0'. But in v3.4 it's allowed to have up to 65 chars.

There is our patch in attachment. It was created against
https://svn.kannel.org/opensmppbox/trunk , revision 73.

For v3.3 opensmppbox will return only first 8 chars for UUID as before, but
for v3.4 and above it will return full generated UUID.

-- 
With best regards,
Alexander Kovalenko
Ardas Group Inc.
www.ardas.dp.ua 

 



RE: Multi record sending patch

2013-07-26 Thread Rene Kluwen
Interesting. For sure I will look at this patch.

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Rinor Hoxha
Sent: donderdag 25 juli 2013 18:56
To: devel@kannel.org
Subject: Re: Multi record sending patch

 

Last night i created a new patch as a starting point  for sqlbox safety.

 

1) It separates log tables adding MO,MT,DLR as suffix (if noone needs it I
can remove it)

2) Multiselect (code from the old patch updated and adapted)

3) Messages are deleted/moved from tables only after bearebox acks. There is
an additional field used right now called x_status that contains the final
status for thas msg (regarding bearebox ack - code got from smsbox) (the
logic used may affect the speed)

If interested I will check to fix some other things (mostly error
checking/handling). I need some help to ensure that the code is correct,
especially the uuid stuff.

Comment, help,improvements, blames :) , are welcome.

I did some quick tests to ensure it compiles and behaves like it should.
However it need much more testing.

Br, Rinor

 

 

On Fri, Jul 19, 2013 at 10:52 AM, Alexander Malysh 
wrote:

+1 for this patch.

 

Alex

 

Am 18.07.2013 um 17:12 schrieb Rene Kluwen :





Hello Alejandro,

 

I found this patch and I consider it useful enough to include in sqlbox
trunk.

Is this the latest version? And is it tested well?

 

Maybe you have a diff against current trunk.

 

== Rene

 



 

 



RE: Multi record sending patch

2013-07-18 Thread Rene Kluwen
Also gw_sql_save_msg could then be adapted to a multi-record insert.

Which also gives a big performance boost on a large number of messages.

This is getting interesting.

 

Spameden: Do you have any insights about how Alejandro's current patch
compares to an unpatched sqlbox in terms of performance?

 

== Rene

 

 

From: spameden [mailto:spame...@gmail.com] 
Sent: donderdag 18 juli 2013 17:57
To: Rene Kluwen
Cc: Alejandro Guerrieri; kannel_dev_mailinglist devel@kannel.org
Subject: Re: Multi record sending patch

 

I will wait for your revised patch!

currently I'm using Alejandro's patch but on outdated r4968 kannel/sqlbox.

 

2013/7/18 Rene Kluwen 

I could come up with a re-patch. Where the sqlbox_id's are returned in a
separate list.

This way, performance can even be boosted by using only 1 delete statement:
DELETE FROM  WHERE sqlbox_id in (id1, id2, id3, etc..)

 

What do you think?

 

== Rene

 

From: spameden [mailto:spame...@gmail.com] 
Sent: donderdag 18 juli 2013 17:24
To: Rene Kluwen
Cc: Alejandro Guerrieri; kannel_dev_mailinglist devel@kannel.org
Subject: Re: Multi record sending patch

 

+1 for this patch to be included!

the only thing is sqlbox deletes record from the database before its sent to
the bearerbox, so if sqlbox crashes at this point some messages could be
lost.

 

2013/7/18 Rene Kluwen 

Hello Alejandro,

 

I found this patch and I consider it useful enough to include in sqlbox
trunk.

Is this the latest version? And is it tested well?

 

Maybe you have a diff against current trunk.

 

== Rene

 

 

 



RE: Multi record sending patch

2013-07-18 Thread Rene Kluwen
I could come up with a re-patch. Where the sqlbox_id's are returned in a
separate list.

This way, performance can even be boosted by using only 1 delete statement:
DELETE FROM  WHERE sqlbox_id in (id1, id2, id3, etc..)

 

What do you think?

 

== Rene

 

From: spameden [mailto:spame...@gmail.com] 
Sent: donderdag 18 juli 2013 17:24
To: Rene Kluwen
Cc: Alejandro Guerrieri; kannel_dev_mailinglist devel@kannel.org
Subject: Re: Multi record sending patch

 

+1 for this patch to be included!

the only thing is sqlbox deletes record from the database before its sent to
the bearerbox, so if sqlbox crashes at this point some messages could be
lost.

 

2013/7/18 Rene Kluwen 

Hello Alejandro,

 

I found this patch and I consider it useful enough to include in sqlbox
trunk.

Is this the latest version? And is it tested well?

 

Maybe you have a diff against current trunk.

 

== Rene

 

 



Multi record sending patch

2013-07-18 Thread Rene Kluwen
Hello Alejandro,

 

I found this patch and I consider it useful enough to include in sqlbox
trunk.

Is this the latest version? And is it tested well?

 

Maybe you have a diff against current trunk.

 

== Rene

 



sqlbox-standalone-multi-20080227.patch
Description: Binary data


RE: unable to change data_coding

2013-07-16 Thread Rene Kluwen
Try to add “&coding=2” to your send-url.

 

== Rene

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Qqblog Qqblog
Sent: dinsdag 16 juli 2013 13:52
To: devel@kannel.org
Subject: unable to change data_coding 

 

i would like to send unicode via http

 

kannel 1.4.3, debian 5

 

text = 大

(after urlencode) %E5%A4%A7

 

text=%E5%A4%A7code=2&charset=utf-8

 

the received msg is ?

 

i tried add to smsc group

 

alt-charset = "UTF-8"

alt-dcs=1

 

but none of them works!!

 

my smpp provider requires DCS=8 for unicode to work.

 

SMPP PDU 0xb927e0 dump:
2013-07-16 19:14:48 [9943] [6] DEBUG:   type_name: submit_sm
2013-07-16 19:14:48 [9943] [6] DEBUG:   command_id: 4 = 0x0004
2013-07-16 19:14:48 [9943] [6] DEBUG:   command_status: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   sequence_number: 117 = 0x0075
2013-07-16 19:14:48 [9943] [6] DEBUG:   service_type: NULL
2013-07-16 19:14:48 [9943] [6] DEBUG:   source_addr_ton: 5 = 0x0005
2013-07-16 19:14:48 [9943] [6] DEBUG:   source_addr_npi: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   source_addr: 
2013-07-16 19:14:48 [9943] [6] DEBUG:   dest_addr_ton: 2 = 0x0002
2013-07-16 19:14:48 [9943] [6] DEBUG:   dest_addr_npi: 1 = 0x0001
2013-07-16 19:14:48 [9943] [6] DEBUG:   destination_addr:
2013-07-16 19:14:48 [9943] [6] DEBUG:   esm_class: 3 = 0x0003
2013-07-16 19:14:48 [9943] [6] DEBUG:   protocol_id: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   priority_flag: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   schedule_delivery_time: NULL
2013-07-16 19:14:48 [9943] [6] DEBUG:   validity_period: NULL
2013-07-16 19:14:48 [9943] [6] DEBUG:   registered_delivery: 1 = 0x0001
2013-07-16 19:14:48 [9943] [6] DEBUG:   replace_if_present_flag: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   data_coding: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   sm_default_msg_id: 0 = 0x
2013-07-16 19:14:48 [9943] [6] DEBUG:   sm_length: 1 = 0x0001
2013-07-16 19:14:48 [9943] [6] DEBUG:   short_message: "?"
2013-07-16 19:14:48 [9943] [6] DEBUG: SMPP PDU dump ends.

 

pls kindly advise.



RE: Add receiver based smsc-route to opensmppbox

2013-07-10 Thread Rene Kluwen
Patch applied to revision 73 (current trunk) of the opensmppbox addon.

Kelvin, thanks for your contribution.

 

== Rene

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Porter, Kelvin
Sent: maandag 8 juli 2013 17:40
To: spameden
Cc: devel@kannel.org; hbil...@ecommunicate.biz
Subject: RE: Add receiver based smsc-route to opensmppbox

 

Hi, 

 

Here is the .diff file as an attachment.

 

Regards,

 

Kelvin R. Porter

 

 

From: spameden [mailto:spame...@gmail.com] 
Sent: Monday, July 08, 2013 9:45 AM
To: Porter, Kelvin
Cc: hbil...@ecommunicate.biz; devel@kannel.org
Subject: Re: Add receiver based smsc-route to opensmppbox

 

Maybe you could just attach whole patch as a .diff?

Would be handy for developers :)

Thanks

 

2013/7/8 Porter, Kelvin 

Hi,

Included below is the diff with the documentation update.

Please let me know if you have any questions or comments.

Regards,

Kelvin R. Porter

Index: doc/userguide.xml
===
--- doc/userguide.xml   (revision 72)
+++ doc/userguide.xml   (working copy)
@@ -954,6 +954,18 @@
originating from the smsbox A, B or C will
be assigned a smsc id "mysmsc".


+   Yet another example:
+
+   
+group = smsc-route
+smsc-id = mysmsc
+receiver-shortcode = "+1888777;+1888777;+1888666"
+   
+
+   Which means all outbound messages with
receiver number +1888777, +1888777, +1888666
+   will be assigned a smsc id "mysmsc".
+   
+

If none of the rules have been defined or
none match the criteria, the
default smsc route defined in route-to-smsc
configuration variable
@@ -1024,6 +1036,21 @@
 smsboxes are matched against the shortcode list.
   
 
+
+  
+receiver-shortcode (o)
+  
+  
+number-list
+  
+  
+If set, specifies which receiver numbers for outbound
+messages should be routed to this smsc. List contains
+numbers separated by semicolon (";").
+This option takes higher precedence than smsbox-id and
+shortcode; it supercedes these options.
+  
+
   
 
 

Index: gw/opensmppbox-cfg.def
===
--- gw/opensmppbox-cfg.def  (revision 72)
+++ gw/opensmppbox-cfg.def  (working copy)
@@ -86,4 +86,5 @@
OCTSTR(smsc-id)
OCTSTR(smsbox-id)
OCTSTR(shortcode)
+   OCTSTR(receiver-shortcode)
 )
Index: gw/opensmppbox.c
===
--- gw/opensmppbox.c(revision 72)
+++ gw/opensmppbox.c(working copy)
@@ -116,6 +116,7 @@
 static long smpp_dest_addr_ton = -1;
 static long smpp_dest_addr_npi = -1;

+static Dict *smsc_by_receiver = NULL;
 static Dict *smsc_by_smsbox_id = NULL;
 static Dict *smsc_by_sender = NULL;
 static Dict *smsc_by_sender_smsbox_id = NULL;
@@ -1784,10 +1785,17 @@
if (msg->sms.smsc_id != NULL)
return msg->sms.smsc_id;

-   os = octstr_format("%s:%s", octstr_get_cstr(msg->sms.sender),
-   octstr_get_cstr(box->boxc_id));
+char *receiver =  octstr_get_cstr(msg->sms.receiver);
+if ( (receiver) && (strlen(receiver) > 0) ) {
+smsc_id = dict_get(smsc_by_receiver, msg->sms.receiver);
+   os = octstr_format("receiver:%s", receiver);
+};

-   smsc_id = dict_get(smsc_by_sender_smsbox_id, os);
+   if (!smsc_id) {
+   os = octstr_format("%s:%s",
octstr_get_cstr(msg->sms.sender),
+   octstr_get_cstr(box->boxc_id));
+   smsc_id = dict_get(smsc_by_sender_smsbox_id, os);
+};
if (!smsc_id)
smsc_id = dict_get(smsc_by_sender, msg->sms.sender);
if (!smsc_id)
@@ -2251,14 +2259,15 @@
 {
 CfgGroup *grp;
 List *list, *items;
-Octstr *smsc_id, *boxc_ids, *shortcodes;
+Octstr *smsc_id, *boxc_ids, *shortcodes, *receiver_shortcodes;
 int i, j;

+smsc_by_receiver = dict_create(1000, (void(*)(void *)) octstr_destroy);

 smsc_by_smsbox_id = dict_create(30, (void(*)(void *)) octstr_destroy);
 smsc_by_sender = dict_create(50, (void(*)(void *)) octstr_destroy);
 smsc_by_sender_smsbox_id = dict_create(50, (void(*)(void *))
octstr_destroy);

-smsc_id = boxc_ids = shortcodes = NULL;
+smsc_id = boxc_ids = shortcodes = receiver_shortcodes = NULL;
 list = items = NULL;

 list = cfg_get_multi_group(cfg, octstr_imm("smsc-route"));
@@ -2281,7 +2290,26 @@
  */
 boxc_ids = cf

RE: Question: select smsc based upon receiver number?

2013-07-10 Thread Rene Kluwen
You can modify the function:

 

static Octstr *boxc_route_msg_to_smsc(Boxc *box, Msg *msg)

 

Add a receiver filter to the sender filter and you are done.

 

From: devel [mailto:devel-boun...@kannel.org] On Behalf Of Porter, Kelvin
Sent: maandag 1 juli 2013 17:55
To: devel@kannel.org
Subject: FW: Question: select smsc based upon receiver number?

 

Hi,

 

I did not receive an answer to my query in u...@kannel.org.  I thought I
would try here, instead.

 

…

I have a set up like this…

 

Client à opensmppbox à bearerbox à {SMSC1 (default), SMSC2}

 

I am wondering if there is a way to do the routing like “smsc-route” in the
latest  versions  of opensmppbox, but for the receiver of the SMS message,
not the sender.  I have a  large set of diverse numbers that I want to
divert from the default smsc.  The set of numbers are diverse (i.e., they do
not share any prefixes in common).  How can I redirect this set of diverse
numbers away from the default smsc?

 

If there is not a good way to do this, I can modify the code to the
bearerbox and/or opensmppbox.  Does anyone have a preferred way of seeing it
implemented?  I am thinking that I could add a new parameter to the
“smsc-route” group, perhaps called “receiver-shortcode”, which would be a
list of receiver numbers that trigger the smsc overwrite.  I believe that
this should be a higher precedence match than the sender.

 

Thank you for any feedback.

 

Regards,

 

Kelvin R. Porter

 

 



RE: [PATCH] Abstraction for config resources, allowing file, URL, pipe, etc.

2013-05-02 Thread Rene Kluwen
For http:

lynx -dump  | bearerbox /dev/stdin

-Original Message-
From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Alexander Malysh
Sent: maandag 29 april 2013 18:44
To: Stipe Tolj
Cc: devel@kannel.org
Subject: Re: [PATCH] Abstraction for config resources, allowing file, URL,
pipe, etc.

Hi,

just came across this patch again and find it unnecessary complicated. Why
we have to differentiate pipe and file and why we have to tell config_read
which type of config to read?

For pipe:
$ cat config | bearerbox /dev/stdin

The same as above foe the file. And for HTTP just define filename as HTTP
URI. That's it. No modifications in the boxes needed because config module
will handle this transparently.

Alex

Am 19.10.2012 um 05:34 schrieb Stipe Tolj :

> Hi list,
> 
> I have abstracted the gwlib/cfg.[ch] module in order not to handle simply
a 'config file', but a 'config resource', which then can be either of:
> 
> - a config file
> - a config URL, retrieving the config via the HTTP body
> - the stdin pipe, allowing to pipe in a config
> - a data block itself, interpreted as config
> 
> Now, to demonstrate the effect, here are some sample ways on how Kannel's
daemon can be then started:
> 
>  $ bearerbox
> 
> will look for 'kannel.conf', as it does today.
> 
>  $ bearerbox smskannel.conf
> 
> will open the local 'smskannel.conf' file, parse and expand it, as it does
today.
> 
>  $ bearebox http://host/smskannel.conf
> 
> will HTTP GET to the URL and pull the config from the HTTP response body.
> 
>  $ cat smskannel.conf | bearerbox pipe
> 
> will instruct bearerbox to read in the config from the stdin pipe.
> 
> Ok, sounds sweet, right? But is there more? Yes, there is. Due that the
gwlib/cfg.[ch] module is abstracted on these "types" of resources for the
config, we can mix them using the 'include = ' statement.
> 
> I.e. I can have a local smskannel.conf that includes a remote URL config
part, or I can fetch a remote URL config block, but refer again to local
config files, etc.
> 
> Now you may ask what's this used for, you have been living quite fine with
the normal local config style, or even have sync'ed configs via rsync to
achieve HA setups?
> 
> Yes, sync'ing the filesystem is a way to make "remote changes" for a
Kannel worker node. But I wanted something that is even more simple, like
the HTTP URL call fetching of the config.
> 
> This allows a "controler node" to instruct how the Kannel "worker nodes"
will operate. Meaning, to which SMSCs they connect, which sms-services they
need to obey, etc.
> 
> It makes things simply more flexible, especially when you start to look at
large scalability, HA and LB issues.
> 
> The patchset can be found at URL:
> http://www.kannel.org/~tolj/patchsets/cfg/gateway-cfg.diff
> 
> NOTE: The user's guide part is still missing, I'll make sure this gets
into the patchset before committing.
> 
> Reviews, comments, votes welcome.
> 
> 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: Validity patch

2013-03-10 Thread Rene Kluwen
Great news!

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: zaterdag 9 maart 2013 19:13
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity patch

 

Hi Rene,

 

issue fixed in SVN.

 

Alex

 

Am 05.03.2013 um 10:16 schrieb Alexander Malysh :





Hi Rene,

 

do you have any update regarding this bug? Can I somehow help you to
reproduce/fix it?

 

Alex

 

Am 01.03.2013 um 13:03 schrieb Alexander Malysh :





Hi Rene,

 

I don't think that should be the issue because message fields are not int
they are long.

 

Does anybody has the same issue with the latest SVN version?

 

Alex

 

Am 28.02.2013 um 14:15 schrieb Rene Kluwen :





Could the difference between your situation where it works and (for example)
my situation be the following:

 

I am using a 32 bits processor. If you are using a 64 bits processor maybe
the int size is different?

 

Just a wild guess. Trying to solve this problem.

 

== Rene

 

 

 



Validity patch

2013-02-28 Thread Rene Kluwen
Could the difference between your situation where it works and (for example)
my situation be the following:

 

I am using a 32 bits processor. If you are using a 64 bits processor maybe
the int size is different?

 

Just a wild guess. Trying to solve this problem.

 

== Rene



RE: Validity perdiod

2013-02-18 Thread Rene Kluwen
The issue is fixed as far as sqlbox concerns.

Just clarify the following:

 

2013-02-18 12:12:57 [1243] [7] DEBUG:   type_name: submit_sm

2013-02-18 12:12:57 [1243] [7] DEBUG:   command_id: 4 = 0x0004

2013-02-18 12:12:57 [1243] [7] DEBUG:   command_status: 0 = 0x

2013-02-18 12:12:57 [1243] [7] DEBUG:   sequence_number: 2 = 0x0002

2013-02-18 12:12:57 [1243] [7] DEBUG:   service_type: NULL

2013-02-18 12:12:57 [1243] [7] DEBUG:   source_addr_ton: 1 = 0x0001

2013-02-18 12:12:57 [1243] [7] DEBUG:   source_addr_npi: 1 = 0x0001

2013-02-18 12:12:57 [1243] [7] DEBUG:   source_addr: "31628765806"

2013-02-18 12:12:57 [1243] [7] DEBUG:   dest_addr_ton: 1 = 0x0001

2013-02-18 12:12:57 [1243] [7] DEBUG:   dest_addr_npi: 1 = 0x0001

2013-02-18 12:12:57 [1243] [7] DEBUG:   destination_addr: "31628765806"

2013-02-18 12:12:57 [1243] [7] DEBUG:   esm_class: 3 = 0x0003

2013-02-18 12:12:57 [1243] [7] DEBUG:   protocol_id: 0 = 0x

2013-02-18 12:12:57 [1243] [7] DEBUG:   priority_flag: 0 = 0x

2013-02-18 12:12:57 [1243] [7] DEBUG:   schedule_delivery_time: NULL

2013-02-18 12:12:57 [1243] [7] DEBUG:   validity_period: "70215159000+"

2013-02-18 12:12:57 [1243] [7] DEBUG:   registered_delivery: 1 = 0x0001

2013-02-18 12:12:57 [1243] [7] DEBUG:   replace_if_present_flag: 0 =
0x

2013-02-18 12:12:57 [1243] [7] DEBUG:   data_coding: 241 = 0x00f1

2013-02-18 12:12:57 [1243] [7] DEBUG:   sm_default_msg_id: 0 = 0x

2013-02-18 12:12:57 [1243] [7] DEBUG:   sm_length: 19 = 0x0013

2013-02-18 12:12:57 [1243] [7] DEBUG:   short_message: "Test to self 12:12."

2013-02-18 12:12:57 [1243] [7] DEBUG: SMPP PDU dump ends.

 

The particular pdu doesn´t have validity period set on the sendsms
interface.

It should say: validity_period: NULL

 

To what date and time does “70215159000+”  convert?

 

== Rene

 

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 13:51
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

ok, understand...

 

Can you confirm that the issue fixed now?

 

Alex

 

Am 18.02.2013 um 12:01 schrieb Rene Kluwen :





Because we save it into a different table we fetched it from.

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 11:32
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

I just want that validity & deferred is the absolute timestamp and not
dependent from

any message value.

 

As to the mentioned code. I just don't understand why sqlbox first fetch
message from db, sends it

ro bearerbox and then insert it back to DB??

 

while (sqlbox_status == SQL_RUNNING && boxc->alive) {

if ((msg = gw_sql_fetch_msg()) != NULL) {

if (charset_processing(msg) == -1) {

error(0, "Could not charset process message, dropping it!");

msg_destroy(msg);

continue;

}

if (global_sender != NULL && (msg->sms.sender == NULL ||
octstr_len(msg->sms.sender) == 0)) {

msg->sms.sender = octstr_duplicate(global_sender);

}

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

send_msg(boxc->bearerbox_connection, boxc, msg);

 

^ here is correct that we send unix timestamp to bearerbox,
because bearerbox expects seconds now

 

gw_sql_save_msg(msg, octstr_imm("MT"));

 

^ why do we save message again, that we just fetched
from DB?

 

}

    else {

    gwthread_sleep(SLEEP_BETWEEN_SELECTS);

}

 

 

Alex

 

Am 18.02.2013 um 10:54 schrieb Rene Kluwen < <mailto:rene.klu...@chimit.nl>
rene.klu...@chimit.nl>:






Not sure why you want to go through all this trouble.

But the function sql_to_bearerbox does not do still what you want.

 

Here goes:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

send_msg(boxc->bearerbox_connection, boxc, msg);
/* message is sent with validity in absolute seconds */

gw_sql_save_msg(msg, octstr_imm("MT"));
/* message is saved in sent_sms in absolute seconds */

 

From: Alexander Malysh

RE: Validity perdiod

2013-02-18 Thread Rene Kluwen
Because we save it into a different table we fetched it from.

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 11:32
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

I just want that validity & deferred is the absolute timestamp and not
dependent from

any message value.

 

As to the mentioned code. I just don't understand why sqlbox first fetch
message from db, sends it

ro bearerbox and then insert it back to DB??

 

while (sqlbox_status == SQL_RUNNING && boxc->alive) {

if ((msg = gw_sql_fetch_msg()) != NULL) {

if (charset_processing(msg) == -1) {

error(0, "Could not charset process message, dropping it!");

msg_destroy(msg);

continue;

}

if (global_sender != NULL && (msg->sms.sender == NULL ||
octstr_len(msg->sms.sender) == 0)) {

msg->sms.sender = octstr_duplicate(global_sender);

}

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

send_msg(boxc->bearerbox_connection, boxc, msg);

 

^ here is correct that we send unix timestamp to bearerbox,
because bearerbox expects seconds now

 

gw_sql_save_msg(msg, octstr_imm("MT"));

 

^ why do we save message again, that we just fetched
from DB?

 

}

else {

gwthread_sleep(SLEEP_BETWEEN_SELECTS);

}

 

 

Alex

 

Am 18.02.2013 um 10:54 schrieb Rene Kluwen :





Not sure why you want to go through all this trouble.

But the function sql_to_bearerbox does not do still what you want.

 

Here goes:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

send_msg(boxc->bearerbox_connection, boxc, msg);
/* message is sent with validity in absolute seconds */

gw_sql_save_msg(msg, octstr_imm("MT"));
/* message is saved in sent_sms in absolute seconds */

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 10:02
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

Hi,

 

just found a typo in my patch and changed it to:

 

msg_escaped = msg_duplicate(msg);

/* convert validity & deferred to minutes */

if (msg_escaped->sms.validity != SMS_PARAM_UNDEFINED)

msg_escaped->sms.validity = (msg_escaped->sms.validity -
time(NULL))/60;

if (msg_escaped->sms.deferred != SMS_PARAM_UNDEFINED)

msg_escaped->sms.deferred = (msg_escaped->sms.deferred -
time(NULL))/60;

    gw_sql_save_msg(msg_escaped, octstr_imm("MT"));

 

This should fix this issue.

 

Alex

 

Am 18.02.2013 um 09:57 schrieb Rene Kluwen < <mailto:rene.klu...@chimit.nl>
rene.klu...@chimit.nl>:






In sqlbox, two different things happen.

 

1.   Select rows from send_sms and send them to bearerbox (with validity
in minutes)

2.   Relay rows from smsbox to bearerbox and store them in sent_sms on
the fly. These messages have been processed by smsbox already and should not
be reprocessed.

 

I am not sure what exactly you did because I don't have time to look at the
code now. But something is going very wrong here. Even without using sqlbox
we are getting invalid validity_period fields in smsc_smpp.

 

On a side note, I see now that opensmppbox never sends a validity field to
its connected entity, now I look at it. But that's a different story.

 

== Rene

 

From: Alexander Malysh [mailto:malysh00@ <http://gmail.com> gmail.com] On
Behalf Of Alexander Malysh
Sent: maandag 18 februari 2013 9:29
To: Rene Kluwen
Cc:  <mailto:devel@kannel.org> devel@kannel.org
Subject: Re: Validity perdiod

 

Hi Rene,

 

I converted validity & deferred to be unix timestamp internally, they were
in minutes before.

Due to the fact that I didn't know how sqlbox works, I assumed that validity
& deferred in the

sqlbox tables also stored in minutes therefore this conversion:

if validity set then (now - unix timestamp) / 60 -> minutes

 

the counter part is when selecting values from DB and sending to bearerbox:

 

/* convert validity and deferr

RE: Validity perdiod

2013-02-18 Thread Rene Kluwen
Not sure why you want to go through all this trouble.

But the function sql_to_bearerbox does not do still what you want.

 

Here goes:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

send_msg(boxc->bearerbox_connection, boxc, msg);
/* message is sent with validity in absolute seconds */

gw_sql_save_msg(msg, octstr_imm("MT"));
/* message is saved in sent_sms in absolute seconds */

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 10:02
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

Hi,

 

just found a typo in my patch and changed it to:

 

msg_escaped = msg_duplicate(msg);

/* convert validity & deferred to minutes */

if (msg_escaped->sms.validity != SMS_PARAM_UNDEFINED)

msg_escaped->sms.validity = (msg_escaped->sms.validity -
time(NULL))/60;

if (msg_escaped->sms.deferred != SMS_PARAM_UNDEFINED)

msg_escaped->sms.deferred = (msg_escaped->sms.deferred -
time(NULL))/60;

gw_sql_save_msg(msg_escaped, octstr_imm("MT"));

 

This should fix this issue.

 

Alex

 

Am 18.02.2013 um 09:57 schrieb Rene Kluwen :





In sqlbox, two different things happen.

 

1.   Select rows from send_sms and send them to bearerbox (with validity
in minutes)

2.   Relay rows from smsbox to bearerbox and store them in sent_sms on
the fly. These messages have been processed by smsbox already and should not
be reprocessed.

 

I am not sure what exactly you did because I don't have time to look at the
code now. But something is going very wrong here. Even without using sqlbox
we are getting invalid validity_period fields in smsc_smpp.

 

On a side note, I see now that opensmppbox never sends a validity field to
its connected entity, now I look at it. But that's a different story.

 

== Rene

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 9:29
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

Hi Rene,

 

I converted validity & deferred to be unix timestamp internally, they were
in minutes before.

Due to the fact that I didn't know how sqlbox works, I assumed that validity
& deferred in the

sqlbox tables also stored in minutes therefore this conversion:

if validity set then (now - unix timestamp) / 60 -> minutes

 

the counter part is when selecting values from DB and sending to bearerbox:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

 

Alex

 

Am 16.02.2013 um 15:36 schrieb Rene Kluwen < <mailto:rene.klu...@chimit.nl>
rene.klu...@chimit.nl>:






Also: in sqlbox.c (function smsbox_to_bearerbox()):

 

   /* convert validity & deferred to minutes */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = (msg->sms.validity - time(NULL))/60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;

 

Isn't this field encoded twice now? Once in smsbox and another time in
sqlbox?

 

Alexander, you made this change. Please shed some light.

 

From:  <mailto:devel-boun...@kannel.org> devel-boun...@kannel.org
[mailto:devel- <mailto:boun...@kannel.org> boun...@kannel.org] On Behalf Of
Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To:  <mailto:devel@kannel.org> devel@kannel.org
Subject: Validity perdiod

 

I came across an issue since svn version 4956 of smsbox.c, using smpp.

 

The logs show the following:

 

2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"

 

This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.

 

How do I interpret this as "YYMMDDhhmmsstnnp"?

 

One of my clients needed to downgrade because of this issue.

 

== Rene

 



RE: Validity perdiod

2013-02-18 Thread Rene Kluwen
This looks plain wrong: msg->sms.validity = (msg->sms.validity -
time(NULL))/60;

 

It assumes that validity is in the same unit as time(NULL) (Seconds?) and
then divides by 60.

It's around line 291 of sqlbox.c But I have the feeling that the same bug is
on other places as well.

 

== Rene

 

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Rene Kluwen
Sent: maandag 18 februari 2013 9:57
To: 'Alexander Malysh'
Cc: devel@kannel.org
Subject: RE: Validity perdiod

 

In sqlbox, two different things happen.

 

1.   Select rows from send_sms and send them to bearerbox (with validity
in minutes)

2.   Relay rows from smsbox to bearerbox and store them in sent_sms on
the fly. These messages have been processed by smsbox already and should not
be reprocessed.

 

I am not sure what exactly you did because I don't have time to look at the
code now. But something is going very wrong here. Even without using sqlbox
we are getting invalid validity_period fields in smsc_smpp.

 

On a side note, I see now that opensmppbox never sends a validity field to
its connected entity, now I look at it. But that's a different story.

 

== Rene

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 9:29
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

Hi Rene,

 

I converted validity & deferred to be unix timestamp internally, they were
in minutes before.

Due to the fact that I didn't know how sqlbox works, I assumed that validity
& deferred in the

sqlbox tables also stored in minutes therefore this conversion:

if validity set then (now - unix timestamp) / 60 -> minutes

 

the counter part is when selecting values from DB and sending to bearerbox:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

 

Alex

 

Am 16.02.2013 um 15:36 schrieb Rene Kluwen :

 

Also: in sqlbox.c (function smsbox_to_bearerbox()):

 

   /* convert validity & deferred to minutes */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = (msg->sms.validity - time(NULL))/60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;

 

Isn't this field encoded twice now? Once in smsbox and another time in
sqlbox?

 

Alexander, you made this change. Please shed some light.

 

From:  <mailto:devel-boun...@kannel.org> devel-boun...@kannel.org
[mailto:devel- <mailto:boun...@kannel.org> boun...@kannel.org] On Behalf Of
Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To:  <mailto:devel@kannel.org> devel@kannel.org
Subject: Validity perdiod

 

I came across an issue since svn version 4956 of smsbox.c, using smpp.

 

The logs show the following:

 

2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"

 

This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.

 

How do I interpret this as "YYMMDDhhmmsstnnp"?

 

One of my clients needed to downgrade because of this issue.

 

== Rene

 



RE: Validity perdiod

2013-02-18 Thread Rene Kluwen
In sqlbox, two different things happen.

 

1.   Select rows from send_sms and send them to bearerbox (with validity
in minutes)

2.   Relay rows from smsbox to bearerbox and store them in sent_sms on
the fly. These messages have been processed by smsbox already and should not
be reprocessed.

 

I am not sure what exactly you did because I don't have time to look at the
code now. But something is going very wrong here. Even without using sqlbox
we are getting invalid validity_period fields in smsc_smpp.

 

On a side note, I see now that opensmppbox never sends a validity field to
its connected entity, now I look at it. But that's a different story.

 

== Rene

 

From: Alexander Malysh [mailto:malys...@gmail.com] On Behalf Of Alexander
Malysh
Sent: maandag 18 februari 2013 9:29
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

Hi Rene,

 

I converted validity & deferred to be unix timestamp internally, they were
in minutes before.

Due to the fact that I didn't know how sqlbox works, I assumed that validity
& deferred in the

sqlbox tables also stored in minutes therefore this conversion:

if validity set then (now - unix timestamp) / 60 -> minutes

 

the counter part is when selecting values from DB and sending to bearerbox:

 

/* convert validity and deferred to unix timestamp */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = time(NULL) + msg->sms.validity * 60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = time(NULL) + msg->sms.deferred * 60;

 

Alex

 

Am 16.02.2013 um 15:36 schrieb Rene Kluwen :





Also: in sqlbox.c (function smsbox_to_bearerbox()):

 

   /* convert validity & deferred to minutes */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = (msg->sms.validity - time(NULL))/60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;

 

Isn't this field encoded twice now? Once in smsbox and another time in
sqlbox?

 

Alexander, you made this change. Please shed some light.

 

From:  <mailto:devel-boun...@kannel.org> devel-boun...@kannel.org
[mailto:devel- <mailto:boun...@kannel.org> boun...@kannel.org] On Behalf Of
Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To:  <mailto:devel@kannel.org> devel@kannel.org
Subject: Validity perdiod

 

I came across an issue since svn version 4956 of smsbox.c, using smpp.

 

The logs show the following:

 

2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"

 

This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.

 

How do I interpret this as "YYMMDDhhmmsstnnp"?

 

One of my clients needed to downgrade because of this issue.

 

== Rene

 



RE: Problem with kannel

2013-02-18 Thread Rene Kluwen
Well done!

-Original Message-
From: Alan McNatty [mailto:a...@catalyst.net.nz] 
Sent: zondag 17 februari 2013 21:20
To: Rene Kluwen
Cc: 'orlis moreta'; 'Willy Mularto'; 'kannel_dev_mailinglist devel@kannel. org'
Subject: RE: Problem with kannel

Hi Rene,

That's incorrect ..

r4926 | amalysh | 2011-09-15 08:07:10 +1200 (Thu, 15 Sep 2011) | 3 lines

*  doc/userguide/userguide.xml, gw/smsc/smsc_smpp.c, gwlib/cfg.def:
applied
   patch that allows setting of esm_class in SMPP module.
   Thanks to Alan McNatty  for the patch.

Please check the user-guide.

Cheers,
Alan


On Sat, 2013-02-16 at 11:51 +0100, Rene Kluwen wrote:
> You cannot change esm class by configuration.
> 
> It’s hard coded.
> 
> For data-coding, see the alt-dcs field.
> 
>  
> 
> From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On 
> Behalf Of orlis moreta
> Sent: zaterdag 2 februari 2013 1:02
> To: Willy Mularto
> Cc: kannel_dev_mailinglist devel@kannel. org
> Subject: Re: Problem with kannel
> 
> 
>  
> 
> Thanks for help
> 
> 
>  
> 
> 
> I have an other question, i need to set Data Coding = 0x00 (SMSC 
> default Alphabet) and esm_class = 0 (Default)
> 
> 
>  
> 
> 
> Is it possible to do that in conf file?
> 
> 
>  
> 
> 
>  
> 
> 
>  SMPP PDU 0x97b5670 dump:
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   type_name: submit_sm
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   command_id: 4 = 0x0004
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   command_status: 0 = 0x
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   sequence_number: 3 =
> 0x0003
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   service_type: NULL
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr_ton: 1 =
> 0x0001
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr_npi: 1 =
> 0x0001
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr: "18299620518"
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   dest_addr_ton: 1 = 0x0001
> 
> 
> 2013-02-01 19:17:42 [6011] [6] DEBUG:   dest_addr_npi: 1 = 0x0001
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   destination_addr:
> "18299622439"
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   esm_class: 3 =
> 0x0003--->
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   protocol_id: 0 = 0x
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   priority_flag: 0 = 0x
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   schedule_delivery_time: NULL
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   validity_period: NULL
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   registered_delivery: 1 =
> 0x0001
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   replace_if_present_flag: 0 =
> 0x
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   data_coding: 241 = 0x00f1
>  --->
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   sm_default_msg_id: 0 =
> 0x
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   sm_length: 10 = 0x000a
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:   short_message:
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:Octet string at 0x97b5760:
> 
> 
> 2013-02-01 19:17:43 [6011] [6] DEBUG:  len:  10
> 
> 
>  
> 
> 
>  
> 
> 
> Thanks
> 
> 
> Orlis
> 
> 
>  
> 
> 
>
> __
> De: Willy Mularto 
> Para: orlis moreta 
> CC: "kannel_dev_mailinglist devel@kannel. org" 
> Enviado: Domingo, 20 de enero, 2013 10:31 A.M.
> Asunto: Re: Problem with kannel
> 
> 
>  
> 
> You need to use http smsc not smpp
> 
> 
> SlyDroid
> 
> 
> On Jan 19, 2013 4:32 AM, "orlis moreta"  wrote:
> 
>  
> 
> 
> Hi All
> 
> 
>  
> 
> 
> I have GW 1.4-3 version installed but i'm failing to bind an SMSC.:
> 
> 
>  
> 
> 
>  
> 
> 
> Any help would be apreciated
> 
> 
>  
> 
> 
>  
> 
> 
>  SMPP PDU 0x9e5f740 dump:
> 
> 
> 2013-01-18 13:05:16 [9859] [6] DEBUG:   type_name: bind_transceiver
> 
> 
> 2013-01-18 13:05:16 [9859] [6] DEBUG:   command_id: 9 = 0x0009
> 
> 
> 2013-01-18 13:05:16 [9859] [6] DEBUG:   command_status: 0 = 0x
> 
> 
> 2013-01-18 13:05:16 [9859] [6] DEBUG:   sequence_number: 1 =
> 0x0001
> 
> 
> 2013-01-18 13:05:16 [9859] [6

RE: Multiple patches for Kannel

2013-02-17 Thread Rene Kluwen
Personally, I am happy someone looked at Kannel with a fresh eye and did
some sanity tests.
As a developer, we sometimes look over our own silly bugs.

Kannel is a volunteer project. That's why sometimes things that take more
time can be post poned.
But I will try to find some hours to look at your patches.

== Rene

-Original Message-
From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Aris Adamantiadis
Sent: zaterdag 16 februari 2013 21:43
To: devel@kannel.org
Subject: Re: Multiple patches for Kannel

Hi Everyone,

Was someone able to inspect my patches and give some feedback ? I hope the
48 different patches did not frighten anyone :) I'm still available if
there's some issue or question on a change.

Kr,

Aris

Le 8/02/13 13:49, Aris Adamantiadis a écrit :
> Hello,
> 
> While the test haven't completed, I will not have much time later to 
> work with the patches so here it is.
> As you can see, it has been split into 48 different files. (hence the
> .tgz) Not all of them are of equal importance.
> They all apply to kannel 1.5.0-release. I did not try to cherry pick 
> them in the current branch.
> Some special patches:
> 0001-Changements-de-Martin.patch: This fixes a problem with the Oracle 
> SQL expression (Already fixed in svn I think), but also a problem in 
> text conversion, in which an SMS containing only ciphers would be 
> converted into ascii (This causes problem when kannel is used to send 
> one time passwords).
> 0047-cherry-pick-of-gsoap-ParlayX-support.patch: This is a backport of 
> ParlayX on 1.5.0.
> 0048-Fix-out-of-bound-read-strcpy-to-memcpy.patch: A potential bug I 
> fixed in the ParlayX code. I believe this will apply perfectly on the 
> svn branch.
> 
> It's possible that some patches contain /* flawfinder: ignore */. It 
> is perfectly safe not to merge these lines !
> Kind regards,
> 
> Aris
> 






RE: Validity perdiod

2013-02-16 Thread Rene Kluwen
Even with or without msg_escaped, the code is wrong.

Because the example that I gave below was without sqlbox.

 

From: Rinor Hoxha [mailto:rinorho...@gmail.com] 
Sent: zaterdag 16 februari 2013 18:30
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

 

It is going wrong because of that code on sqlbox.
 It is setting the original message validity in minutes, instead of
msg_escaped,so validity is sent to bearerbox and smsc in minutes but since
the last changes it is expected  in unixtimestamp secs.

I bet that for MT with validity set from smsbox, in sqlbox table you have
the validity value in unixtime instead of that in minutes.


This is how I get. If you set validity param on sendsms

smsbox:
from minutes to unix timestamp
msg->sms.validity = validity * 60 + time(NULL);

sqlbox:  smsbox_to_bearerbox()
from unixtimestamp to minutes
msg->sms.validity = (msg->sms.validity - time(NULL))/60;
...
send_msg(conn->bearerbox_connection, conn, msg); 

smsc_smpp:
arrives here in minutes but is expected in sec unix timestamp.
validity = msg->sms.validity;

gw_gmtime(validity); here the validity is in minutes thas why that issue

PS: Sorry if I interfered 

 

 

On Sat, Feb 16, 2013 at 6:06 PM, Rene Kluwen  wrote:

msg_escaped is just a duplicate of the original message.
It is used because gw_sql_save_msg does in-place quoting of the resulting
message.

It gets weirder. From the log files of a client:

2013-02-05 12:22:08 [24338] [9] DEBUG:   schedule_delivery_time:
"130205122108000+"
2013-02-05 12:22:08 [24338] [9] DEBUG:   validity_period: "130205122108000+"

Also they know me to write:

Gets weirder. I set the validity period and we're still getting back SMSC
returned error code 0x0062 (Invalid message validity period) in response
to submit_sm.

Something is going terribly wrong here.


From: Rinor Hoxha [mailto:rinorho...@gmail.com]
Sent: zaterdag 16 februari 2013 17:33
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod


I also was looking into this.
Is it possible he wanted msg_escaped in place of msg so when inserting into
db, validity has the original value in minutes?

if (msg_type(msg) == sms) {
debug("sqlbox", 0, "smsbox_to_bearerbox: sms received");
msg_escaped = msg_duplicate(msg);
/* convert validity & deferred to minutes */
if (msg_escaped->sms.validity != SMS_PARAM_UNDEFINED)
msg_escaped->sms.validity = (msg_escaped->sms.validity -
time(NULL))/60;
if (msg_escaped->sms.deferred != SMS_PARAM_UNDEFINED)
msg_escaped->sms.deferred = (msg_escaped->sms.deferred -
time(NULL))/60;
gw_sql_save_msg(msg_escaped, octstr_imm("MT"));
msg_destroy(msg_escaped);
}

send_msg(conn->bearerbox_connection, conn, msg);
Br, Rinor

On Sat, Feb 16, 2013 at 3:36 PM, Rene Kluwen  wrote:
Also: in sqlbox.c (function smsbox_to_bearerbox()):
 
   /* convert validity & deferred to minutes */
if (msg->sms.validity != SMS_PARAM_UNDEFINED)
msg->sms.validity = (msg->sms.validity - time(NULL))/60;
if (msg->sms.deferred != SMS_PARAM_UNDEFINED)
msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;
 
Isn't this field encoded twice now? Once in smsbox and another time in
sqlbox?
 
Alexander, you made this change. Please shed some light.
 
From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To: devel@kannel.org
Subject: Validity perdiod
 
I came across an issue since svn version 4956 of smsbox.c, using smpp.
 
The logs show the following:
 
2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"
 
This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.
 
How do I interpret this as "YYMMDDhhmmsstnnp"?
 
One of my clients needed to downgrade because of this issue.
 
== Rene



 



RE: Validity perdiod

2013-02-16 Thread Rene Kluwen
msg_escaped is just a duplicate of the original message.
It is used because gw_sql_save_msg does in-place quoting of the resulting
message.

It gets weirder. From the log files of a client:

2013-02-05 12:22:08 [24338] [9] DEBUG:   schedule_delivery_time:
"130205122108000+"
2013-02-05 12:22:08 [24338] [9] DEBUG:   validity_period: "130205122108000+"

Also they know me to write:

Gets weirder. I set the validity period and we're still getting back SMSC
returned error code 0x0062 (Invalid message validity period) in response
to submit_sm.

Something is going terribly wrong here.


From: Rinor Hoxha [mailto:rinorho...@gmail.com] 
Sent: zaterdag 16 februari 2013 17:33
To: Rene Kluwen
Cc: devel@kannel.org
Subject: Re: Validity perdiod

I also was looking into this. 
Is it possible he wanted msg_escaped in place of msg so when inserting into
db, validity has the original value in minutes?

    if (msg_type(msg) == sms) {
    debug("sqlbox", 0, "smsbox_to_bearerbox: sms received");
    msg_escaped = msg_duplicate(msg);
    /* convert validity & deferred to minutes */
    if (msg_escaped->sms.validity != SMS_PARAM_UNDEFINED)
    msg_escaped->sms.validity = (msg_escaped->sms.validity -
time(NULL))/60;
    if (msg_escaped->sms.deferred != SMS_PARAM_UNDEFINED)
    msg_escaped->sms.deferred = (msg_escaped->sms.deferred -
time(NULL))/60;
    gw_sql_save_msg(msg_escaped, octstr_imm("MT"));
    msg_destroy(msg_escaped);
    }

    send_msg(conn->bearerbox_connection, conn, msg);
Br, Rinor

On Sat, Feb 16, 2013 at 3:36 PM, Rene Kluwen  wrote:
Also: in sqlbox.c (function smsbox_to_bearerbox()):
 
   /* convert validity & deferred to minutes */
    if (msg->sms.validity != SMS_PARAM_UNDEFINED)
    msg->sms.validity = (msg->sms.validity - time(NULL))/60;
    if (msg->sms.deferred != SMS_PARAM_UNDEFINED)
    msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;
 
Isn’t this field encoded twice now? Once in smsbox and another time in
sqlbox?
 
Alexander, you made this change. Please shed some light.
 
From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To: devel@kannel.org
Subject: Validity perdiod
 
I came across an issue since svn version 4956 of smsbox.c, using smpp.
 
The logs show the following:
 
2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"
 
This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.
 
How do I interpret this as “YYMMDDhhmmsstnnp”?
 
One of my clients needed to downgrade because of this issue.
 
== Rene





RE: Validity perdiod

2013-02-16 Thread Rene Kluwen
Also: in sqlbox.c (function smsbox_to_bearerbox()):

 

   /* convert validity & deferred to minutes */

if (msg->sms.validity != SMS_PARAM_UNDEFINED)

msg->sms.validity = (msg->sms.validity - time(NULL))/60;

if (msg->sms.deferred != SMS_PARAM_UNDEFINED)

msg->sms.deferred = (msg->sms.deferred - time(NULL))/60;

 

Isn't this field encoded twice now? Once in smsbox and another time in
sqlbox?

 

Alexander, you made this change. Please shed some light.

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Rene Kluwen
Sent: vrijdag 15 februari 2013 15:16
To: devel@kannel.org
Subject: Validity perdiod

 

I came across an issue since svn version 4956 of smsbox.c, using smpp.

 

The logs show the following:

 

2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"

 

This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.

 

How do I interpret this as "YYMMDDhhmmsstnnp"?

 

One of my clients needed to downgrade because of this issue.

 

== Rene



RE: Problem with kannel

2013-02-16 Thread Rene Kluwen
You cannot change esm class by configuration.

It's hard coded.

For data-coding, see the alt-dcs field.

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of orlis moreta
Sent: zaterdag 2 februari 2013 1:02
To: Willy Mularto
Cc: kannel_dev_mailinglist devel@kannel. org
Subject: Re: Problem with kannel

 

Thanks for help

 

I have an other question, i need to set Data Coding = 0x00 (SMSC default
Alphabet) and esm_class = 0 (Default)

 

Is it possible to do that in conf file?

 

 

 SMPP PDU 0x97b5670 dump:

2013-02-01 19:17:42 [6011] [6] DEBUG:   type_name: submit_sm

2013-02-01 19:17:42 [6011] [6] DEBUG:   command_id: 4 = 0x0004

2013-02-01 19:17:42 [6011] [6] DEBUG:   command_status: 0 = 0x

2013-02-01 19:17:42 [6011] [6] DEBUG:   sequence_number: 3 = 0x0003

2013-02-01 19:17:42 [6011] [6] DEBUG:   service_type: NULL

2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr_ton: 1 = 0x0001

2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr_npi: 1 = 0x0001

2013-02-01 19:17:42 [6011] [6] DEBUG:   source_addr: "18299620518"

2013-02-01 19:17:42 [6011] [6] DEBUG:   dest_addr_ton: 1 = 0x0001

2013-02-01 19:17:42 [6011] [6] DEBUG:   dest_addr_npi: 1 = 0x0001

2013-02-01 19:17:43 [6011] [6] DEBUG:   destination_addr: "18299622439"

2013-02-01 19:17:43 [6011] [6] DEBUG:   esm_class: 3 =
0x0003--
->

2013-02-01 19:17:43 [6011] [6] DEBUG:   protocol_id: 0 = 0x

2013-02-01 19:17:43 [6011] [6] DEBUG:   priority_flag: 0 = 0x

2013-02-01 19:17:43 [6011] [6] DEBUG:   schedule_delivery_time: NULL

2013-02-01 19:17:43 [6011] [6] DEBUG:   validity_period: NULL

2013-02-01 19:17:43 [6011] [6] DEBUG:   registered_delivery: 1 = 0x0001

2013-02-01 19:17:43 [6011] [6] DEBUG:   replace_if_present_flag: 0 =
0x

2013-02-01 19:17:43 [6011] [6] DEBUG:   data_coding: 241 = 0x00f1
--->

2013-02-01 19:17:43 [6011] [6] DEBUG:   sm_default_msg_id: 0 = 0x

2013-02-01 19:17:43 [6011] [6] DEBUG:   sm_length: 10 = 0x000a

2013-02-01 19:17:43 [6011] [6] DEBUG:   short_message:

2013-02-01 19:17:43 [6011] [6] DEBUG:Octet string at 0x97b5760:

2013-02-01 19:17:43 [6011] [6] DEBUG:  len:  10

 

 

Thanks

Orlis

 

  _  

De: Willy Mularto 
Para: orlis moreta  
CC: "kannel_dev_mailinglist devel@kannel. org"  
Enviado: Domingo, 20 de enero, 2013 10:31 A.M.
Asunto: Re: Problem with kannel

 

You need to use http smsc not smpp

SlyDroid

On Jan 19, 2013 4:32 AM, "orlis moreta"  wrote:

 

Hi All

 

I have GW 1.4-3 version installed but i'm failing to bind an SMSC.:

 

 

Any help would be apreciated

 

 

 SMPP PDU 0x9e5f740 dump:

2013-01-18 13:05:16 [9859] [6] DEBUG:   type_name: bind_transceiver

2013-01-18 13:05:16 [9859] [6] DEBUG:   command_id: 9 = 0x0009

2013-01-18 13:05:16 [9859] [6] DEBUG:   command_status: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   sequence_number: 1 = 0x0001

2013-01-18 13:05:16 [9859] [6] DEBUG:   system_id: "ivan"

2013-01-18 13:05:16 [9859] [6] DEBUG:   password: "ivan1234"

2013-01-18 13:05:16 [9859] [6] DEBUG:   system_type: "'VMA'"

2013-01-18 13:05:16 [9859] [6] DEBUG:   interface_version: 48 = 0x0030

2013-01-18 13:05:16 [9859] [6] DEBUG:   addr_ton: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   addr_npi: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   address_range: NULL

2013-01-18 13:05:16 [9859] [6] DEBUG: SMPP PDU dump ends.

2013-01-18 13:05:16 [9859] [7] DEBUG:
SMPP[SMPP:sms.secure-mytouchtone.net:9501/9501:ivan:'VMA']: Sending PDU:

2013-01-18 13:05:16 [9859] [7] DEBUG: SMPP PDU 0x9e5f888 dump:

2013-01-18 13:05:16 [9859] [7] DEBUG:   type_name: bind_receiver

2013-01-18 13:05:16 [9859] [7] DEBUG:   command_id: 1 = 0x0001

2013-01-18 13:05:16 [9859] [7] DEBUG:   command_status: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   sequence_number: 2 = 0x0002

2013-01-18 13:05:16 [9859] [7] DEBUG:   system_id: "ivan"

2013-01-18 13:05:16 [9859] [7] DEBUG:   password: "ivan1234"

2013-01-18 13:05:16 [9859] [7] DEBUG:   system_type: "'VMA'"

2013-01-18 13:05:16 [9859] [7] DEBUG:   interface_version: 48 = 0x0030

2013-01-18 13:05:16 [9859] [7] DEBUG:   addr_ton: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   addr_npi: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   address_range: NULL

2013-01-18 13:05:16 [9859] [7] DEBUG: SMPP PDU dump ends.

2013-01-18 13:05:16 [9859] [6] ERROR: SMPP: PDU length was too large
(1213486160, maximum is 7424).

2013-01-18 13:05:16 [9859] [6] ERROR:
SMPP[SMPP:sms.secure-mytouchtone.net:9501/9501:ivan:'VMA']: Server sent
garbage, ignored.

2013-01-18 13:05:16 [9859] [6] ERROR:
SMPP[SMPP:sms.secure-mytouchtone.net:9501/9501:ivan:'VMA']: I/O error or
other error. Re-connecting.

2013-01-18 13:05:16 [9859] [6] ERROR:
SMPP[SMPP:sms.secure-mytouchtone.net:9501/950

Validity perdiod

2013-02-15 Thread Rene Kluwen
I came across an issue since svn version 4956 of smsbox.c, using smpp.

 

The logs show the following:

 

2013-02-15 14:52:45 [3144] [7] DEBUG:   validity_period: "70215159000+"

 

This was this afternoon at 14:52. The validity field of the sendsms
interface was not set.

 

How do I interpret this as "YYMMDDhhmmsstnnp"?

 

One of my clients needed to downgrade because of this issue.

 

== Rene



RE: Build - RPM

2013-01-22 Thread Rene Kluwen
For sqlbox and opensmppbox "make rpm" should work.
I think for Kannel itself it doesn't work (anymore).

== Rene

-Original Message-
From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of spameden
Sent: maandag 21 januari 2013 21:39
To: Brian McCavour
Cc: devel@kannel.org
Subject: Re: Build - RPM

there is an spec.rpm for altlinux, you can modify it for centos or any other
RPM-based distro:

https://github.com/blinohod/kannel-altlinux

2013/1/22 Brian McCavour :
> Hi,
>
> Bunch of build-deploy questions.
> I want to re-create the rpm as it is when downloading the binary. Is 
> there a rpm spec file or anything around?
>
> Can I just run make, and tar/gz the gw/bearerbox, gw/smsbox, and 
> gw/wapbox binaries? Or do I need other files?
> I'm not sure if maybe this is the wrong target, since when I run 
> bearerbox directly from gw dir, the -d flag doesn't seem to 
> work.Although I just realized maybe I need to separately start it after
using this flag?
>
> Also when I do make install, it copies files kind of all over, .h 
> files and everything, which I found a bit odd, but I'm not too 
> experienced with either linux or C unfortunately (yet)
>
>
> Thanks for any assistance,
> Brian





RE: Problem with kannel

2013-01-20 Thread Rene Kluwen
It seems that the remote end is talking http.

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of orlis moreta
Sent: zaterdag 19 januari 2013 19:21
To: Andreas Fink
Cc: devel Devel
Subject: Re: Problem with kannel

 

Thanks for your quick response

 

See attach dump.

 

Waiting your feedback

 

Regards

Orlis

 

  _  

De: Andreas Fink 
Para: orlis moreta  
CC: devel Devel  
Enviado: Sábado, 19 de enero, 2013 10:07 A.M.
Asunto: Re: Problem with kannel

 

please take a tcpdump of the communication. I believe however that your
server is not talking SMPP but something else or that one side is using SSL
and the other is not. The "secure" in the name hints that SSL might be in
use but you have not configured kannel to use SSL. Use of SSL is not part of
the SMPP standard but supported by many 3rd party implementations.

 

On 18.01.2013, at 22:30, orlis moreta  wrote:





 

Hi All

 

I have GW 1.4-3 version installed but i'm failing to bind an SMSC.:

 

 

Any help would be apreciated

 

 

 SMPP PDU 0x9e5f740 dump:

2013-01-18 13:05:16 [9859] [6] DEBUG:   type_name: bind_transceiver

2013-01-18 13:05:16 [9859] [6] DEBUG:   command_id: 9 = 0x0009

2013-01-18 13:05:16 [9859] [6] DEBUG:   command_status: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   sequence_number: 1 = 0x0001

2013-01-18 13:05:16 [9859] [6] DEBUG:   system_id: "ivan"

2013-01-18 13:05:16 [9859] [6] DEBUG:   password: "ivan1234"

2013-01-18 13:05:16 [9859] [6] DEBUG:   system_type: "'VMA'"

2013-01-18 13:05:16 [9859] [6] DEBUG:   interface_version: 48 = 0x0030

2013-01-18 13:05:16 [9859] [6] DEBUG:   addr_ton: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   addr_npi: 0 = 0x

2013-01-18 13:05:16 [9859] [6] DEBUG:   address_range: NULL

2013-01-18 13:05:16 [9859] [6] DEBUG: SMPP PDU dump ends.

2013-01-18 13:05:16 [9859] [7] DEBUG: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: Sending PDU:

2013-01-18 13:05:16 [9859] [7] DEBUG: SMPP PDU 0x9e5f888 dump:

2013-01-18 13:05:16 [9859] [7] DEBUG:   type_name: bind_receiver

2013-01-18 13:05:16 [9859] [7] DEBUG:   command_id: 1 = 0x0001

2013-01-18 13:05:16 [9859] [7] DEBUG:   command_status: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   sequence_number: 2 = 0x0002

2013-01-18 13:05:16 [9859] [7] DEBUG:   system_id: "ivan"

2013-01-18 13:05:16 [9859] [7] DEBUG:   password: "ivan1234"

2013-01-18 13:05:16 [9859] [7] DEBUG:   system_type: "'VMA'"

2013-01-18 13:05:16 [9859] [7] DEBUG:   interface_version: 48 = 0x0030

2013-01-18 13:05:16 [9859] [7] DEBUG:   addr_ton: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   addr_npi: 0 = 0x

2013-01-18 13:05:16 [9859] [7] DEBUG:   address_range: NULL

2013-01-18 13:05:16 [9859] [7] DEBUG: SMPP PDU dump ends.

2013-01-18 13:05:16 [9859] [6] ERROR: SMPP: PDU length was too large
(1213486160, maximum is 7424).

2013-01-18 13:05:16 [9859] [6] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: Server sent garbage,
ignored.

2013-01-18 13:05:16 [9859] [6] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: I/O error or other error.
Re-connecting.

2013-01-18 13:05:16 [9859] [6] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: Couldn't connect to SMS
center (retrying in 10 seconds).

2013-01-18 13:05:16 [9859] [7] ERROR: SMPP: PDU length was too large
(1213486160, maximum is 7424).

2013-01-18 13:05:16 [9859] [7] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: Server sent garbage,
ignored.

2013-01-18 13:05:16 [9859] [7] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: I/O error or other error.
Re-connecting.

2013-01-18 13:05:16 [9859] [7] ERROR: SMPP[SMPP:sms.secure-mytouchtone.net
 :9501/9501:ivan:'VMA']: Couldn't connect to SMS
center (retrying in 10 seconds).

 

 

Thanks

orlis

 

 



RE: mysql support for kannel 1.5.0 from DEB packages

2013-01-05 Thread Rene Kluwen
It seems to be an sqlbox problem, crashing for some reason or another.

 

From: cgchen [mailto:cgch...@yahoo.com.au] 
Sent: zaterdag 5 januari 2013 17:50
To: Rene Kluwen; devel@kannel.org
Subject: Re: mysql support for kannel 1.5.0 from DEB packages

 

sorry, I cut that bit out. See blow. This should be straight forward. Along 
with the settings below, I created a db and granted all privileges to the db 
user. Am I missing something? or the DEB package simply doesn't support mysql

 

group = mysql-connection
id = mydlr
host = localhost
username = foo
password = bar
database = dlr
max-connections = 1
 
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc

 

  _  

From: Rene Kluwen 
To: 'cgchen' ; devel@kannel.org 
Sent: Sunday, 6 January 2013 3:40 AM
Subject: RE: mysql support for kannel 1.5.0 from DEB packages

 

In your previous email with your configuration files, there’s a group = dlr-db 
missing.

Possibly that’s your problem.

 

From: cgchen [mailto:cgch...@yahoo.com.au] 
Sent: zaterdag 5 januari 2013 17:06
To: Rene Kluwen; devel@kannel.org
Subject: Re: mysql support for kannel 1.5.0 from DEB packages

 

there's nothing in bearerbox.log nor access.log within kannel. smsbox.log is 
the only one that shows anything. I've tested the mysql credentials so it's not 
that.

 

 

2013-01-06 02:03:12 [27121] [0] DEBUG: Kannel smsbox version 1.5.0 starting

2013-01-06 02:03:12 [27121] [0] DEBUG:   dumping group (sendsms-user):

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 4 
(gw/smsbox.c:obey_request_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 5 
(gw/smsbox.c:url_result_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 6 
(gw/smsbox.c:http_queue_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Connecting to <127.0.0.1>

2013-01-06 02:03:12 [27121] [0] ERROR: connect to <127.0.0.1> failed

2013-01-06 02:03:12 [27121] [0] ERROR: System error 111: Connection refused

2013-01-06 02:03:12 [27121] [0] ERROR: error connecting to server `127.0.0.1' 
at port `13001'

2013-01-06 02:03:12 [27121] [0] PANIC: Couldn't connect to the bearerbox.

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox(gw_panic+0x147) 
[0x43fd97]

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox(main+0xcc5) [0x40ff45]

2013-01-06 02:03:12 [27121] [0] PANIC: /lib/libc.so.6(__libc_start_main+0xfd) 
[0x7f92e6324c8d]

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox() [0x40ebf9]

2013-01-06 02:03:24 [27203] [0] INFO: Added logfile 
`/var/log/kannel/smsbox.log' with level `0'.

2013-01-06 02:03:24 [27203] [0] INFO: Logging accesses to 
'/var/log/kannel/access.log'.

2013-01-06 02:03:24 [27203] [0] INFO: Started access logfile 
`/var/log/kannel/access.log'.

2013-01-06 02:03:24 [27203] [0] INFO: HTTP: Opening server at port 13013.

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 2 
(gwlib/http.c:server_thread)

2013-01-06 02:03:24 [27203] [0] INFO: Set up send sms service at port 13013

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 3 
(gw/smsbox.c:sendsms_thread)

 

  _  

From: Rene Kluwen 
To: 'cgchen' ; devel@kannel.org 
Sent: Sunday, 6 January 2013 2:55 AM
Subject: RE: mysql support for kannel 1.5.0 from DEB packages

 

What do your logs have to say about it?

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf Of 
cgchen
Sent: zaterdag 5 januari 2013 16:27
To: devel@kannel.org
Subject: mysql support for kannel 1.5.0 from DEB packages

 

Hi,

 

Can someone please confirm that kannel 1.5.0 from deb package comes with mysql 
support. The reason I asked is because as soon as I changed dlr-storage to 
mysql with mysql connection settings from the user guide, I'm not able to start 
kannel back up

 

Thanks. 

 

 



RE: mysql support for kannel 1.5.0 from DEB packages

2013-01-05 Thread Rene Kluwen
In your previous email with your configuration files, there's a group =
dlr-db missing.

Possibly that's your problem.

 

From: cgchen [mailto:cgch...@yahoo.com.au] 
Sent: zaterdag 5 januari 2013 17:06
To: Rene Kluwen; devel@kannel.org
Subject: Re: mysql support for kannel 1.5.0 from DEB packages

 

there's nothing in bearerbox.log nor access.log within kannel. smsbox.log is
the only one that shows anything. I've tested the mysql credentials so it's
not that.

 

 

2013-01-06 02:03:12 [27121] [0] DEBUG: Kannel smsbox version 1.5.0 starting

2013-01-06 02:03:12 [27121] [0] DEBUG:   dumping group (sendsms-user):

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG:  = 

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 4
(gw/smsbox.c:obey_request_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 5
(gw/smsbox.c:url_result_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Started thread 6
(gw/smsbox.c:http_queue_thread)

2013-01-06 02:03:12 [27121] [0] DEBUG: Connecting to <127.0.0.1>

2013-01-06 02:03:12 [27121] [0] ERROR: connect to <127.0.0.1> failed

2013-01-06 02:03:12 [27121] [0] ERROR: System error 111: Connection refused

2013-01-06 02:03:12 [27121] [0] ERROR: error connecting to server
`127.0.0.1' at port `13001'

2013-01-06 02:03:12 [27121] [0] PANIC: Couldn't connect to the bearerbox.

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox(gw_panic+0x147)
[0x43fd97]

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox(main+0xcc5)
[0x40ff45]

2013-01-06 02:03:12 [27121] [0] PANIC:
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f92e6324c8d]

2013-01-06 02:03:12 [27121] [0] PANIC: /usr/sbin/smsbox() [0x40ebf9]

2013-01-06 02:03:24 [27203] [0] INFO: Added logfile
`/var/log/kannel/smsbox.log' with level `0'.

2013-01-06 02:03:24 [27203] [0] INFO: Logging accesses to
'/var/log/kannel/access.log'.

2013-01-06 02:03:24 [27203] [0] INFO: Started access logfile
`/var/log/kannel/access.log'.

2013-01-06 02:03:24 [27203] [0] INFO: HTTP: Opening server at port 13013.

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)

2013-01-06 02:03:24 [27203] [0] INFO: Set up send sms service at port 13013

2013-01-06 02:03:24 [27203] [0] DEBUG: Started thread 3
(gw/smsbox.c:sendsms_thread)

 

  _  

From: Rene Kluwen 
To: 'cgchen' ; devel@kannel.org 
Sent: Sunday, 6 January 2013 2:55 AM
Subject: RE: mysql support for kannel 1.5.0 from DEB packages

 

What do your logs have to say about it?

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of cgchen
Sent: zaterdag 5 januari 2013 16:27
To: devel@kannel.org
Subject: mysql support for kannel 1.5.0 from DEB packages

 

Hi,

 

Can someone please confirm that kannel 1.5.0 from deb package comes with
mysql support. The reason I asked is because as soon as I changed
dlr-storage to mysql with mysql connection settings from the user guide, I'm
not able to start kannel back up

 

Thanks. 

 



RE: mysql support for kannel 1.5.0 from DEB packages

2013-01-05 Thread Rene Kluwen
What do your logs have to say about it?

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of cgchen
Sent: zaterdag 5 januari 2013 16:27
To: devel@kannel.org
Subject: mysql support for kannel 1.5.0 from DEB packages

 

Hi,

 

Can someone please confirm that kannel 1.5.0 from deb package comes with
mysql support. The reason I asked is because as soon as I changed
dlr-storage to mysql with mysql connection settings from the user guide, I'm
not able to start kannel back up

 

Thanks. 



RE: debian wheezy kannel 1.5.0 with kannel-sqlbox 0.7.2.-3

2013-01-05 Thread Rene Kluwen
Usually this is due to a version mismatch.

Try to install the same version of smsbox that comes with kannel in the
addons folder.

 

== Rene

 

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of cgchen
Sent: zaterdag 5 januari 2013 14:58
To: devel@kannel.org
Subject: debian wheezy kannel 1.5.0 with kannel-sqlbox 0.7.2.-3

 

Hi

 

I've been trying to integrate sqlbox with kannel. Kannel 1.5.0 is installed
through the downloaded deb package as per installation guide and
kannel-sqlbox 0.7.2-3 is installed through apt-get install on Debian Wheezy.

 

My problem is that when smsbox is connected directly to the bearerbox,
everything works fine but when I added sqlbox in the middle of the 2, all
the processes starts up fine as usual but as soon as I send a msg, both the
smsbox and sqlbox processes crashes instantly. Please see below for sqlbox
logs:

 

 2013-01-05 22:38:18 [8658] [0] INFO: Added logfile
`/var/log/kannel/kannel-sqlbox.log' with level `0'.

2013-01-05 22:38:18 [8658] [0] INFO: MYSQL: Connected to server at
localhost.

2013-01-05 22:38:18 [8658] [0] INFO: MYSQL: server version
5.1.66-0+squeeze1, client version 5.1.66.

2013-01-05 22:38:18 [8658] [0] DEBUG: Started thread 1
(sqlbox.c:sql_to_bearerbox)

2013-01-05 22:38:18 [8658] [1] DEBUG: Thread 1 (sqlbox.c:sql_to_bearerbox)
maps to pid 8658.

2013-01-05 22:38:18 [8658] [1] INFO: Connected to bearerbox at 127.0.0.1
port 13001.

2013-01-05 22:38:18 [8658] [1] DEBUG: Started thread 2
(sqlbox.c:bearerbox_to_sql)

2013-01-05 22:38:18 [8658] [2] DEBUG: Thread 2 (sqlbox.c:bearerbox_to_sql)
maps to pid 8658.

2013-01-05 22:38:19 [8658] [0] DEBUG: Started thread 3 (sqlbox.c:function)

2013-01-05 22:38:19 [8658] [3] DEBUG: Thread 3 (sqlbox.c:function) maps to
pid 8658.

2013-01-05 22:38:19 [8658] [3] INFO: Client connected from <127.0.0.1>

2013-01-05 22:38:19 [8658] [3] INFO: Connected to bearerbox at 127.0.0.1
port 13001.

2013-01-05 22:38:19 [8658] [3] DEBUG: Started thread 4
(sqlbox.c:bearerbox_to_smsbox)

2013-01-05 22:38:19 [8658] [3] DEBUG: smsbox_to_bearerbox: got boxc_id
 from <127.0.0.1>

2013-01-05 22:38:19 [8658] [4] DEBUG: Thread 4
(sqlbox.c:bearerbox_to_smsbox) maps to pid 8658.

2013-01-05 22:38:53 [8658] [3] DEBUG: smsbox_to_bearerbox: sms received

2013-01-05 22:38:53 [8658] [4] INFO: Connection closed by the box
<127.0.0.1>

2013-01-05 22:38:53 [8658] [4] DEBUG: bearerbox_to_smsbox: connection to
bearerbox died.

2013-01-05 22:38:53 [8658] [4] DEBUG: Thread 4
(sqlbox.c:bearerbox_to_smsbox) terminates.

2013-01-05 22:38:53 [8658] [3] DEBUG: Thread 3 (sqlbox.c:function)
terminates.

2013-01-05 22:38:53 [8658] [1] DEBUG: Thread 1 (sqlbox.c:sql_to_bearerbox)
terminates.

2013-01-05 22:39:03 [8658] [0] DEBUG: Thread 2 (sqlbox.c:bearerbox_to_sql)
still running

2013-01-05 22:39:03 [8658] [0] DEBUG: Immutable octet strings: 62.

 

 

Does anybody know why this is happening or had any success with such setup
and could provide any assistance is much appreciated.

 

Thanks in advance.

 

Here is my complete setup:

 

group = core

dlr-storage = internal

admin-port = 13000

admin-password = abcabc

status-password = abcabc

admin-deny-ip = "*.*.*.*"

admin-allow-ip = "127.0.0.1;192.168.1.*"

smsbox-port = 13001

log-level = 0

log-file = "/var/log/kannel/bearerbox.log"

box-deny-ip = "*.*.*.*"

box-allow-ip = "127.0.0.1;192.168.1.*"

 

group = smsbox

smsbox-id = smsbox1

bearerbox-host = 127.0.0.1

bearerbox-port = 13003

sendsms-port = 13013

log-file = "/var/log/kannel/smsbox.log"

log-level = 0

access-log = "/var/log/kannel/access.log"

 

group = sendsms-user

username = abcabc

password = abcabc

 

group = smsc

smsc = smpp

smsc-id = SMSC1

host = 1

port = 1

smsc-username = abcabc

smsc-password = abcabc

address-range = ""

system-type = ""

transceiver-mode = true

 

group = sms-service

keyword = default

accept-x-kannel-headers = true

max-messages = 100

assume-plain-text = true

catch-all = true

 

##sqlbox

group = sqlbox

id = sqlbox-db

smsbox-id = smsbox1

#smsbox-id = sqlbox

#global-sender = ""

bearerbox-host = 127.0.0.1

bearerbox-port = 13001

smsbox-port = 13003

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = "/var/log/kannel/kannel-sqlbox.log"

log-level = 0

#ssl-client-certkey-file = ""

#ssl-server-cert-file = ""

#ssl-server-key-file = ""

#ssl-trusted-ca-file = ""

 

# Database connection examples. Please uncomment as needed

 

# Example MYSQL Connection

group = mysql-connection

id = sqlbox-db

host = localhost

username = abcabc

password = abcabc

database = abcabc

 

 

 



Kannel certificate

2012-12-18 Thread Rene Kluwen
When I try to update from svn https, I get:

 

$ svn update

Error validating server certificate for 'https://svn.kannel.org:443':

- The certificate hostname does not match.

- The certificate has expired.

Certificate information:

- Hostname: redmine.kannel.org

- Valid: from Dec 18 03:47:17 2011 GMT until Dec 18 15:40:34 2012 GMT

- Issuer: Secure Digital Certificate Signing, StartCom Ltd., IL

- Fingerprint: ee:f7:38:a9:89:ce:12:cf:3a:4f:ba:8a:ee:47:85:88:f8:1a:be:c5

(R)eject, accept (t)emporarily or accept (p)ermanently? T

 

 

Who is in charge of the Kannel server?



RE: outgoing queue limit in bearbox

2012-12-13 Thread Rene Kluwen
What if you just set the queue-limit to 0. Won't that have the same effect?

 

== Rene

 

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Nick Mahilani
Sent: donderdag 13 december 2012 19:04
To: Amin Mukhaimer
Cc: de...@vm1.kannel.org
Subject: Re: outgoing queue limit in bearbox

 

Thanks Amin !

While this approach works it is not very scalable if we have more operators
in the future. As an alternative, I have defined a configurable in kannel
config to bypass retries using the outgoing_sms queue. When turned on, this
option disables queuing any messages to the 'outgoing_sms' queue and sends
back a DLR NACK for any messages that fail for any reason(QFULL or
submit_sm_resp with error from SMSC). This essentially moves the retry logic
from kannel to the application using kannel and gives the application more
control of the retry logic. This also avoids one saturated bind from
affecting other binds.

I wanted to get some feedback and if you see any potential problems with
this approach. I have attached a diff for this change. Please review.

 

-Nick

 

Hi,
I am using kannel with multiple SMSCs in my org and we often see that high
load on one of the binds impacts the traffic on the other binds. After
looking at the code, I see that the outgoing_sms queue is used as a global
retry queue and if high load is directed to one of the binds, this fills up
the outgoing_sms queue and causes 503 for the other sms traffic going
through other binds.. 
As a potential fix, I have defined a configurable in kannel config to bypass
retries using the outgoing_sms queue. When turned on, this option disables
queuing any messages to the 'outgoing_sms' queue and sends back a DLR NACK
for any messages that fail due to QFULL conditions or other cases that would
otherwise enqueue to the 'outgoing_sms' queue. This essentially moves the
retry logic from kannel to the application using kannel..

I wanted to get some feedback on if you see any potential problems with this
approach. 
I can forward a diff if someone could review the diff and provide feedback.

thanks,
Nick

 

On Wed, Nov 21, 2012 at 11:01 PM, Amin Mukhaimer
 wrote:

Yes of course, just make different config files for each and run an instance
for each, like

 

bearerbox  operator1_config

smsboxoperator1_config

 

bearerbox operator2_config

smsbox  operator2_config

 

make sure they have different ports/spool directory/database tables/ log
files. and good luck

 

Amin

 

From: Nick Mahilani [mailto:nicky.mahil...@gmail.com] 
Sent: Wednesday, November 21, 2012 7:00 PM
To: ami...@arabmobilecontent.com
Cc: devel@kannel.org
Subject: RE: outgoing queue limit in bearbox

 

Thanks Amin for your suggestion...

Can we run multiple kannel instances on the same box?


Amin Mukhaimer  wrote:

I had a somewhat similar problem is that it tends to get slow when sending
high amounts of SMSs to specific SMSC, and SMSs sent to other SMSCs are
delayed for a while, so I decided to run multiple Kannels, one for each
operator, hopping that would increase overall performance.

 

I don't know if that helps, but good luck.

 

From: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On Behalf
Of Nick Mahilani
Sent: Wednesday, November 21, 2012 1:16 AM
To: devel@kannel.org
Subject: outgoing queue limit in bearbox

 

Hi,

I have an application which is using Kannel to send outgoing sms via
multiple SMSC's. However, there is an insane volume of messages that needs
to go through one of the SMSC which is impacting the other binds due to the
global outgoing queue limit check in the code.

 
 if ( 
max_outgoing_sms_qlength > 0 && !
 resend &&
01091  queue_length >
 gwlist_len(smsc_list) *
max_outgoing_sms_qlength) {
01092  
gw_rwlock_unlock(&smsc_list_lock);
01093  
debug("bb.sms", 0, "sum(#queues) limit");
01094 return SMSCCONN_FAILED_QFULL;
01095 }

I am very new to the kannel codebase so wanted to get some input on how
complicated is the fix to isolate the queue limits to each bind/SMSC. I
would like the other binds to not get affected by high volume of traffic on
one of the binds. So if one smsc queue is backed up, it does not impact the
messages sent to other SMSC's.

Also, what is recommended outgoing queue limit value in terms of messages
per second being sent through Kannel?

 

thanks,

Nick

 



RE: Making a http to http MT kannel

2012-12-12 Thread Rene Kluwen
You can set up two different http smsc’s for that, right? Like smscA and smscB.

 

And when you call the sendsms, do something like:

 

http://smsbox.host.name:port/cgi-bin/sendsms?username=foo 

 &password=bar&smsc=smsA&to=0123456&text=Hello+world
 
or
 
http://smsbox.host.name:port/cgi-bin/sendsms?username=foo 

 &password=bar&smsc=smsB&to=0123456&text=Hello+world

 

or am I missing your point?

 

=+= Rene

 

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On 
Behalf Of Brian McCavour
Sent: woensdag 12 december 2012 19:02
To: Andreas Fink
Cc: devel@kannel.org
Subject: Re: Making a http to http MT kannel

 

 

Right, sorry I was not clear. What I mean by protocol was just the body content 
format.I want the http IN to be able to take the same message data, and send it 
to 2 differnet http OUT with different format, based on a parameter in the 
request from the server.

 

Basically, my goal is to be able to send a request from my server like

http://smsbox.host.name:port/cgi-bin/sendsms?username=foo 

 &password=bar&SOMEID=id1&to=0123456&text=Hello+world
then have Kannel inernaly do:

if (SOMEID == id1)
{
POST 
...
text
}
else if (SOMEID == id2)
{
POST 
...
text
}

So foo, and bar are the 2 protocols I was speaking of earlier.

 

I just realized also that I can survive with no body in the request from my 
server, (as above) just not in sending to the smsc.

So actually I guess I do need the smsbox afterall. I think my first solution 
was not good.

 

I should configure a sendSms for my server, as in the example above and then 
configure a sms-service with a post-url to post this data to smsc (smsA, smsB 
in exmaple)I just might need to do some special implementations for formatting 
the posted data.

 

 

 

  _  

From: Andreas Fink 
To: Brian McCavour  
Cc: "devel@kannel.org"  
Sent: Wednesday, December 12, 2012 11:28:36 AM
Subject: Re: Making a http to http MT kannel

 

protocol ID's can be of different kind. There is a PID field in the SMS PDU 
which you can set by &pid=... if I'm not mistaken.

But there are also port numbers of WAP which can be considered Port ID's. They 
are in a UDH header.

 

Both are not part of the content by itself and the SMSC you submit it to have 
to support it. UDH headers are widely supported. Setting the PID might not..

 

 

On 12.12.2012, at 17:13, Brian McCavour  wrote:





Hi,

 

I just want to list what I believe is supported and what I believe I need to 
add support for, and see what you “experts” think.

 

I have 2 http interfaces to 2 different SMSC, using 2 separate (content) 
protocols, and an HTTP interface from my server.

I intend only to push content. (MT)

So I need to setup kannel to do: http in with some protocolID >>> format data 
based on ID >>> http out data to correct interface

 

I read the userguide and I’m poking around the code right now, but I’m a bit 
confused. (I have j2me background, so I’m learning C as I go)

 

Problem: http in, listening for my server

Solution:

It seems like what I need is the http SMSC configured to use “sendsms”.

If I do this I guess I basically ignore the smsbox, and so I’m just running the 
bearerbox process only.

So I would configure the bearerbox for a http / generic smsc. This would be 
listening for my server.

 

Problem: Routing to correct SMSC

Solution:

I could reuse one of the request cgi  param, maybe generic-param-service to 
modify the “send-url” internaly.

(or maybe theres an escape code I could use directly from the configuration 
file)

 

Problem: The incoming request from server needs to support body data, and the 
the outbound SMSC request/post needs to support body data

Solution:

Have not really made progress here. I guess I would just have to implements 
this, as I don’t see any body support.

 

Am I on the right track? Sorry if I seem so lost, im in slightly over my head, 
but hopefully not for too long.
Any tips/hints/corrections etc.. are encouraged.

 

Thanks,

Brian

 

 

 

 

 

 

 

 



Votes for opensmppbox

2012-12-08 Thread Rene Kluwen
The latest opensmppbox head revision keeps giving me headaches.

 

For example, if use-smppbox-id = true, then it doesn't store dlr
information.

 

Also, the redundant code of box-dlr.c is a little bit too much for me.

 

Besides that I received a useful routing patch. But that one depends on
opensmppbox before the use-smppbox-id patch.

 

What I would like is to make a separate branch of the current opensmppbox.
And then start with a clean copy where we can start developing on again.

 

Does this make sense?

 

== Rene

 



RE: Kannel and Outlook

2012-12-06 Thread Rene Kluwen
Just write an Outlook macro that does a http request.

I have one that works.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Rassoul Ghaznavi
Sent: maandag 19 november 2012 23:34
To: devel@kannel.org
Cc: devel-repo...@kannel.org
Subject: Kannel and Outlook

 

 

Hi Guys,

 

Is there any way to use Kannel SMS gateway on Outlook?

Is there any front end for outlook that we need to provide? Any change we
need to do on Kannel?

Any solution appreciated?

 

Regards

 

Rassoul Ghaznavi

Security and Unix Administrator

BIT - SBS Corporation

Ph: 02 94303436

 




  Image removed by sender. SBS proudly brings NITV,
National Indigenous TV free to air from 12/12/12 

<<~WRD000.jpg>>

RE: Error while SQLBOX running with MSSQL support

2012-12-06 Thread Rene Kluwen
This might be a credential problem.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of manas mohanty
Sent: maandag 5 november 2012 8:32
To: de...@vm1.kannel.org; us...@vm1.kannel.org
Subject: Error while SQLBOX running with MSSQL support

 

Hi All,
I am trying to implement kannel cvs version and sqlbox cvs version with
mssql support.

I have installed freeTDS successfully.

configure kannel successfully with below command 
./configure --with-mssql=/usr/local --enable-localtime

the make and make installed

kanne runs successfully with MSSQL connectivity.

Then I configure sqlbox 

 

./configure --with-kannel-dir=/home/kannel --with-mssql=/usr/local

 

and success fully configured

 

Configuring Kannel and DB dependancies ...

checking for Ct-Lib support... no

checking for FreeTDS Ct-Lib support... yes

checking for dlopen... no

checking for dlopen in -ldl... yes

checking for gw-config... /home/kannel/gw-config

checking Kannel version... svn-r5011M

checking Kannel libs... -L/usr/local/lib/kannel -lgw -lwap -lgwlib -lrt
-lresolv -lnsl -lm  -lpthread -lxml2 -lz -lm -L/usr/local//lib -lct

checking Kannel includes... -I/usr/local/include/kannel -g -O2
-D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_LARGE_FILES= -I/usr/include/libxml2
-I/usr/local//include

checking for cfg_create in -lgwlib... yes

checking for Kannel's DB support... ok

 

Generating output files ...

configure: creating ./config.status

config.status: creating Makefile

config.status: creating gw/Makefile

config.status: creating rpm/sqlbox.spec

config.status: creating sb-config.h

config.status: sb-config.h is unchanged

config.status: executing depfiles commands

config.status: executing libtool commands

 

after success fully install sqlbox and configure mssql connectivity when I
start sqlbox following error showing frequently .

 

2012-11-05 12:52:52 [13398] [0] ERROR: ct_send() failed

 

2012-11-05 12:52:52 [13398] [0] ERROR: MSSQL: DB selection failed!

2012-11-05 12:52:52 [13398] [0] DEBUG: DBPool has too few connections,
reconnecting up to maximum... 

 

Please help me in this regards ..

 Thanks in advance

 

Regards,

Manas

 

 



RE: [PATCH] foreign_id support for sqlbox

2012-10-02 Thread Rene Kluwen
The patch is a little bit difficult to read, but I get the concept.
One disadvantage of this patch is that it is backward incompatible. You need
to re-create the sqlbox tables and thereby you lose your old information.
If you are unaware of this incompatibility, and not recreate your tables,
sqlbox will suddenly fail to work.

Have you thought of a solution for this problem?

== Rene

-Original Message-
From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Stipe Tolj
Sent: Tuesday, 02 October, 2012 17:38
To: de...@vm1.kannel.org
Subject: [PATCH] foreign_id support for sqlbox

Hi list,

this is a simple patchset allowing to handle 'foreign_id' as we handle it in
the msg struct in the DB schemas.

Please review and vote for commit.

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
---


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2677 / Virus Database: 2591/5804 - Release Date: 10/02/12




RE: delivery report

2012-08-27 Thread Rene Kluwen
It's weird that this working in the first place.

It should be:

dlr-mask=31&dlr-url=http%3A%2F%2F127.0.0.1%2Fdlr.php%3Fdlr%3D%25d%26dest%3D%
25p%26report%3D%25A%0A&LogID=


== Rene

-Original Message-
From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of KC
Sent: Monday, 27 August, 2012 10:04
To: Willy Mularto
Cc: de...@vm1.kannel.org
Subject: Re: delivery report

Strange thing is I only can receive the status report 8 or 16 only.
Can you please advice is there any way I can check the queue ?

Regards,
KC



On 27/8/2012 3:43 PM, Willy Mularto wrote:
> A bit weird, but it might be caused by too many pending final DLR and the
queue reached the threshold and  Kannel started to ignore incoming DLR.
>
>
>
> On Aug 27, 2012, at 2:32 PM, KC wrote:
>
>> Hi Willy,
>>
>> Thanks for the response. Dlr-Mask is 31. Last time we can accept the
delivery status success report.
>> I just tried to restart the kannel and send a test SMS. Now I can receive
the SUCESSS delivery report after
>> restarting the kannel. Do you know what cause this issues ?
>>
>> Thanks
>> KC
>>
>> On 27/8/2012 3:06 PM, Willy Mularto wrote:
>>> This should be posted to users's list. There are some possibilities:
>>> 1. What is your dlr-mask?
>>> 2. Have you checked with your telco?
>>> 3. or have you checked  the bearerbox log?
>>>
>>>
>>>
>>> On Aug 27, 2012, at 1:52 PM, KC wrote:
>>>
 Dear Support,

 I have tried to set the following



dlr-mask=31&dlr-url=http://127.0.0.1/dlr.php?dlr=%d&dest=%p&report=%A&LogID=


 Previously we still can receive the delivery status report success "1"
from the dlr-url.

 Since last 2 weeks our system never received the delivery success
report (1 : delivery success).

 Now the system only receive the following delivery status

 8  : smsc submit
 16 : smsc reject


 Can you please advice ?

 Regards,
 KC

>>> Willy Mularto
>>> F300HD+MR18DE (NLC1725)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
> Willy Mularto
> F300HD+MR18DE (NLC1725)
>
>
>
>
>
>
>
>
>






RE: Sent_sms table not logging all messages

2012-08-24 Thread Rene Kluwen
Bearerbox is probably load balancing sms messages between the connected
smsbox & sqlbox.

In group = smsbox, try to add: bearerbox-port = 13003.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Clay Zevely
Sent: Friday, 24 August, 2012 19:54
To: de...@vm1.kannel.org
Subject: Sent_sms table not logging all messages

 

I have an issue where all messages do not log in the sent_sms table.

I can send exact same message 10 times and only 5 will log in database one
time and maybe 3 the next.

 

I have looked at logs and have been unable to determine what or where to
find the point of failure.

 

>From what I can tell is doing the following.

Based on my last last test the results are as follows

1)  I sent 9 messages from 123, 234, 345, 456, 567, 678, 789,890, and
901

2)  3 messages processed and  posted to the database correctly  from
456, 567, and 901

3)   In the smsbox.log it  logged only the messages that did not log to
database

5)  In bearbox.log it showed all messages none were missing.

 

As I understand it

The architecture of is divided in three kinds of processes called boxes:

1.   BearerBox is the core of the architecture - it implements the WDP
layer (provide basic core services)

2.  SMSBox implements the rest of the SMS gateway functionality (can
have multiple SMSBox)

3.  WAPBox implements WAP protocol stack and WAP Push (can have multiple
WAPBox)

I am not using any wap so only configured bearbox and smsbox

 

I would assume that something between bearbox and either smsbox sqlbox or
database is causing the failure just cannot find what or where.

Is there special logging or other troubleshooting I need to do to find where
it is failing.

 

**

Kannel.conf

*

#CORE

group = core

admin-port = 13000

smsbox-port = 13001

admin-password = hostin

wdp-interface-name = "*"

log-file = "/var/log/kannel/bearerbox.log"

store-file = "/var/log/kannel/kannel.store"

log-level = 0

box-deny-ip = "*.*.*.*"

box-allow-ip = "*.*.*.*"

dlr-storage = internal

 

#SMSBOX SETUP

group = smsbox

smsbox-id = "mysmsc"

bearerbox-host = localhost

sendsms-port = 13013

log-file = "/var/log/kannel/smsbox.log"

log-level = 0

http-request-retry = 3

http-queue-delay = 15

sendsms-chars = "0123456789 +-,~!@#$%^&*()"

global-sender = 12345

mo-recode = true

 

group = smsbox-route

smsbox-id = "mysmsc"

smsc-id = "mysmsc"

 

group = sms-service

keyword = default

catch-all = true

max-messages = 0

get-url = http://localhost/receivesms.php?sender=%p
 &text=%b

 

# SMSC SMPP

group = smsc

smsc-id = "mysmsc"

smsc = smpp

host = xxx.xxx.xxx.xxx

port = 16400

receive-port = 16400

smsc-username = Track

smsc-password = Track

system-type = ""

address-range = ""

 

group = sendsms-user

username = root

password = hostin

max-messages = 10

 

group = mysql-connection

id = mydlr

host = localhost

username = root

password = "hostin"

database = dlr

max-connections = 10

 

group = dlr-db

id = mydlr

table = dlr

field-smsc = smsc

field-timestamp = ts

field-destination = destination

field-source = source

field-service = service

field-url = url

field-mask = mask

field-status = status

field-boxc-id = boxc

 

 

**

sqlbox.conf

*

#Group sqlbox

group = sqlbox

id = mysmsc

smsbox-id = mysmsc

bearerbox-host = localhost

bearerbox-port = 13001

smsbox-port = 13003

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = "/var/log/kannel/kannel-sqlbox.log"

log-level = 0

 

group = mysql-connection

id = mysmsc

host = localhost

username = root

password = hostin

database = dlr

max-connections = 10



RE: Message text in Sent_sms

2012-08-21 Thread Rene Kluwen
Yes, the get-url should exist on your server and should handle MO requests.

See the users manual.

 

== Rene

 

From: Clay Zevely [mailto:clayzev...@gmail.com] 
Sent: Tuesday, 21 August, 2012 22:58
To: 'Rene Kluwen'; de...@vm1.kannel.org
Subject: RE: Message text in Sent_sms

 

I get the message 

 

NOT FOUND

The requested URL /dlr.php was not found on this server.

Apache/2.2.15 (CentOS) Server at localhost Port 80

 

 

I cannot even locate a dlr.php file if I am suppose to have one.

 

 

Clay

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Tuesday, August 21, 2012 4:11 PM
To: 'Clay Zevely'; de...@vm1.kannel.org
Subject: RE: Message text in Sent_sms

 

What happens if you call the url:
http://localhost/websms/inc/dlr.php?user=test
<http://localhost/websms/inc/dlr.php?user=test&passwd=hostin&to=%25p&message
=%25a> &passwd=hostin&to=%p&message=%a directly from your browser?

If you do this from the machine that kannel is running from, you might be
able to see where the error is.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Clay Zevely
Sent: Tuesday, 21 August, 2012 21:34
To: de...@vm1.kannel.org
Subject: Message text in Sent_sms

 

I have been working to get kannel to log messages in the database and have
it partly working. I manually populated the database with data then made
test with the smsc sending 3 messages.

When the smsc sends the data the message text is formatted incorrectly. And
kannel returns message Could not fetch content, sorry

Where and how do I fix this?

 

 

The data should be logged in database as
*001f2c07*19.936398,E,75.160046,N,0.04,119.15*280109,122306.000**

Yet it is being logged as  this making the comma  %2C
*001f2c07*19.936398%2CE%2C75.160046%2CN%2C0.04%2C119.15*280109%2C122306.000*
*+

 

 

Also I am seeing messages from kannel being returned to smsc with Could not
fetch content, sorry

I am running centos 6.3 with Kannel smsbox version svn-r4985 

 

 

 

 

 

Kannel. Conf is 

#CORE

group = core

admin-port = 13000

smsbox-port = 13001

admin-password = hostin

wdp-interface-name = "*"

log-file = "/var/log/kannel/bearerbox.log"

store-file = "/var/log/kannel/kannel.store"

log-level = 0

box-deny-ip = "*.*.*.*"

box-allow-ip = "*.*.*.*"

dlr-storage = internal

#dlr-storage = mysql

 

#SMSBOX SETUP

group = smsbox

smsbox-id = "mysmsc"

bearerbox-host = localhost

bearerbox-port = 13001

sendsms-port = 13013

log-file = "/var/log/kannel/smsbox.log"

log-level = 0

http-request-retry = 3

http-queue-delay = 15

sendsms-chars = "0123456789 +-"

global-sender = 12345

mo-recode = true

 

group = smsbox-route

smsbox-id = "mysmsc"

smsc-id = "mysmsc"

 

#group = sms-service

#keyword = default

#text = "This is a reply"

#max-messages = 1

#catch-all = true

 

group = sms-service

keyword = default

catch-all = true

max-messages = 10

get-url = "http://localhost/websms/inc/dlr.php?user=test
<http://localhost/websms/inc/dlr.php?user=test&passwd=hostin&to=%25p&message
=%25a> &passwd=hostin&to=%p&message=%a"

 

# SMSC SMPP

group = smsc

smsc-id = "mysmsc"

smsc = smpp

host = xxx.xxx.xxx.xxx

port = 16400

receive-port = 16400

smsc-username = Track

smsc-password = Track

system-type = ""

address-range = ""

 

group = sendsms-user

username = root

password = hostin

max-messages = 10

 

# MySQL DLR Storage

#group = mysql-connection

#id = sqlbox-db

#host = localhost

#username = root

#password = hostin

#database = dlr

#max-connections = 1

 

group = mysql-connection

id = mydlr

host = localhost

username = root

password = "hostin"

database = dlr

max-connections = 1

 

group = dlr-db

id = mydlr

table = dlr

field-smsc = smsc

field-timestamp = ts

field-destination = destination

field-source = source

field-service = service

field-url = url

field-mask = mask

field-status = status

field-boxc-id = boxc

 

 

sqlbox.conf is

#Group sqlbox

group = sqlbox

id = mysmsc

smsbox-id = mysmsc

bearerbox-host = localhost

bearerbox-port = 13001

smsbox-port = 13003

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = "/var/log/kannel/kannel-sqlbox.log"

log-level = 0

 

group = mysql-connection

id = mysmsc

host = localhost

username = root

password = hostin

database = dlr

max-connections = 10

 

 

smsbox.log

2012-08-21 14:50:43 [24084] [0] INFO: Added logfile
`/var/log/kannel/smsbox.log' with level `0'.

2012-08-21 14:50:43 [24084] [0] INFO: Service global sender set as '12345'

2012-08-21 14:50:43 [24084] [0] INFO: HTTP: Opening server at port 13013.

2012-08-21 14:50:43 [24084] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)

2012-08-21 14:50:43 [24084] [1]

RE: Message text in Sent_sms

2012-08-21 Thread Rene Kluwen
What happens if you call the url:
http://localhost/websms/inc/dlr.php?user=test
 &passwd=hostin&to=%p&message=%a directly from your browser?

If you do this from the machine that kannel is running from, you might be
able to see where the error is.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Clay Zevely
Sent: Tuesday, 21 August, 2012 21:34
To: de...@vm1.kannel.org
Subject: Message text in Sent_sms

 

I have been working to get kannel to log messages in the database and have
it partly working. I manually populated the database with data then made
test with the smsc sending 3 messages.

When the smsc sends the data the message text is formatted incorrectly. And
kannel returns message Could not fetch content, sorry

Where and how do I fix this?

 

 

The data should be logged in database as
*001f2c07*19.936398,E,75.160046,N,0.04,119.15*280109,122306.000**

Yet it is being logged as  this making the comma  %2C
*001f2c07*19.936398%2CE%2C75.160046%2CN%2C0.04%2C119.15*280109%2C122306.000*
*+

 

 

Also I am seeing messages from kannel being returned to smsc with Could not
fetch content, sorry

I am running centos 6.3 with Kannel smsbox version svn-r4985 

 

 

 

 

 

Kannel. Conf is 

#CORE

group = core

admin-port = 13000

smsbox-port = 13001

admin-password = hostin

wdp-interface-name = "*"

log-file = "/var/log/kannel/bearerbox.log"

store-file = "/var/log/kannel/kannel.store"

log-level = 0

box-deny-ip = "*.*.*.*"

box-allow-ip = "*.*.*.*"

dlr-storage = internal

#dlr-storage = mysql

 

#SMSBOX SETUP

group = smsbox

smsbox-id = "mysmsc"

bearerbox-host = localhost

bearerbox-port = 13001

sendsms-port = 13013

log-file = "/var/log/kannel/smsbox.log"

log-level = 0

http-request-retry = 3

http-queue-delay = 15

sendsms-chars = "0123456789 +-"

global-sender = 12345

mo-recode = true

 

group = smsbox-route

smsbox-id = "mysmsc"

smsc-id = "mysmsc"

 

#group = sms-service

#keyword = default

#text = "This is a reply"

#max-messages = 1

#catch-all = true

 

group = sms-service

keyword = default

catch-all = true

max-messages = 10

get-url = "http://localhost/websms/inc/dlr.php?user=test
 &passwd=hostin&to=%p&message=%a"

 

# SMSC SMPP

group = smsc

smsc-id = "mysmsc"

smsc = smpp

host = xxx.xxx.xxx.xxx

port = 16400

receive-port = 16400

smsc-username = Track

smsc-password = Track

system-type = ""

address-range = ""

 

group = sendsms-user

username = root

password = hostin

max-messages = 10

 

# MySQL DLR Storage

#group = mysql-connection

#id = sqlbox-db

#host = localhost

#username = root

#password = hostin

#database = dlr

#max-connections = 1

 

group = mysql-connection

id = mydlr

host = localhost

username = root

password = "hostin"

database = dlr

max-connections = 1

 

group = dlr-db

id = mydlr

table = dlr

field-smsc = smsc

field-timestamp = ts

field-destination = destination

field-source = source

field-service = service

field-url = url

field-mask = mask

field-status = status

field-boxc-id = boxc

 

 

sqlbox.conf is

#Group sqlbox

group = sqlbox

id = mysmsc

smsbox-id = mysmsc

bearerbox-host = localhost

bearerbox-port = 13001

smsbox-port = 13003

smsbox-port-ssl = false

sql-log-table = sent_sms

sql-insert-table = send_sms

log-file = "/var/log/kannel/kannel-sqlbox.log"

log-level = 0

 

group = mysql-connection

id = mysmsc

host = localhost

username = root

password = hostin

database = dlr

max-connections = 10

 

 

smsbox.log

2012-08-21 14:50:43 [24084] [0] INFO: Added logfile
`/var/log/kannel/smsbox.log' with level `0'.

2012-08-21 14:50:43 [24084] [0] INFO: Service global sender set as '12345'

2012-08-21 14:50:43 [24084] [0] INFO: HTTP: Opening server at port 13013.

2012-08-21 14:50:43 [24084] [0] DEBUG: Started thread 1
(gwlib/fdset.c:poller)

2012-08-21 14:50:43 [24084] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps
to pid 24084.

2012-08-21 14:50:43 [24084] [0] DEBUG: Started thread 2
(gwlib/http.c:server_thread)

2012-08-21 14:50:43 [24084] [0] INFO: Set up send sms service at port 13013

2012-08-21 14:50:43 [24084] [2] DEBUG: Thread 2 (gwlib/http.c:server_thread)
maps to pid 24084.

2012-08-21 14:50:43 [24084] [0] DEBUG: Started thread 3
(gw/smsbox.c:sendsms_thread)

2012-08-21 14:50:43 [24084] [2] DEBUG: HTTP: Including port 13013, fd 9 for
polling in server thread

2012-08-21 14:50:43 [24084] [0] INFO: Using HTTP request queueing with 3
retries, 15s delay.

2012-08-21 14:50:43 [24084] [0] DEBUG:
--

2012-08-21 14:50:43 [24084] [0] DEBUG: Kannel smsbox version svn-r4985
starting

2012-08-21 14:50:43 [24084] [3] DEBUG: Thread 3 (gw/smsbox.c:sendsms_thread)
maps to pid 24084.

2012-08-21 14:50:43 [24084] [0] DEBUG:   dumping group (sendsms-user):

2012-08-21 14:50:4

RE: (RESOLVED) Make Gateway Errors

2012-08-21 Thread Rene Kluwen
True, maybe it will compile now. But I doubt you will get a proper solution.

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 20 August, 2012 23:50
To: Michael Black
Cc: Rene Kluwen; de...@vm1.kannel.org
Subject: Re: (RESOLVED) Make Gateway Errors

 

that doesn't necessary mean it will work... va_args are sometimes passed by
value, sometimes passed by reference. it depends on the OS.

 

 

On 20.08.2012, at 23:46, Michael Black  wrote:





Thanks to Andreas and Rene for helping me fix this error:

When I tried Rene's suggestion, i got an error similar to the original one.
I tried to make 'args' pass by reference when eval'd in the if statement,
and now it works:

gwlib/log.c:434
 if (arg == NULL)   //orig 
 if (&args == NULL) {  //corrected

Sorry for wasting your time

Gratefully,

Mike

On Aug 20, 2012 4:18 PM, "Rene Kluwen"  wrote:

I am not into this stuff at all.

But what if you change line 434 to:

 

if ((void *)args == NULL)

 

Probably you will run into other errors as well. But if this is the only
thing, here goes.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Michael Black
Sent: Monday, 20 August, 2012 20:41
To: de...@vm1.kannel.org
Subject: Fwd: Re: Make Gateway Errors

 

Hello to all,

I was working with Andreas regarding an error i received while attempting to
make Kannel 1.4. I am using ubuntu maverick, 2.6.32.21. I followed the
instructions in the online READM. All correspondence is forwarded, below.

-- Forwarded message --
From: "Michael Black" 
Date: Aug 20, 2012 11:29 AM
Subject: Re: Make Gateway Errors
To: "Andreas Fink" 

Also, im using ubuntu maverick

So you should be getting the stdarg.h any minute now...you said it was an
easy fix? Im guessing it wasnt as easy as editing a few lines of stdarg.h,
eh?

I scanned some of the source so (as far as i know), i cant be rid of
kannel_syslog, and in the gwlib/log.c it uses it extensively, so you didnt
comment anything out in the log.c, right?

Honestly, i really appreciate your help!

On Aug 20, 2012 11:13 AM, "Andreas Fink"  wrote:

I've run into this problem when porting gwlib to another platform. it has to
do with how the system deals with standard arguments. on some va-list is a
pointer, on others its some kind of struct etc.

I dont remember exactly how I solved it but its realtively easy to do. And
actually I thought configure does it but apparently it doesnt

 

On 20.08.2012, at 17:05, Michael Black  wrote:

 

Also, i followed the instructions in the README 
http://www.kannel.org/download/1.4.3/README-1.4.3

./configure
touch .depend 
make depend 
make (stuck here)

On Aug 20, 2012 10:57 AM, "Michael Black"  wrote:

# uname -a
Linux localhost 2.6.32.21-gd2764ed #1 PREEMPT Tue Oct 26 16:04:03 CST 2010
armv7l GNU/Linux

On Aug 20, 2012 10:09 AM, "Andreas Fink"  wrote:

what OS are you using?

 

On 20.08.2012, at 16:08, Michael Black  wrote:

 

Yeah, i ran ./configure the first time, i then removed the *.o's/linkeds and
ran make again but im getting the same error

On Aug 20, 2012 9:15 AM, "Andreas Fink"  wrote:

did you run ./configure ?

I've compiled kannel on Linux ARM before (on a pandaboard running Ubuntu)
and had no problem with it.

./configure checks for various va_list variants. 

 

On 20.08.2012, at 15:12, Michael Black  wrote:

 

Hello.

I am currently trying to build kannel from source (on arm, if i wasnt then
I'd use the i386 binary). However, make says there's an error:

gwlib/log.c: 434: error: invalid operations to binary == (have 'va_list' and
'void *')

Line 434 is '(if args == NULL)'
Excert below:

static void PRINTFLIKE(1,0) kannel_syslog(char *format, va_list args, int
level)
{
char buf[4096]; /* Trying to syslog more than 4K could be bad */
int translog;

if (level >= sysloglevel && dosyslog) {
if (args == NULL) {
strncpy(buf, format, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
} else {
vsnprintf(buf, sizeof(buf), format, args);
/* XXX vsnprint not 100% portable */
}

switch(level) {
case GW_DEBUG:
translog = LOG_DEBUG;
break;
case GW_INFO:
translog = LOG_INFO;
break;
case GW_WARNING:
translog = LOG_WARNING;
break;
case GW_ERROR:
translog = LOG_ERR;
break;
case GW_PANIC:
translog = LOG_ALERT;
break;
default:
translog = LOG_INFO;
break;
}
syslog(translog, "%s", buf);
}
}

-- Forwarded message --
From: "Michael Black" 
Date: Aug 19, 2012 1:46 PM
Subject: Make Gateway Errors
To: 

Hello,

I am cur

RE: Re: Make Gateway Errors

2012-08-20 Thread Rene Kluwen
I am not into this stuff at all.

But what if you change line 434 to:

 

if ((void *)args == NULL)

 

Probably you will run into other errors as well. But if this is the only
thing, here goes.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Michael Black
Sent: Monday, 20 August, 2012 20:41
To: de...@vm1.kannel.org
Subject: Fwd: Re: Make Gateway Errors

 

Hello to all,

I was working with Andreas regarding an error i received while attempting to
make Kannel 1.4. I am using ubuntu maverick, 2.6.32.21. I followed the
instructions in the online READM. All correspondence is forwarded, below.

-- Forwarded message --
From: "Michael Black" 
Date: Aug 20, 2012 11:29 AM
Subject: Re: Make Gateway Errors
To: "Andreas Fink" 



Also, im using ubuntu maverick

So you should be getting the stdarg.h any minute now...you said it was an
easy fix? Im guessing it wasnt as easy as editing a few lines of stdarg.h,
eh?

I scanned some of the source so (as far as i know), i cant be rid of
kannel_syslog, and in the gwlib/log.c it uses it extensively, so you didnt
comment anything out in the log.c, right?

Honestly, i really appreciate your help!

On Aug 20, 2012 11:13 AM, "Andreas Fink"  wrote:

I've run into this problem when porting gwlib to another platform. it has to
do with how the system deals with standard arguments. on some va-list is a
pointer, on others its some kind of struct etc.

I dont remember exactly how I solved it but its realtively easy to do. And
actually I thought configure does it but apparently it doesnt

 

On 20.08.2012, at 17:05, Michael Black  wrote:





Also, i followed the instructions in the README 
http://www.kannel.org/download/1.4.3/README-1.4.3

./configure
touch .depend 
make depend 
make (stuck here)

On Aug 20, 2012 10:57 AM, "Michael Black"  wrote:

# uname -a
Linux localhost 2.6.32.21-gd2764ed #1 PREEMPT Tue Oct 26 16:04:03 CST 2010
armv7l GNU/Linux

On Aug 20, 2012 10:09 AM, "Andreas Fink"  wrote:

what OS are you using?

 

On 20.08.2012, at 16:08, Michael Black  wrote:





Yeah, i ran ./configure the first time, i then removed the *.o's/linkeds and
ran make again but im getting the same error

On Aug 20, 2012 9:15 AM, "Andreas Fink"  wrote:

did you run ./configure ?

I've compiled kannel on Linux ARM before (on a pandaboard running Ubuntu)
and had no problem with it.

./configure checks for various va_list variants. 

 

On 20.08.2012, at 15:12, Michael Black  wrote:





Hello.

I am currently trying to build kannel from source (on arm, if i wasnt then
I'd use the i386 binary). However, make says there's an error:

gwlib/log.c: 434: error: invalid operations to binary == (have 'va_list' and
'void *')

Line 434 is '(if args == NULL)'
Excert below:

static void PRINTFLIKE(1,0) kannel_syslog(char *format, va_list args, int
level)
{
char buf[4096]; /* Trying to syslog more than 4K could be bad */
int translog;

if (level >= sysloglevel && dosyslog) {
if (args == NULL) {
strncpy(buf, format, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
} else {
vsnprintf(buf, sizeof(buf), format, args);
/* XXX vsnprint not 100% portable */
}

switch(level) {
case GW_DEBUG:
translog = LOG_DEBUG;
break;
case GW_INFO:
translog = LOG_INFO;
break;
case GW_WARNING:
translog = LOG_WARNING;
break;
case GW_ERROR:
translog = LOG_ERR;
break;
case GW_PANIC:
translog = LOG_ALERT;
break;
default:
translog = LOG_INFO;
break;
}
syslog(translog, "%s", buf);
}
}

-- Forwarded message --
From: "Michael Black" 
Date: Aug 19, 2012 1:46 PM
Subject: Make Gateway Errors
To: 



Hello,

I am currently attempting to build kannel from source; however, make says
there's an error:

gwlib/log.c:434 error: invalid operations to binary == (have 'va_list' and
'void *')

if (level >= sysloglevel && dosyslog) {
if (args == NULL) {
strncpy(buf, format, sizeof(buf));
buf[sizeof(buf) - 1] = '\0';
} else {
vsnprintf(buf, sizeof(buf), format, args);
/* XXX vsnprint not 100% portable */
}

switch(level) {
case GW_DEBUG:

Whats wrong?

Mark

 

 

 



RE: [Opensmppbox] `Random' crashes of opensmppbox

2012-08-17 Thread Rene Kluwen
The "problem" now is that when bearerbox ends, opensmppbox still keeps
running.

Not sure if this is appropriate behaviour.

 

== Rene

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Friday, 17 August, 2012 19:26
To: 'Rene Kluwen'; 'Christopher Burke'; us...@vm1.kannel.org;
de...@vm1.kannel.org
Subject: RE: [Opensmppbox] `Random' crashes of opensmppbox

 

I just made a change to gw/opensmppbox.c which will fix this bug.

 

== Rene

 

 

From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Friday, 17 August, 2012 18:59
To: 'Christopher Burke'; us...@vm1.kannel.org
Subject: RE: [Opensmppbox] `Random' crashes of opensmppbox

 

I noticed this as well.

It started happening after the major client-route update last time, even
though I don't use them.

I am looking into the matter now. Possibly it has to do with a connection
that is not available temporarily.

>From the logs that you are providing, there has been no link activity for
exactly 5 minutes. That should give a clue.

Opensmppbox is correct about terminating the connection. But it shouldn't
shutdown, but instead wait for a re-connection.

 

== Rene

 

 

From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of Christopher Burke
Sent: Friday, 17 August, 2012 17:01
To: us...@vm1.kannel.org
Subject: [Opensmppbox] `Random' crashes of opensmppbox

 

I have noticed some random crashes of opensmppbox which I have not been able
to reproduce. I've attached the output of the opensmppbox log if anybody
could provide me with any pointers as to why this could be happening? 

 

Many thanks in advance! 

 

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP[VMA]: Got PDU:

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU 0x7fd9300013e0 dump:

2012-08-14 09:00:02 [15763] [2] DEBUG:   type_name: enquire_link

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_id: 21 = 0x0015

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_status: 0 = 0x

2012-08-14 09:00:02 [15763] [2] DEBUG:   sequence_number: 2511 = 0x09cf

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU dump ends.

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP[VMA]: Sending PDU:

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU 0x7fd9300015a0 dump:

2012-08-14 09:00:02 [15763] [2] DEBUG:   type_name: enquire_link_resp

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_id: 2147483669 = 0x8015

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_status: 0 = 0x

2012-08-14 09:00:02 [15763] [2] DEBUG:   sequence_number: 2511 = 0x09cf

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU dump ends.

2012-08-14 09:05:03 [15763] [1] ERROR: opensmppbox: bearerbox_to_smpp:
thread terminates

2012-08-14 09:05:03 [15763] [0] INFO: No more waiting for SMPP connections.

2012-08-14 09:05:03 [15763] [0] DEBUG: Thread 1 (opensmppbox.c:function)
still running

2012-08-14 09:05:03 [15763] [0] DEBUG: Thread 2
(opensmppbox.c:smpp_to_bearerbox) still running

2012-08-14 09:05:03 [15763] [0] DEBUG: Immutable octet strings: 189.



RE: [Opensmppbox] `Random' crashes of opensmppbox

2012-08-17 Thread Rene Kluwen
I just made a change to gw/opensmppbox.c which will fix this bug.

 

== Rene

 

 

From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Friday, 17 August, 2012 18:59
To: 'Christopher Burke'; us...@vm1.kannel.org
Subject: RE: [Opensmppbox] `Random' crashes of opensmppbox

 

I noticed this as well.

It started happening after the major client-route update last time, even
though I don't use them.

I am looking into the matter now. Possibly it has to do with a connection
that is not available temporarily.

>From the logs that you are providing, there has been no link activity for
exactly 5 minutes. That should give a clue.

Opensmppbox is correct about terminating the connection. But it shouldn't
shutdown, but instead wait for a re-connection.

 

== Rene

 

 

From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of Christopher Burke
Sent: Friday, 17 August, 2012 17:01
To: us...@vm1.kannel.org
Subject: [Opensmppbox] `Random' crashes of opensmppbox

 

I have noticed some random crashes of opensmppbox which I have not been able
to reproduce. I've attached the output of the opensmppbox log if anybody
could provide me with any pointers as to why this could be happening? 

 

Many thanks in advance! 

 

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP[VMA]: Got PDU:

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU 0x7fd9300013e0 dump:

2012-08-14 09:00:02 [15763] [2] DEBUG:   type_name: enquire_link

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_id: 21 = 0x0015

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_status: 0 = 0x

2012-08-14 09:00:02 [15763] [2] DEBUG:   sequence_number: 2511 = 0x09cf

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU dump ends.

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP[VMA]: Sending PDU:

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU 0x7fd9300015a0 dump:

2012-08-14 09:00:02 [15763] [2] DEBUG:   type_name: enquire_link_resp

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_id: 2147483669 = 0x8015

2012-08-14 09:00:02 [15763] [2] DEBUG:   command_status: 0 = 0x

2012-08-14 09:00:02 [15763] [2] DEBUG:   sequence_number: 2511 = 0x09cf

2012-08-14 09:00:02 [15763] [2] DEBUG: SMPP PDU dump ends.

2012-08-14 09:05:03 [15763] [1] ERROR: opensmppbox: bearerbox_to_smpp:
thread terminates

2012-08-14 09:05:03 [15763] [0] INFO: No more waiting for SMPP connections.

2012-08-14 09:05:03 [15763] [0] DEBUG: Thread 1 (opensmppbox.c:function)
still running

2012-08-14 09:05:03 [15763] [0] DEBUG: Thread 2
(opensmppbox.c:smpp_to_bearerbox) still running

2012-08-14 09:05:03 [15763] [0] DEBUG: Immutable octet strings: 189.



RE: [PATCH] Lightning speed Dict hash table

2012-08-07 Thread Rene Kluwen
Well... Considering the figures it is clear that either of your patches can
make a big difference to Kannel's performance.
MHO is that we go for the least complex patch, if test results appear more
or less the same between the two.

== Rene


-Original Message-
From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Alexander Malysh
Sent: Tuesday, 07 August, 2012 15:12
To: Stipe Tolj
Cc: de...@vm1.kannel.org
Subject: Re: [PATCH] Lightning speed Dict hash table

Hi Stipe,

this is really complex patch for the hash issue, but it could be made easier
and almost the same speed.
I'm not really convenient that we need to apply this complex patch...

Here are my simple tests and patch attached:

Command used:

time ./test/test_dict 

-- old
2012-08-07 14:47:49 [57291] [0] DEBUG: Dict populate phase.
2012-08-07 14:48:16 [57291] [0] INFO: ok, got 20 entries in dict1.
2012-08-07 14:48:16 [57291] [0] INFO: ok, got 20 entries in dict2.
2012-08-07 14:48:16 [57291] [0] DEBUG: Dict lookup phase.

real0m41.842s
user0m40.680s
sys 0m1.078s

-- sedgewick (my patch)
2012-08-07 14:47:01 [57016] [0] DEBUG: Dict populate phase.
2012-08-07 14:47:03 [57016] [0] INFO: ok, got 20 entries in dict1.
2012-08-07 14:47:03 [57016] [0] INFO: ok, got 20 entries in dict2.
2012-08-07 14:47:03 [57016] [0] DEBUG: Dict lookup phase.

real0m4.160s
user0m2.998s
sys 0m0.977s

real0m3.797s
user0m2.738s
sys 0m1.015s

real0m3.732s
user0m2.767s
sys 0m0.938s

-- Bob Jenkins
2012-08-07 14:50:32 [58470] [0] DEBUG: Dict populate phase.
2012-08-07 14:50:34 [58470] [0] INFO: ok, got 20 entries in dict1.
2012-08-07 14:50:34 [58470] [0] INFO: ok, got 20 entries in dict2.
2012-08-07 14:50:34 [58470] [0] DEBUG: Dict lookup phase.

real0m3.747s
user0m2.682s
sys 0m0.919s

real0m3.661s
user0m2.692s
sys 0m0.946s

real0m3.522s
user0m2.606s
sys 0m0.908s

Alex




RE: Where I can download the previous version of opensmppbox

2012-08-07 Thread Rene Kluwen
This is open source. So you are always welcome to contribute ;=).

 

== Rene

 

From: spameden [mailto:spame...@gmail.com] 
Sent: Tuesday, 07 August, 2012 21:58
To: Rene Kluwen
Cc: de...@vm1.kannel.org
Subject: Re: Where I can download the previous version of opensmppbox

 

Well, for me it's ok, as long as new options do provide backward
compatibility with old features.

The only thing I'm really missing is correct examples of configuration
bundled with kannel / sqlbox / opensmppbox. Hopefully, this will be sorted.

Thanks.

2012/8/7 Rene Kluwen 

I moved this thread to the devel list.

 

Yes, for several reasons it's better to stick with the latest options.

But over the past (short) time, I have been confronted with a number of
kannel updates which were not backward compatible.

This is not convenient as a Kannel administrator, if you are not a
developer.

 

So please be cautious committing your changes.

 

=+= Rene

 

 

From: spameden [mailto:spame...@gmail.com] 
Sent: Tuesday, 07 August, 2012 19:42
To: Rene Kluwen
Cc: admin; us...@vm1.kannel.org
Subject: Re: Where I can download the previous version of opensmppbox

 

Of course you can revert with SVN, but better stick to latest version with
altered options.

Regards.

2012/8/7 Rene Kluwen 

But to answer your question: You can checkout previous versions with (for
instance):

svn checkout -r {2006-02-17}

See:

http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html



== Rene


-Original Message-
From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of admin
Sent: Tuesday, 07 August, 2012 14:31
To: us...@vm1.kannel.org

Subject: Where I can download the previous version of opensmppbox

Good time of day!

I have installed the last version of opensmppbox and have the bug which is
talked about here

https://redmine.kannel.org/issues/649

Where I can download the .63 version? There is no this bug in this version
as they wrote here.



 

 



RE: Where I can download the previous version of opensmppbox

2012-08-07 Thread Rene Kluwen
I moved this thread to the devel list.

 

Yes, for several reasons it's better to stick with the latest options.

But over the past (short) time, I have been confronted with a number of
kannel updates which were not backward compatible.

This is not convenient as a Kannel administrator, if you are not a
developer.

 

So please be cautious committing your changes.

 

=+= Rene

 

 

From: spameden [mailto:spame...@gmail.com] 
Sent: Tuesday, 07 August, 2012 19:42
To: Rene Kluwen
Cc: admin; us...@vm1.kannel.org
Subject: Re: Where I can download the previous version of opensmppbox

 

Of course you can revert with SVN, but better stick to latest version with
altered options.

Regards.

2012/8/7 Rene Kluwen 

But to answer your question: You can checkout previous versions with (for
instance):

svn checkout -r {2006-02-17}

See:

http://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html



== Rene


-Original Message-
From: users-boun...@vm1.kannel.org [mailto:users-boun...@vm1.kannel.org] On
Behalf Of admin
Sent: Tuesday, 07 August, 2012 14:31
To: us...@vm1.kannel.org

Subject: Where I can download the previous version of opensmppbox

Good time of day!

I have installed the last version of opensmppbox and have the bug which is
talked about here

https://redmine.kannel.org/issues/649

Where I can download the .63 version? There is no this bug in this version
as they wrote here.




 



RE: Concatenated MT - configurable registered_delivery behaviour

2012-08-07 Thread Rene Kluwen
Interesting!

 

How would one distinguish (dlr-wise) between the different parts?

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Paul Cook
Sent: Tuesday, 07 August, 2012 18:09
To: de...@vm1.kannel.org
Subject: Concatenated MT - configurable registered_delivery behaviour

 

Hi,

We have a number of clients who use kannel as a client to submit to our
messaging service.
A common problem they encounter is that when sending a long MT, it is split
correctly into multiple parts, but registered_delivery is set to 0 for all
parts greater than 0.

This attached patch makes that behavior optional, by adding the following
config line to an smsc group:

 concatenated-sms-dlr-for-all-parts = true

If set, then registered_delivery will not be altered for the subsequent
parts of the concatenated set, and the client app will receive delivery
receipts for all parts.


Please consider this patch for inclusion in the next release


Thanks


Paul Cook



RE: Unable to Open get-url in sms-service

2012-08-07 Thread Rene Kluwen
Could you post the relevant parts of your log files? Including some context.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Talha Syed
Sent: Tuesday, 07 August, 2012 11:33
To: devel@kannel.org
Subject: Unable to Open get-url in sms-service

 

Hi Guys !

 

I am newbie in kannel sms gateway configuration. Recently I have configured
kannel on redhat enterprise linux and using (WaveCom FASTTRACK modem serial
# M1306B) . Every thing is fine 

but the problem is :

 

when i send message to kannel, it is not invoking get-url

get-url = "http://192.168.0.212:8080/AGSMS/agMessage";;;

 

i have made java servlet which display only "Hello World"

but when i send message, it gives error :

url does'nt start with 'http' or 'https'

 

please help

 

 

here is my kannel.config:

 

#http://192.168.0.216:8013/cgi-bin/sendsms?username=foo&password=bar&to=0346
3243505&from=&text=assalamoalikum:)

group = core

admin-port = 25200

smsbox-port = 25201

admin-password = bar

admin-deny-ip = "*.*.*.*"

admin-allow-ip = "127.0.0.1;192.168.0.*"

box-deny-ip = "*.*.*.*"

box-allow-ip = "127.0.0.1;192.168.0.*"

#log-file = "/tmp/kannel.log"

log-level = 0

#access-log = "/tmp/kannel.access"

#unified-prefix = "0,86;0,+86"

 

group = smsc

smsc = at

smsc-id = GSMModem

modemtype = auto

device = /dev/ttyS0

#device = /dev/modem

#speed = 9600

speed = auto

sim-buffering = true

#my-number = 86138

#sms-center = 03035069783

validityperiod = 168

#pin = 1234

 

group = modems

id = iTegno

detect-string = "WAVECOM"

detect-string2 = "MODEM"

message-storage = sm

speed = 9600

#speed = auto

need-sleep = true

init-string="ATZ"

init-string="ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

 

group = smsbox

bearerbox-host = localhost



sendsms-port = 25024

global-sender = "03002433320"

#sendsms-chars = "0123456789 +-"

#access-log = "/tmp/kannel.access"

#log-file = "/tmp/smsbox.log"

log-level = 0

 

group = sendsms-user

username = foo 

password = bar

user-deny-ip = "*.*.*.*"

user-allow-ip = "192.168.0.*;127.0.0.1"

max-messages = 3

concatenation = true

 

group = sms-service

keyword = complex

text = "Talha Syed hussain"

 

group = sms-service

keyword = abc

get-url = "http://%S  ";;

 

group = sms-service

keyword = default

get-url = "http://192.168.0.212:8080/AGSMS/agMessage";;;

accept-x-kannel-headers = true

max-messages = 3

 

 



RE: at smsc bug

2012-08-06 Thread Rene Kluwen
I could "fix" it by changing line 252 of smsc_at.c to:

 

if(privdata->modem && privdata->modem->hardware_flow_control) {

 

But. This assumes that if there's still no modem detected at that time,
hardware flow control is disabled.

If that is not a correct assumption, the expression needs to be inverted.

 

== Rene

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:46
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

Output from gdb:

 

at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252

252 if(privdata->modem->hardware_flow_control) {

(gdb) backtrace

#0  at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252

#1  0x0808764d in at2_test_speed (privdata=0x0, speed=5) at
gw/smsc/smsc_at.c:2595

#2  0x080877ca in at2_device_thread (arg=0x9d75240) at
gw/smsc/smsc_at.c:2577

#3  0x080d3541 in new_thread (arg=0x9d71420) at gwlib/gwthread-pthread.c:362

#4  0x009bc45b in start_thread () from /lib/libpthread.so.0

#5  0x0091423e in clone () from /lib/libc.so.6

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:38
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

Could it be that privdata->modem still has a NULL value at that time?

 

=+= Rene

 

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:32
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

If I comment out the lines between:

 

#if defined(CRTSCTS) and #endif, then it works.

 

Weird.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Monday, 06 August, 2012 18:21
To: 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

These are the changes that were made since the version that worked (see
attached document).

I tried both hardware-flow-control = true and false. Both gave me the same
error.

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 06 August, 2012 18:07
To: Rene Kluwen
Subject: Re: at smsc bug

 

please run it in with log-level=0 and send the output of the logfile so we
can see the backtrace of the issue.

 

On 06.08.2012, at 18:01, Rene Kluwen  wrote:

 

When starting current head revision in combination with a huwaei usb modem,
I get the following.

An older version of bearerbox has been working perfectly for some months
already. This happened when I tried to upgrade.

This is on a production machine, so it is a little bit hard to debug. The
only thing that left me was downgrading again.

 

Logs:

 

2012-08-06 17:55:07 [6608] [0] INFO:


2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988
starting

2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop

2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called

2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.

2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet
mode = 0

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]

2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]

Segmentation fault

 

Config:

 

group = smsc

smsc-id = hvgsmsc

smsc = at

modemtype=auto

device=/dev/ttyUSB0

my-number=+316xxx

pin = 

connect-allow-ip = 127.0.0.1

sms-center = "+316540881000"

log-level = 0

sim-buffering = true

 

group = modems

id = huawei

name = "Huawei"

detect-string = "huawei"

detect-string2 = "K3765"

init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1"

message-storage = "SM"

message-start = 0

 

 



RE: at smsc bug

2012-08-06 Thread Rene Kluwen
Output from gdb:

 

at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252

252 if(privdata->modem->hardware_flow_control) {

(gdb) backtrace

#0  at2_open_device (privdata=0x9d712e0) at gw/smsc/smsc_at.c:252

#1  0x0808764d in at2_test_speed (privdata=0x0, speed=5) at
gw/smsc/smsc_at.c:2595

#2  0x080877ca in at2_device_thread (arg=0x9d75240) at
gw/smsc/smsc_at.c:2577

#3  0x080d3541 in new_thread (arg=0x9d71420) at gwlib/gwthread-pthread.c:362

#4  0x009bc45b in start_thread () from /lib/libpthread.so.0

#5  0x0091423e in clone () from /lib/libc.so.6

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:38
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

Could it be that privdata->modem still has a NULL value at that time?

 

=+= Rene

 

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:32
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

If I comment out the lines between:

 

#if defined(CRTSCTS) and #endif, then it works.

 

Weird.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Monday, 06 August, 2012 18:21
To: 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

These are the changes that were made since the version that worked (see
attached document).

I tried both hardware-flow-control = true and false. Both gave me the same
error.

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 06 August, 2012 18:07
To: Rene Kluwen
Subject: Re: at smsc bug

 

please run it in with log-level=0 and send the output of the logfile so we
can see the backtrace of the issue.

 

On 06.08.2012, at 18:01, Rene Kluwen  wrote:

 

When starting current head revision in combination with a huwaei usb modem,
I get the following.

An older version of bearerbox has been working perfectly for some months
already. This happened when I tried to upgrade.

This is on a production machine, so it is a little bit hard to debug. The
only thing that left me was downgrading again.

 

Logs:

 

2012-08-06 17:55:07 [6608] [0] INFO:


2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988
starting

2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop

2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called

2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.

2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet
mode = 0

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]

2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]

Segmentation fault

 

Config:

 

group = smsc

smsc-id = hvgsmsc

smsc = at

modemtype=auto

device=/dev/ttyUSB0

my-number=+316xxx

pin = 

connect-allow-ip = 127.0.0.1

sms-center = "+316540881000"

log-level = 0

sim-buffering = true

 

group = modems

id = huawei

name = "Huawei"

detect-string = "huawei"

detect-string2 = "K3765"

init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1"

message-storage = "SM"

message-start = 0

 

 



RE: at smsc bug

2012-08-06 Thread Rene Kluwen
Could it be that privdata->modem still has a NULL value at that time?

 

=+= Rene

 

 

From: Rene Kluwen [mailto:rene.klu...@chimit.nl] 
Sent: Monday, 06 August, 2012 18:32
To: 'Rene Kluwen'; 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

If I comment out the lines between:

 

#if defined(CRTSCTS) and #endif, then it works.

 

Weird.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Monday, 06 August, 2012 18:21
To: 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

These are the changes that were made since the version that worked (see
attached document).

I tried both hardware-flow-control = true and false. Both gave me the same
error.

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 06 August, 2012 18:07
To: Rene Kluwen
Subject: Re: at smsc bug

 

please run it in with log-level=0 and send the output of the logfile so we
can see the backtrace of the issue.

 

On 06.08.2012, at 18:01, Rene Kluwen  wrote:

 

When starting current head revision in combination with a huwaei usb modem,
I get the following.

An older version of bearerbox has been working perfectly for some months
already. This happened when I tried to upgrade.

This is on a production machine, so it is a little bit hard to debug. The
only thing that left me was downgrading again.

 

Logs:

 

2012-08-06 17:55:07 [6608] [0] INFO:


2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988
starting

2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop

2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called

2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.

2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet
mode = 0

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]

2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]

Segmentation fault

 

Config:

 

group = smsc

smsc-id = hvgsmsc

smsc = at

modemtype=auto

device=/dev/ttyUSB0

my-number=+316xxx

pin = 

connect-allow-ip = 127.0.0.1

sms-center = "+316540881000"

log-level = 0

sim-buffering = true

 

group = modems

id = huawei

name = "Huawei"

detect-string = "huawei"

detect-string2 = "K3765"

init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1"

message-storage = "SM"

message-start = 0

 

 



RE: at smsc bug

2012-08-06 Thread Rene Kluwen
If I comment out the lines between:

 

#if defined(CRTSCTS) and #endif, then it works.

 

Weird.

 

== Rene

 

From: devel-boun...@vm1.kannel.org [mailto:devel-boun...@vm1.kannel.org] On
Behalf Of Rene Kluwen
Sent: Monday, 06 August, 2012 18:21
To: 'Andreas Fink'; de...@vm1.kannel.org
Subject: RE: at smsc bug

 

These are the changes that were made since the version that worked (see
attached document).

I tried both hardware-flow-control = true and false. Both gave me the same
error.

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 06 August, 2012 18:07
To: Rene Kluwen
Subject: Re: at smsc bug

 

please run it in with log-level=0 and send the output of the logfile so we
can see the backtrace of the issue.

 

On 06.08.2012, at 18:01, Rene Kluwen  wrote:

 

When starting current head revision in combination with a huwaei usb modem,
I get the following.

An older version of bearerbox has been working perfectly for some months
already. This happened when I tried to upgrade.

This is on a production machine, so it is a little bit hard to debug. The
only thing that left me was downgrading again.

 

Logs:

 

2012-08-06 17:55:07 [6608] [0] INFO:


2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988
starting

2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop

2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called

2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.

2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet
mode = 0

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]

2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]

Segmentation fault

 

Config:

 

group = smsc

smsc-id = hvgsmsc

smsc = at

modemtype=auto

device=/dev/ttyUSB0

my-number=+316xxx

pin = 

connect-allow-ip = 127.0.0.1

sms-center = "+316540881000"

log-level = 0

sim-buffering = true

 

group = modems

id = huawei

name = "Huawei"

detect-string = "huawei"

detect-string2 = "K3765"

init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1"

message-storage = "SM"

message-start = 0

 

 



RE: at smsc bug

2012-08-06 Thread Rene Kluwen
These are the changes that were made since the version that worked (see
attached document).

I tried both hardware-flow-control = true and false. Both gave me the same
error.

 

== Rene

 

 

From: Andreas Fink [mailto:af...@list.fink.org] 
Sent: Monday, 06 August, 2012 18:07
To: Rene Kluwen
Subject: Re: at smsc bug

 

please run it in with log-level=0 and send the output of the logfile so we
can see the backtrace of the issue.

 

On 06.08.2012, at 18:01, Rene Kluwen  wrote:





When starting current head revision in combination with a huwaei usb modem,
I get the following.

An older version of bearerbox has been working perfectly for some months
already. This happened when I tried to upgrade.

This is on a production machine, so it is a little bit hard to debug. The
only thing that left me was downgrading again.

 

Logs:

 

2012-08-06 17:55:07 [6608] [0] INFO:


2012-08-06 17:55:07 [6608] [0] INFO: Kannel bearerbox II version svn-r4988
starting

2012-08-06 17:55:07 [6608] [0] INFO: MAIN: Start-up done, entering mainloop

2012-08-06 17:55:07 [6608] [0] DEBUG: AT2[hvgsmsc]: start called

2012-08-06 17:55:07 [6608] [6] DEBUG: Thread 6
(gw/smsc/smsc_at.c:at2_device_thread) maps to pid 6608.

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: detecting modem speed.

2012-08-06 17:55:07 [6608] [6] INFO: AT2[hvgsmsc]: opening device

2012-08-06 17:55:07 [6608] [6] DEBUG: AT2[hvgsmsc]: device opened. Telnet
mode = 0

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80e8ebd]

2012-08-06 17:55:07 [6608] [6] PANIC: [0x160440]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x808764d]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80877ca]

2012-08-06 17:55:07 [6608] [6] PANIC: ./bearerbox [0x80d3541]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libpthread.so.0 [0x9bc45b]

2012-08-06 17:55:07 [6608] [6] PANIC: /lib/libc.so.6(clone+0x5e) [0x91423e]

Segmentation fault

 

Config:

 

group = smsc

smsc-id = hvgsmsc

smsc = at

modemtype=auto

device=/dev/ttyUSB0

my-number=+316xxx

pin = 

connect-allow-ip = 127.0.0.1

sms-center = "+316540881000"

log-level = 0

sim-buffering = true

 

group = modems

id = huawei

name = "Huawei"

detect-string = "huawei"

detect-string2 = "K3765"

init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0; +CNMI=1,1,0,2,0; +CMEE=1"

message-storage = "SM"

message-start = 0

 

 

Index: smsc_at.c
===
--- smsc_at.c   (revision 4988)
+++ smsc_at.c   (working copy)
@@ -1,7 +1,7 @@
 /* 
  * The Kannel Software License, Version 1.0
  *
- * Copyright (c) 2001-2012 Kannel Group
+ * Copyright (c) 2001-2010 Kannel Group
  * Copyright (c) 1998-2001 WapIT Ltd.
  * All rights reserved.
  *
@@ -249,12 +249,7 @@
 tios.c_iflag |= IGNPAR; /* ignore parity */
 tios.c_iflag &= ~INPCK;
 #if defined(CRTSCTS)
-if(privdata->modem->hardware_flow_control) {
-tios.c_cflag |= CRTSCTS; /* enable hardware flow control */
-}
-else {
-tios.c_cflag &= ~CRTSCTS; /* disable hardware flow control */
-}
+tios.c_cflag |= CRTSCTS; /* enable hardware flow control */
 #endif
 tios.c_cc[VSUSP] = 0; /* otherwhise we can not send CTRL Z */

@@ -2852,8 +2847,6 @@
 modem->message_start = 1;

 cfg_get_bool(&modem->enable_mms, grp, octstr_imm("enable-mms"));
-modem->hardware_flow_control = 1;
-cfg_get_bool(&modem->hardware_flow_control, grp, 
octstr_imm("hardware-flow-control"));

 /*
 if (modem->message_storage == NULL)


  1   2   3   4   5   >