Re: Kannel 1.5.0 Debian packages

2011-03-24 Thread Milan P. Stanic
Hi,

[ Sorry for X-post ]

On Thu, 2011-03-24 at 10:26, Alan McNatty wrote:
 Hi Alex,
 
 Thanks for rolling us a new deb.
 
 Thanks also for building with Postgres support - that will save me
 rolling my own :)
 
 Just a couple of questions:
 
 1) I notice we have the usual binaries ... but I thought there was talk
 of run_kannel_box being deprecated since we have --parachute --daemonize
 capability. What are people doing these days by default - see attached
 init.d script for example. 

I built it to be as close as possible to official Debian package because
I don't want to 'surprise' users/admins during upgrade from stable.

 2) (this is likely a longer term / roadmap question) Any chance sqlbox
 (and possibly others, e.g smppbox) could be included as a binary as
 well? 

sqlbox (0.7.2 version) is shipped with Debian stable. I have made sqlbox
deb from SVN package just for test but didn't posted it because I don't
know how it works because I never tried to use or play with it.

 It is sounded like more and more folk are using these as standard and it
 would be advantageous to the project to have them included in standard
 deb. 

I built Opensmppbox deb packages few months age for me to play with it
but didn't posted it to Alex because I'm not sure how SVN version is
good to put on Kannel site for download.

 I realise they are not in the standard build so possibly this is a
 question more around when the source / build trees might be merged (i.e
 --enable-sqlbox, etc)? So likely some work involved here - and best of
 all likely involves autoconf, etc compiler magic that troubles many of
 us.
 
 Cheers,
 Alan
 
 p.s sorry for the cross-post .. just reply-all'ing
 
 On Wed, 2011-03-23 at 12:20 +0100, Alexander Malysh wrote:
  Hi All,
  
  
  just uploaded debs for 1.5.0
  to https://redmine.kannel.org/projects/kannel/files
  please check and give me/Milan feedback.
  
  
  Thanks,
  Alexander Malysh
  
  Am 22.03.2011 um 16:24 schrieb Milan P. Stanic:
  
   Hi Alex,
   
   On Tue, 2011-03-22 at 14:37, Alexander Malysh wrote:
Hi Milan,

as far as I see, configuration should be fine. Could you please
upload debs and diff tar to some place
and we will push it to download section then.
   
   I will upload it later and send the URL to you in private mail.
   
Thanks,
Alexander Malysh

Am 22.03.2011 um 14:09 schrieb Milan P. Stanic:

 Hi Alex,
 
 On Tue, 2011-03-22 at 09:56, Alexander Malysh wrote:
  Hi Milan,
  
  that would be great to have debian packages for 1.5.0
 
 I forgot to mention in original post that I sent these packages
 to
 someone in Romania who is tried it on Ubuntu. He told me that
 the same
 binary packages which I run on Debian also works well on Ubuntu
 but I
 forget which release he runs.
 
  could you please answer some questions:
  - how these packages compiled
 
 I patched 1.5.0 source with official Debian diff (actually tar
 file)
 because my intention is that the packages I build shouldn't
 differ a lot
 from Debian shipped packages. It is because of that if someone
 upgrade
 it from official Debian release to newly built packages s/he
 doesn't
 have to change anything in configuration files.
 
  - which DB support is enabled
 
 Sqlite3, Postgresql and MySQL.
 
  - compiler/configure flags used
 
 Here is the relevant section from debian/rules files:
 ./configure \
   --host=$(DEB_HOST_GNU_TYPE) \
   --build=$(DEB_BUILD_GNU_TYPE) \
   --enable-warnings \
   --prefix=/usr \
   --mandir=\$${prefix}/share/man \
   --infodir=\$${prefix}/share/info \
   --enable-docs --enable-pam --enable-pcre \
   --enable-ssl --with-ssl=/usr \
   --with-mysql --with-mysql-dir=/usr \
   --with-sqlite3 \
   --with-pgsql --with-pgsql-dir=/usr
 
 
 And here is relevant section from Makefile:
 
 
 LIBS=-lpq -lmysqlclient_r -lssl -ldl -lpam -lpcreposix -lrt
 -lresolv
 -lnsl -lm  -lpthread -lxml2 -L/usr/lib -lpcreposix -lpcre
 -L/usr/lib
 -lcrypto -lssl -rdynamic -L/usr/lib/mysql -lmysqlclient_r
 -L/usr/local/lib -lsqlite3 -L/usr/lib
 
 CFLAGS=-D_REENTRANT=1 -I. -Igw -g -O2 -D_XOPEN_SOURCE=600
 -D_BSD_SOURCE
 -D_LARGE_FILES= -I/usr/include/libxml2  -Wall
 -Wmissing-prototypes
 -Wmissing-declarations -Wnested-externs -Winline -Wformat
 -Wformat-security -Wmissing-format-attribute -I/usr/include
 -I/usr/include/mysql -I/usr/include/postgresql
 
 LDFLAGS= -rdynamic
 
  Do you have some place to upload packages and we will push
  those then to download section?
 
 Yes, I can upload it but would like to know first if the
 configuration
 above is correct. If not, I can rebuild it with your (or someone
 else)
 suggestions.
 
  Thanks,
  Alexander Malysh
  

