Problem capturing DLR

2011-07-10 Thread Michael van der Poel
Hi all,

I am running Kannel 1.5 on CentOS and am happily sending messages over SMPP.
What has been wrecking my head for a few weeks now, is how to capture the
delivery reports in a MySQL table. I have been making one BOLD assumption:
that there is life without the smsbox. And when I look at the logs, except
for some warnings about a non-existent smsbox, everything is there: the
PDU's deliver_sm has all the information I am looking for.

I have 3 MySQL tables: the default 'send_sms' and 'sent_sms' and an
additional table 'verslag' that has columns 'smsc', 'ts', 'dst', 'source',
'service', 'url', 'mask', 'status', 'boxc_id', 'to', 'network-code',
'msisdn', 'scts', 'id_sms'.
Obviously, the dlr.php should update the 'status' column for the relevant
'id_sms' but it doesn't.
In the attached file, I am sending my config files, logs and the dlr.php
file.

I would be very grateful if you could point me in the right direction. I
must be doing something very wrong!

Regards,



Michael




 kannel.config 

group = core
admin-port = 13000
admin-password = bar
admin-deny-ip = *.*.*.*
admin-allow-ip = 127.0.0.1
smsbox-port = 13003
log-file = /var/log/kannel/bearerbox.log
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1
dlr-storage=mysql
log-level=0

group = smsbox
bearerbox-host=localhost
sendsms-port = 13013
sendsms-chars = +0123456789
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access.log
log-level = 0
mo-recode = 1

group = smsc
smsc = smpp
smsc-id = smpp-provider
host = msg1.provider.com
port = 8000
receive-port = 8000
#transceiver-mode = false
transceiver-mode = 1
throughput = 10
smsc-username = username
smsc-password = password
system-type = username
dest-addr-ton=1
log-file = /var/log/kannel/smpp-provider.log
log-level = 0
msg-id-type=0x01
enquire-link-interval = 30

dlr-url=http://[IP 
address]/cgi-bin/dlr.php?to=%tomsisdn=%msisdnstatus=%statusmessagId=%messagIdscts=%scts
group = sendsms-user
username = username
password = pwd
forced-smsc =  smpp-provider
name = users
user-deny-ip = *.*.*.*
user-allow-ip = 127.0.0.1
max-messages = 3
concatenation = 1
omit-empty = 1

# DLR SETUP
#mysql connection
group = mysql-connection
id = mydlr
host = localhost
username = gebruikersnaam
password = geheimwoord
database = tekstberichten
max-connections = 5

group = dlr-db
id = mydlr
table=verslag
field-smsc=smsc
field-timestamp=ts
field-destination=dst
field-source=source
field-service=service
field-url=url
field-mask=mask
field-status=status
field-boxc-id=boxc_id


 sqlbox.conf 

group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
global-sender = sender
bearerbox-host = localhost
bearerbox-port = 13003
smsbox-port = 13005
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

# Example MYSQL Connection
group=mysql-connection
id =sqlbox-db
host = localhost
username = gebruikersnaam
password = geheimwoord
database = tekstberichten
max-connections = 1

 bearerbox.log 