DLRs for concatenated messages

2011-03-24 Thread Toby Phipps
Hi all,

I'm seeing some strangeness with DLR handling of concatenated messages sent
via SMPP in Kannel 1.5.0.

I'm using MySQL for DLR storage and only the first message of the set
generates a DLR in the database.  My provider, however, follows the specs
and returns a DLR for each part. Kannel recognizes the first DLR and updates
the database. When the DLRs for the remaining parts arrive, Kannel tries to
find them in the database and fails, spitting out an error (see below). 

Specifically:

1. When the submit_sm_resp PDU for the first message part arrives, Kannel
happily creates the DLR in the database:

2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
2011-03-25 02:03:37 [5106] [10] DEBUG:   type_name: submit_sm_resp
2011-03-25 02:03:37 [5106] [10] DEBUG:   command_id: 2147483652 = 0x8004
2011-03-25 02:03:37 [5106] [10] DEBUG:   command_status: 0 = 0x
2011-03-25 02:03:37 [5106] [10] DEBUG:   sequence_number: 17 = 0x0011
2011-03-25 02:03:37 [5106] [10] DEBUG:   message_id:
2011-03-25 02:03:37 [5106] [10] DEBUG:Octet string at 0xc8cbc50:
2011-03-25 02:03:37 [5106] [10] DEBUG:  len:  20
2011-03-25 02:03:37 [5106] [10] DEBUG:  size: 21
2011-03-25 02:03:37 [5106] [10] DEBUG:  immutable: 0
2011-03-25 02:03:37 [5106] [10] DEBUG:  data: 31 33 30 30 39 38 39 38 31
37 36 36 36 31 38 33   1300989817666183
2011-03-25 02:03:37 [5106] [10] DEBUG:  data: 30 34 30 32
0402
2011-03-25 02:03:37 [5106] [10] DEBUG:Octet string dump ends.
2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU dump ends.
2011-03-25 02:03:37 [5106] [10] DEBUG: DLR[mysql]: Adding DLR
smsc=MY-SMPP-CONNECTION, ts=13009898176661830402, src=test, dst=9,
mask=31, boxc=smsbox
2011-03-25 02:03:37 [5106] [10] DEBUG: adding DLR entry into database
2011-03-25 02:03:37 [5106] [10] DEBUG: sql: INSERT INTO
`smsgw_kannel_sms_dlr` (`smsc`, `timestamp`, `source`, `destination`,
`service`, `url`, `mask`, `boxc_id`, `status`) VALUES (?, ?, ?, ?, ?, ?, ?,
?, 0)

2. When the submit_sm_resp PDU for the subsequent message parts arrive,
Kannel doesn't create a database DLR but instead appears to create one in
memory (note the missing SQL):