2011-07-10 05:08:41 [21821] [0] INFO: HTTP: Opening server at port 13000.
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 1 (gwlib/fdset.c:poller)
2011-07-10 05:08:41 [21821] [1] DEBUG: Thread 1 (gwlib/fdset.c:poller) maps to 
pid 21821.
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 2 
(gwlib/http.c:server_thread)
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 3 
(gw/bb_http.c:httpadmin_run)
2011-07-10 05:08:41 [21821] [3] DEBUG: Thread 3 (gw/bb_http.c:httpadmin_run) 
maps to pid 21821.
2011-07-10 05:08:41 [21821] [0] DEBUG: starting smsbox connection module
2011-07-10 05:08:41 [21821] [0] INFO: BOXC: 'smsbox-max-pending' not set, using 
default (100).
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 4 
(gw/bb_boxc.c:sms_to_smsboxes)
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 5 
(gw/bb_boxc.c:smsboxc_run)
2011-07-10 05:08:41 [21821] [4] DEBUG: Thread 4 (gw/bb_boxc.c:sms_to_smsboxes) 
maps to pid 21821.
2011-07-10 05:08:41 [21821] [0] INFO: Set SMS resend frequency to 60 seconds.
2011-07-10 05:08:41 [21821] [0] INFO: SMS resend retry set to unlimited.
2011-07-10 05:08:41 [21821] [0] DEBUG: MO concatenated message handling enabled
2011-07-10 05:08:41 [21821] [0] INFO: Set throughput to 10.000 for smsc id 
smpp-provider
2011-07-10 05:08:41 [21821] [0] INFO: DLR rerouting for smsc id smpp-provider 
disabled.
2011-07-10 05:08:41 [21821] [5] DEBUG: Thread 5 (gw/bb_boxc.c:smsboxc_run) maps 
to pid 21821.
2011-07-10 05:08:41 [21821] [0] INFO: Added logfile 
`/var/log/kannel/smpp-provider.log' with level `0'.
2011-07-10 05:08:41 [21821] [0] WARNING: SMPP: receive-port for transceiver 
mode defined, ignoring.
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 6 
(gw/smsc/smsc_smpp.c:io_thread)
2011-07-10 05:08:41 [21821] [6] DEBUG: Thread 6 (gw/smsc/smsc_smpp.c:io_thread) 
maps to pid 21821.
2011-07-10 05:08:41 [21821] [0] DEBUG: Started thread 7 
(gw/bb_smscconn.c:sms_router)
2011-07-10 05:08:41 [21821] [0] INFO: 

Re: Problem capturing DLR

2011-07-10 Thread Nikos Balkanas
Hi,

This explains also your previous problem with dlr-url. I am surprised bb
doesn't panic with such configuration.

You cannot add attributes (like dlr_url)  outside groups (i.e. on a blank
line). Please read configuration basics from UG.

BR,
Nikos

On Sun, Jul 10, 2011 at 9:27 AM, Michael van der Poel movdp...@gmail.comwrote:

  Hi all,

 I am running Kannel 1.5 on CentOS and am happily sending messages over
 SMPP. What has been wrecking my head for a few weeks now, is how to capture
 the delivery reports in a MySQL table. I have been making one BOLD
 assumption: that there is life without the smsbox. And when I look at the
 logs, except for some warnings about a non-existent smsbox, everything is
 there: the PDU's deliver_sm has all the information I am looking for.

 I have 3 MySQL tables: the default 'send_sms' and 'sent_sms' and an
 additional table 'verslag' that has columns 'smsc', 'ts', 'dst', 'source',
 'service', 'url', 'mask', 'status', 'boxc_id', 'to', 'network-code',
 'msisdn', 'scts', 'id_sms'.
 Obviously, the dlr.php should update the 'status' column for the relevant
 'id_sms' but it doesn't.
 In the attached file, I am sending my config files, logs and the dlr.php
 file.

 I would be very grateful if you could point me in the right direction. I
 must be doing something very wrong!

 Regards,



 Michael






Re: MO Empty SMS Issue

2011-07-10 Thread Amr Qanadilo
Hi Rene;

It worked Perfectly

Thanks