2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
2011-03-25 02:03:38 [5106] [10] DEBUG:   type_name: submit_sm_resp
2011-03-25 02:03:38 [5106] [10] DEBUG:   command_id: 2147483652 = 0x8004
2011-03-25 02:03:38 [5106] [10] DEBUG:   command_status: 0 = 0x
2011-03-25 02:03:38 [5106] [10] DEBUG:   sequence_number: 18 = 0x0012
2011-03-25 02:03:38 [5106] [10] DEBUG:   message_id:
2011-03-25 02:03:38 [5106] [10] DEBUG:Octet string at 0xc8d1d80:
2011-03-25 02:03:38 [5106] [10] DEBUG:  len:  20
2011-03-25 02:03:38 [5106] [10] DEBUG:  size: 21
2011-03-25 02:03:38 [5106] [10] DEBUG:  immutable: 0
2011-03-25 02:03:38 [5106] [10] DEBUG:  data: 31 33 30 30 39 38 39 38 31
37 39 33 34 31 38 34   1300989817934184
2011-03-25 02:03:38 [5106] [10] DEBUG:  data: 30 34 30 32
0402
2011-03-25 02:03:38 [5106] [10] DEBUG:Octet string dump ends.
2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU dump ends.
2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: creating
DLR message
2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: DLR =

3. When the deliver_sm PDU arrives for the first message part, it's
correctly matched against the database, processed and deleted:

2011-03-25 02:03:48 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
2011-03-25 02:03:48 [5106] [10] DEBUG:   type_name: deliver_sm
2011-03-25 02:03:48 [5106] [10] DEBUG:   command_id: 5 = 0x0005
2011-03-25 02:03:48 [5106] [10] DEBUG:   command_status: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   sequence_number: 8 = 0x0008
2011-03-25 02:03:48 [5106] [10] DEBUG:   service_type: NULL
2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr_ton: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr_npi: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr: 9
2011-03-25 02:03:48 [5106] [10] DEBUG:   dest_addr_ton: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   dest_addr_npi: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   destination_addr: test
2011-03-25 02:03:48 [5106] [10] DEBUG:   esm_class: 4 = 0x0004
2011-03-25 02:03:48 [5106] [10] DEBUG:   protocol_id: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   priority_flag: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   schedule_delivery_time: NULL
2011-03-25 02:03:48 [5106] [10] DEBUG:   validity_period: NULL
2011-03-25 02:03:48 [5106] [10] DEBUG:   registered_delivery: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   replace_if_present_flag: 0 =
0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   data_coding: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   sm_default_msg_id: 0 = 0x
2011-03-25 02:03:48 [5106] [10] DEBUG:   sm_length: 165 = 0x00a5
2011-03-25 02:03:48 [5106] [10] DEBUG:   short_message:

Re: DLRs for concatenated messages

2011-03-24 Thread Alvaro Cornejo
Hi

That is the way kannel handles dlr for concatenated messages. There
has been several threads regarding how to improve this but nothing has
been done.


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