On Sat, Jul 2, 2011 at 5:32 PM, Rene Kluwen rene.klu...@chimit.nl wrote:

  Or another options is to prefix your keywords:

 ** **

 http://xx.xx.xx.xx/newamc/kannel_send/key_%p/par_%b/

 ** **

 This way, if %p is empty, you still won’t get //, but /par_/ in stead.

 ** **

 == Rene

 ** **

 ** **

 *From:* users-boun...@kannel.org [mailto:users-boun...@kannel.org] *On
 Behalf Of *Rene Kluwen
 *Sent:* Saturday, 02 July, 2011 16:30
 *To:* 'Amr Qanadilo'
 *Cc:* users@kannel.org
 *Subject:* RE: MO Empty SMS Issue

 ** **

 Why don’t you send something like:

 ** **

 http://xx.xx.xx.xx/newamc/kannel_send?p=%pb=%b

 ** **

 == Rene

 ** **

 ** **

 ** **

 *From:* Amr Qanadilo [mailto:amr1...@gmail.com]
 *Sent:* Saturday, 02 July, 2011 16:01
 *To:* Rene Kluwen
 *Cc:* ha...@aeon.pk; users@kannel.org

 *Subject:* Re: MO Empty SMS Issue

   ** **

 Dear Rene;

  

 Then Kannel will send nothing at all in such a case. What i want is to make
 kannel to respond to an empty MO SMS with a predefined Text. As you can see
 from my configuration in the URL am using to send to my application  the URL
 will send something like http:/999/ada/asdsa//asda, If you notice the
 //. here the application server does not identify the // and reject it.
 thats why i want kannel to send a predefined SMS back to the user when the
 user sends empty SMS

  

 Your feedback is highly appreciated

 On Sat, Jul 2, 2011 at 3:29 PM, Rene Kluwen rene.klu...@chimit.nl wrote:
 

 Try: omit-empty = true in group = sms-service.

  

 *From:* users-boun...@kannel.org [mailto:users-boun...@kannel.org] *On
 Behalf Of *Amr Qanadilo
 *Sent:* Saturday, 02 July, 2011 09:39
 *To:* ha...@aeon.pk
 *Cc:* users@kannel.org
 *Subject:* Re: MO Empty SMS Issue

  

 Dear Sir;

  

 I have tried the reply-emptymessage but it didnt work... am afraid am doing
 somethign wrong. below is the full configurations i have, can you please
 (and thankfully the list) tell me if am doing something wrong.

  

 group = core
 admin-port = 13000
 smsbox-port = 13001
 wapbox-port = 13002
 admin-password = bar
 log-file = /var/log/kannel.log
 log-level = 0
 #box-deny-ip = *.*.*.*
 #box-allow-ip = 127.0.0.1
 box-allow-ip = *.*.*.*
 #sms-resend-freq = 1800
 sms-resend-retry = 0

  


 group=smsc
 smsc-id=SMSC1
 smsc=smpp
 interface-version=34
 host=xx.xx.xx.xx
 port=6000
 system-id=AMC
 smsc-password=
 system-type=smpp
 transceiver-mode=0
 service-type=
 dest-addr-ton=1
 dest-addr-npi=1
 #receive-port=700
 source-addr-ton=1
 source-addr-npi=1
 receive-port=6000
 wait-ack-expire = 0x02
 validityperiod = 60
 throughput = 2

 #group=smsc
 #smsc-id=
 #smsc=smpp
 #interface-version=34
 #host=10.1.250.82
 #port=
 #system-id=XXX
 #smsc-password=20110504
 #system-type=smpp
 #transceiver-mode=0
 #service-type=
 #dest-addr-ton=1
 #dest-addr-npi=1
 #receive-port=700
 #source-addr-ton=1
 #source-addr-npi=1
 #receive-port=

 group = smsbox
 bearerbox-host = XX.XX.XX.XX
 sendsms-port = 13013
 global-sender = 13013
 log-level = 0
 # smsbox-id = internal
 http-request-retry=5
 mo-recode=true

 group = sendsms-user
 username = kannel
 password = kannel
 concatenation = true
 max-messages = 3
 forced-smsc = 212_smsc
 user-allow-ip = *.*.*.*

 group = ppg
 ppg-url = /wappush
 ppg-port = 8080
 concurrent-pushes = 100
 users = 1024
 #ppg-allow-ip = *.*.*.*
 #trusted-pi = false

 group = wapbox
 bearerbox-host = xx.xx.xx.xx
 #log-file = filename
 log-level = 0
 syslog-level = none

 group = wap-push-user
 wap-push-user = picom
 ppg-username = kannel
 ppg-password = kannel
 #allow-ip = *.*.*.*


 group = sms-service
 keyword=default
 accepted-smsc = SMSC1
 #keyword-regex = .*
 catch-all = yes
 max-messages = 0
 get-url = http://xx.xx.xx.xx/newamc/kannel_send/%p/%b/

  

 #group = sms-service
 #keyword=NOT
 #accepted-smsc = 

 #keyword-regex = .*
 #catch-all = yes
 #max-messages = 0
 #get-url = http://xx.xx.xx.xx/newamc/kannel_send/%p/%b/;

 #group = sms-service
 #keyword = default
 #text = No service specified

  

  

  

  

  

  

  

  


  

 On Thu, Jun 30, 2011 at 4:12 PM, ha...@aeon.pk ha...@aeon.pk wrote:

 Check reply-emptymessage in SMSBOX section in userguide. 

  

 On Thu, Jun 30, 2011 at 12:55 PM, Amr Qanadilo amr1...@gmail.com wrote:*
 ***

 Dear List;

  

 I have a question regarding Kannel;

  

 We are using a Redhat linux and the latest release of Kannel. We would
 appreciate your help in knowing how can we handle empty SMS though Kannel.
 The use case is as follows;

  

 User sends empty SMS, Kannel receive it and send it to our application. The
 URL when received by the application is not understood by the apache server
 so the apache reject the URL. I would like to know if there is a way to 

Re: Problem capturing DLR

2011-07-10 Thread Michael van der Poel
Hi Nikos,

Thanks for that. I moved the dlr-url to its right place but it makes no
difference. :-(

Regards,


Michael

On 10/7/11 11:01, Nikos Balkanas nbalka...@gmail.com wrote:

 Hi,
 
 This explains also your previous problem with dlr-url. I am surprised bb
 doesn't panic with such configuration.
 
 You cannot add attributes (like dlr_url)  outside groups (i.e. on a blank
 line). Please read configuration basics from UG.
 
 BR,
 Nikos



Re: Problem capturing DLR

2011-07-10 Thread Michael van der Poel
I should probably mention that my provider passes on the following
parameters in the Call back URL.

Parameter   Value
usernameOptional username for authentication.
password Optional password for authentication.
toSender Id of the message.
network-code   Unique identifier of a mobile network MCCMNC. Wikipedia
list here http://en.wikipedia.org/wiki/Mobile_Network_Code .
messageId   Message ID.
msisdn Number message was delivered to.
status  Status of message.
scts UTC time when notification is received from mobile
network in the following format YYMMDDHHMM e.g. 1101181426 is 2011 Jan 18th
14:26 

Different from the Œ%p¹, Œ%t¹, Œ%I¹, etc. one might expect.

Thanks,


Michael

On 10/7/11 14:03, Michael van der Poel movdp...@gmail.com wrote:

 Hi Nikos,
 
 Thanks for that. I moved the dlr-url to its right place but it makes no
 difference. :-(
 
 Regards,
 
 
 Michael
 
 On 10/7/11 11:01, Nikos Balkanas nbalka...@gmail.com wrote:
 
 Hi,
 
 This explains also your previous problem with dlr-url. I am surprised bb
 doesn't panic with such configuration.
 
 You cannot add attributes (like dlr_url)  outside groups (i.e. on a blank
 line). Please read configuration basics from UG.
 
 BR,
 Nikos




Ragarding Opensmpp account;

2011-07-10 Thread Vijay kumar Dadhich
Hello to all of You,
I am successfully bind with sqlbox and opensmppbox, Now i want to know
that how can  I manage client in opensmpp as they are not able to send
message.

-- 
Vijay Kr. Dadhich