On Thu, Mar 24, 2011 at 1:29 PM, Toby Phipps
toby.phi...@nexmedia.com.sg wrote:
 Hi all,

 I'm seeing some strangeness with DLR handling of concatenated messages sent
 via SMPP in Kannel 1.5.0.

 I'm using MySQL for DLR storage and only the first message of the set
 generates a DLR in the database.  My provider, however, follows the specs
 and returns a DLR for each part. Kannel recognizes the first DLR and updates
 the database. When the DLRs for the remaining parts arrive, Kannel tries to
 find them in the database and fails, spitting out an error (see below).

 Specifically:

 1. When the submit_sm_resp PDU for the first message part arrives, Kannel
 happily creates the DLR in the database:

 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:37 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_id: 2147483652 = 0x8004
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_status: 0 = 0x
 2011-03-25 02:03:37 [5106] [10] DEBUG:   sequence_number: 17 = 0x0011
 2011-03-25 02:03:37 [5106] [10] DEBUG:   message_id:
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string at 0xc8cbc50:
 2011-03-25 02:03:37 [5106] [10] DEBUG:      len:  20
 2011-03-25 02:03:37 [5106] [10] DEBUG:      size: 21
 2011-03-25 02:03:37 [5106] [10] DEBUG:      immutable: 0
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 31 33 30 30 39 38 39 38 31
 37 36 36 36 31 38 33   1300989817666183
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 30 34 30 32
 0402
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: DLR[mysql]: Adding DLR
 smsc=MY-SMPP-CONNECTION, ts=13009898176661830402, src=test, dst=9,
 mask=31, boxc=smsbox
 2011-03-25 02:03:37 [5106] [10] DEBUG: adding DLR entry into database
 2011-03-25 02:03:37 [5106] [10] DEBUG: sql: INSERT INTO
 `smsgw_kannel_sms_dlr` (`smsc`, `timestamp`, `source`, `destination`,
 `service`, `url`, `mask`, `boxc_id`, `status`) VALUES (?, ?, ?, ?, ?, ?, ?,
 ?, 0)

 2. When the submit_sm_resp PDU for the subsequent message parts arrive,
 Kannel doesn't create a database DLR but instead appears to create one in
 memory (note the missing SQL):

 2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:38 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:38 [5106] [10] DEBUG:   command_id: 2147483652 = 0x8004
 2011-03-25 02:03:38 [5106] [10] DEBUG:   command_status: 0 = 0x
 2011-03-25 02:03:38 [5106] [10] DEBUG:   sequence_number: 18 = 0x0012
 2011-03-25 02:03:38 [5106] [10] DEBUG:   message_id:
 2011-03-25 02:03:38 [5106] [10] DEBUG:    Octet string at 0xc8d1d80:
 2011-03-25 02:03:38 [5106] [10] DEBUG:      len:  20
 2011-03-25 02:03:38 [5106] [10] DEBUG:      size: 21
 2011-03-25 02:03:38 [5106] [10] DEBUG:      immutable: 0
 2011-03-25 02:03:38 [5106] [10] DEBUG:      data: 31 33 30 30 39 38 39 38 31
 37 39 33 34 31 38 34   1300989817934184
 2011-03-25 02:03:38 [5106] [10] DEBUG:      data: 30 34 30 32
 0402
 2011-03-25 02:03:38 [5106] [10] DEBUG:    Octet string dump ends.
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU dump ends.
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: creating
 DLR message
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: DLR =

 3. When the deliver_sm PDU arrives for the first message part, it's
 correctly matched against the database, processed and deleted:

 2011-03-25 02:03:48 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:48 [5106] [10] DEBUG:   type_name: deliver_sm
 2011-03-25 02:03:48 [5106] [10] DEBUG:   command_id: 5 = 0x0005
 2011-03-25 02:03:48 [5106] [10] DEBUG:   command_status: 0 = 0x
 2011-03-25 02:03:48 [5106] [10] DEBUG:   sequence_number: 8 = 0x0008
 2011-03-25 02:03:48 [5106] [10] DEBUG:   service_type: NULL
 2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr_ton: 0 = 0x
 2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr_npi: 0 = 0x
 2011-03-25 02:03:48 [5106] [10] DEBUG:   source_addr: 9
 2011-03-25 02:03:48 [5106] [10] DEBUG:   dest_addr_ton: 0 = 0x
 2011-03-25 02:03:48 [5106] [10] DEBUG:   dest_addr_npi: 0 = 0x
 2011-03-25 02:03:48 [5106] [10] DEBUG:   destination_addr: test
 2011-03-25 02:03:48 [5106] [10] DEBUG:   esm_class: 4 = 0x0004
 2011-03-25 

RE: DLRs for concatenated messages

2011-03-24 Thread Toby Phipps
Hi Alvaro,

Thanks for the feedback. Any insight into why it was implemented this way?
i.e. is there reason why each of the submit_sm_resp PDUs shouldn't generate
a separate DLR in the DB? The only reason I can come up with offhand is that
the current way probably handles misbehaving SMPP servers better - servers
that send one DLR per concatenated message rather than per part. However,
the current (broken, IMHO) behaviour could easily be maintained with a
config parameter.

Before I scope a patch to address this, any comments or disagreements?

Also, I haven't tried this with memory-only DLRs - is this an issue limited
to SQL DLR storage? From looking at my logs, it seems that a DLR is indeed
created in memory for the second and subsequent message parts, just not
written to the DB. 

Thanks,
Toby

-Original Message-
From: Alvaro Cornejo [mailto:cornejo.alv...@gmail.com] 
Sent: Friday, March 25, 2011 1:47 AM
To: Toby Phipps
Cc: users@kannel.org
Subject: Re: DLRs for concatenated messages

Hi

That is the way kannel handles dlr for concatenated messages. There has been
several threads regarding how to improve this but nothing has been done.


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



On Thu, Mar 24, 2011 at 1:29 PM, Toby Phipps toby.phi...@nexmedia.com.sg
wrote:
 Hi all,

 I'm seeing some strangeness with DLR handling of concatenated messages 
 sent via SMPP in Kannel 1.5.0.

 I'm using MySQL for DLR storage and only the first message of the set 
 generates a DLR in the database.  My provider, however, follows the 
 specs and returns a DLR for each part. Kannel recognizes the first DLR 
 and updates the database. When the DLRs for the remaining parts 
 arrive, Kannel tries to find them in the database and fails, spitting out
an error (see below).

 Specifically:

 1. When the submit_sm_resp PDU for the first message part arrives, 
 Kannel happily creates the DLR in the database:

 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:37 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_id: 2147483652 = 
 0x8004
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_status: 0 = 
 0x
 2011-03-25 02:03:37 [5106] [10] DEBUG:   sequence_number: 17 = 
 0x0011
 2011-03-25 02:03:37 [5106] [10] DEBUG:   message_id:
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string at 0xc8cbc50:
 2011-03-25 02:03:37 [5106] [10] DEBUG:      len:  20
 2011-03-25 02:03:37 [5106] [10] DEBUG:      size: 21
 2011-03-25 02:03:37 [5106] [10] DEBUG:      immutable: 0
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 31 33 30 30 39 38 39 
 38 31
 37 36 36 36 31 38 33   1300989817666183
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 30 34 30 32
 0402
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: DLR[mysql]: Adding DLR 
 smsc=MY-SMPP-CONNECTION, ts=13009898176661830402, src=test, 
 dst=9, mask=31, boxc=smsbox
 2011-03-25 02:03:37 [5106] [10] DEBUG: adding DLR entry into database
 2011-03-25 02:03:37 [5106] [10] DEBUG: sql: INSERT INTO 
 `smsgw_kannel_sms_dlr` (`smsc`, `timestamp`, `source`, `destination`, 
 `service`, `url`, `mask`, `boxc_id`, `status`) VALUES (?, ?, ?, ?, ?, 
 ?, ?, ?, 0)

 2. When the submit_sm_resp PDU for the subsequent message parts 
 arrive, Kannel doesn't create a database DLR but instead appears to 
 create one in memory (note the missing SQL):

 2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:38 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:38 [5106] [10] DEBUG:   command_id: 2147483652 = 
 0x8004
 2011-03-25 02:03:38 [5106] [10] DEBUG:   command_status: 0 = 
 0x
 2011-03-25 02:03:38 [5106] [10] DEBUG:   sequence_number: 18 = 
 0x0012
 2011-03-25 02:03:38 [5106] [10] DEBUG:   message_id:
 2011-03-25 02:03:38 [5106] [10] DEBUG:    Octet string at 0xc8d1d80:
 2011-03-25 02:03:38 [5106] [10] DEBUG:      len:  20
 2011-03-25 02:03:38 [5106] [10] DEBUG:      size: 21
 2011-03-25 02:03:38 [5106] [10] DEBUG:      immutable: 0
 2011-03-25 02:03:38 [5106] [10] DEBUG:      data: 31 33 30 30 39 38 39 
 38 31
 37 39 33 34 31 38 34   1300989817934184
 2011-03-25 02:03:38 [5106] [10] DEBUG:      data: 30 34 30 32
 0402
 2011-03-25 02:03:38 [5106] [10] DEBUG:    Octet string dump ends.
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU dump ends.
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: 
 creating DLR message
 2011-03-25 02:03:38 [5106] [10] DEBUG: SMSC[MY-SMPP-CONNECTION]: DLR =

 3. 

NoSQL and Kannel

2011-03-24 Thread Toby Phipps
Hi all,

 

Has anyone put any thought into implementing Kannel DLR storage (and the
basics of sqlbox MT injection) in a NoSQL datastore?  We are using Redis
(http://redis.io) for other projects and are very happy with it. Its
key-based storage/retrieval and strong support for arrays as atomic queues
would make it perfect for Kannel, especially given the transient nature of
this data and Redis' memory speed with disk backing. 

 

The main advantages in my mind are that during heavy loads disk access would
be minimized, DB polling would disappear (to be replaced with blocking array
pops) and the SQL overhead would be removed replaced with set/fetch by keys.

 

No particular reason this would need to be Redis - memcached, MongoDB,
Cassandra etc. would also probably work well assuming they have the
array/queue support.

 

Any thoughts? It wouldn't be a small project, but basing the code on the
existing implementations of SQL DLRs and sqlbox would mean  a big jump
start.

 

Toby.



Re: NoSQL and Kannel

2011-03-24 Thread Alejandro Guerrieri
I've been playing with kannel and memcached a little bit, but nothing worth
posting so far. The unreliable nature of memcached (because of its
unreplicated horizontal scaling) doesn't make it very suitable for DLR's in
fact (e.g., a node going down and zapping all the dlrs stored in it).

Other noSQL engines would make more sense.

Regards,

Alex

On Thu, Mar 24, 2011 at 8:12 PM, Toby Phipps toby.phi...@nexmedia.com.sgwrote:

 Hi all,



 Has anyone put any thought into implementing Kannel DLR storage (and the
 basics of sqlbox MT injection) in a NoSQL datastore?  We are using Redis (
 http://redis.io) for other projects and are very happy with it. Its
 key-based storage/retrieval and strong support for arrays as atomic queues
 would make it perfect for Kannel, especially given the transient nature of
 this data and Redis’ memory speed with disk backing.



 The main advantages in my mind are that during heavy loads disk access
 would be minimized, DB polling would disappear (to be replaced with blocking
 array pops) and the SQL overhead would be removed replaced with set/fetch by
 keys.



 No particular reason this would need to be Redis – memcached, MongoDB,
 Cassandra etc. would also probably work well assuming they have the
 array/queue support.



 Any thoughts? It wouldn’t be a small project, but basing the code on the
 existing implementations of SQL DLRs and sqlbox would mean  a big jump
 start…



 Toby.



Re: DLRs for concatenated messages

2011-03-24 Thread Alvaro Cornejo
Hi

From my understanting - I'm not a developper- the issue is what to do
when only one part of the concatenated fails -resend the whole/failed
part- and how/when to validate the original full initial message. it
seems that type of messafe handling will require to have a separate
queue/buffer for concatenated messages in order to be able to track
the whole message.

Maybe you can do a search on the mailing list for concatenated
messages and will find the threads between devs people.

Regards

Alvaro



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



On Thu, Mar 24, 2011 at 2:00 PM, Toby Phipps
toby.phi...@nexmedia.com.sg wrote:
 Hi Alvaro,

 Thanks for the feedback. Any insight into why it was implemented this way?
 i.e. is there reason why each of the submit_sm_resp PDUs shouldn't generate
 a separate DLR in the DB? The only reason I can come up with offhand is that
 the current way probably handles misbehaving SMPP servers better - servers
 that send one DLR per concatenated message rather than per part. However,
 the current (broken, IMHO) behaviour could easily be maintained with a
 config parameter.

 Before I scope a patch to address this, any comments or disagreements?

 Also, I haven't tried this with memory-only DLRs - is this an issue limited
 to SQL DLR storage? From looking at my logs, it seems that a DLR is indeed
 created in memory for the second and subsequent message parts, just not
 written to the DB.

 Thanks,
 Toby

 -Original Message-
 From: Alvaro Cornejo [mailto:cornejo.alv...@gmail.com]
 Sent: Friday, March 25, 2011 1:47 AM
 To: Toby Phipps
 Cc: users@kannel.org
 Subject: Re: DLRs for concatenated messages

 Hi

 That is the way kannel handles dlr for concatenated messages. There has been
 several threads regarding how to improve this but nothing has been done.


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



 On Thu, Mar 24, 2011 at 1:29 PM, Toby Phipps toby.phi...@nexmedia.com.sg
 wrote:
 Hi all,

 I'm seeing some strangeness with DLR handling of concatenated messages
 sent via SMPP in Kannel 1.5.0.

 I'm using MySQL for DLR storage and only the first message of the set
 generates a DLR in the database.  My provider, however, follows the
 specs and returns a DLR for each part. Kannel recognizes the first DLR
 and updates the database. When the DLRs for the remaining parts
 arrive, Kannel tries to find them in the database and fails, spitting out
 an error (see below).

 Specifically:

 1. When the submit_sm_resp PDU for the first message part arrives,
 Kannel happily creates the DLR in the database:

 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:37 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_id: 2147483652 =
 0x8004
 2011-03-25 02:03:37 [5106] [10] DEBUG:   command_status: 0 =
 0x
 2011-03-25 02:03:37 [5106] [10] DEBUG:   sequence_number: 17 =
 0x0011
 2011-03-25 02:03:37 [5106] [10] DEBUG:   message_id:
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string at 0xc8cbc50:
 2011-03-25 02:03:37 [5106] [10] DEBUG:      len:  20
 2011-03-25 02:03:37 [5106] [10] DEBUG:      size: 21
 2011-03-25 02:03:37 [5106] [10] DEBUG:      immutable: 0
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 31 33 30 30 39 38 39
 38 31
 37 36 36 36 31 38 33   1300989817666183
 2011-03-25 02:03:37 [5106] [10] DEBUG:      data: 30 34 30 32
 0402
 2011-03-25 02:03:37 [5106] [10] DEBUG:    Octet string dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: SMPP PDU dump ends.
 2011-03-25 02:03:37 [5106] [10] DEBUG: DLR[mysql]: Adding DLR
 smsc=MY-SMPP-CONNECTION, ts=13009898176661830402, src=test,
 dst=9, mask=31, boxc=smsbox
 2011-03-25 02:03:37 [5106] [10] DEBUG: adding DLR entry into database
 2011-03-25 02:03:37 [5106] [10] DEBUG: sql: INSERT INTO
 `smsgw_kannel_sms_dlr` (`smsc`, `timestamp`, `source`, `destination`,
 `service`, `url`, `mask`, `boxc_id`, `status`) VALUES (?, ?, ?, ?, ?,
 ?, ?, ?, 0)

 2. When the submit_sm_resp PDU for the subsequent message parts
 arrive, Kannel doesn't create a database DLR but instead appears to
 create one in memory (note the missing SQL):

 2011-03-25 02:03:38 [5106] [10] DEBUG: SMPP PDU 0xc8ad960 dump:
 2011-03-25 02:03:38 [5106] [10] DEBUG:   type_name: submit_sm_resp
 2011-03-25 02:03:38 

Re: NoSQL and Kannel

2011-03-24 Thread Garth Patil
I have written DLR storage adapters for Redis, Memcache and Tokyo
Tyrant, but these were for consulting and are not open source. I will
check to see if any of the customers will allow them to be published.
However, they were fairly trivial to implement using the gw/dlr_*
sources as a template. Doing something like sqlbox also shouldn't be
that difficult.

On Thu, Mar 24, 2011 at 12:17 PM, Alejandro Guerrieri
alejandro.guerri...@gmail.com wrote:
 I've been playing with kannel and memcached a little bit, but nothing worth
 posting so far. The unreliable nature of memcached (because of its
 unreplicated horizontal scaling) doesn't make it very suitable for DLR's in
 fact (e.g., a node going down and zapping all the dlrs stored in it).
 Other noSQL engines would make more sense.
 Regards,
 Alex

 On Thu, Mar 24, 2011 at 8:12 PM, Toby Phipps toby.phi...@nexmedia.com.sg
 wrote:

 Hi all,



 Has anyone put any thought into implementing Kannel DLR storage (and the
 basics of sqlbox MT injection) in a NoSQL datastore?  We are using Redis
 (http://redis.io) for other projects and are very happy with it. Its
 key-based storage/retrieval and strong support for arrays as atomic queues
 would make it perfect for Kannel, especially given the transient nature of
 this data and Redis’ memory speed with disk backing.



 The main advantages in my mind are that during heavy loads disk access
 would be minimized, DB polling would disappear (to be replaced with blocking
 array pops) and the SQL overhead would be removed replaced with set/fetch by
 keys.



 No particular reason this would need to be Redis – memcached, MongoDB,
 Cassandra etc. would also probably work well assuming they have the
 array/queue support.



 Any thoughts? It wouldn’t be a small project, but basing the code on the
 existing implementations of SQL DLRs and sqlbox would mean  a big jump
 start…



 Toby.




How to start Kannel

2011-03-24 Thread Komil Gulboev
I need to some manual for start Kannel because I`m new in Kannel and 
it`s difficult for me.

I hope to understand, thanks.