Re: kannel service not restart

2013-09-20 Thread alex Preda
Hello Kannel Team,
Thanks Alejandro and Alvaro for your response.

i had configured mysql database and create table with name of dlr, my
kannel service works fine and sms are send successfully. but didn't get dlr
reports and also access.log didn't generate receive dlr fields. i made some
changes in kannel.conf, here is my kannel.conf file,dlr table, and
access.log. i'm bit confused with rsms.php. your help appreciated.

*Kannel.conf*

#CORE
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = test
log-file = /var/log/kannel/kannel.log
log-level = 1
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1;x.x.x.x
admin-deny-ip = 
admin-allow-ip = 
unified-prefix = 00358,0
access-log = /var/log/kannel/access.log
dlr-storage = mysql

#SMSC
group = smsc
smsc = smpp
smsc-id = sms1
host = x.x.x.x
smsc-username = test
smsc-password = test
port = 1234
system-type = sms

#smsbox
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
sendsms-chars = 0123456789 +-
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access.log

# sendsms-user
group = sendsms-user
username = test
password = test
user-deny-ip = 
user-allow-ip = 
default-sender = update
dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
#dlr-mask = 31

#smsroute
group = smsbox-route
smsbox-id = mysmsc
smsc-id = sms1
shortcode = ;

#sms-service
group = sms-service
keyword = default
get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
accept-x-kannel-headers = true
max-messages = 3
concatenation = true
catch-all = true

# Example MYSQL Connection
group = mysql-connection
id = mydlr
host = localhost
username = root
password = redhat
database = kannel
port = 3306

#dlr-db
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
-
*DLR Table*

mysql desc dlr;
+-+--+--+-+-+---+
| Field   | Type | Null | Key | Default | Extra |
+-+--+--+-+-+---+
| smsc| varchar(40)  | YES  | | NULL|   |
| ts  | varchar(40)  | YES  | | NULL|   |
| destination | varchar(40)  | YES  | | NULL|   |
| source  | varchar(40)  | YES  | | NULL|   |
| service | varchar(40)  | YES  | | NULL|   |
| url | varchar(255) | YES  | | NULL|   |
| mask| int(10)  | YES  | | NULL|   |
| status  | int(10)  | YES  | | NULL|   |
| boxc| varchar(40)  | YES  | | NULL|   |
+-+--+--+-+-+---+
9 rows in set (0.00 sec)

--
*Access.log*

[root@test kannel]# tail -f access.log
2013-09-20 14:48:05 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
[META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
[udh:0:]
2013-09-20 14:50:46 Log ends
2013-09-20 14:50:55 Log begins
2013-09-20 14:51:00 Log begins
2013-09-20 14:51:13 send-SMS request added - sender:test:update
115.248.40.89 target:978221 request: 'we'
2013-09-20 14:51:13 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
[META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
[udh:0:]
2013-09-20 14:51:17 send-SMS request added - sender:test:update
115.248.40.89 target:978221 request: 'we'
2013-09-20 14:51:17 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
[META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
[udh:0:]
2013-09-20 14:53:01 send-SMS request added - sender:test:update
115.248.40.89 target:978221 request: 'we'
2013-09-20 14:53:02 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
[META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
[udh:0:]




On Thu, Sep 19, 2013 at 8:20 PM, Alejandro Guerrieri 
alejandro.guerri...@gmail.com wrote:

 MYSQL: Unknown database 'dlr'

 Did you create the database?


 On Thu, Sep 19, 2013 at 10:26 AM, alex Preda alexpred...@gmail.comwrote:

 Hello Alvaro,
   Thanks for your reply ! :)
 As per your instructions i tried to start bearerbox but it is showing
 some following error.

 [root@test1 kannel]# !b
 bearerbox -v 0 /etc/kannel.conf
 2013-09-19 18:05:40 [30340] [0] INFO: Debug_lvl = 0, log_file = none,
 log_lvl = 0
 2013-09-19 18:05:40 [30340] [0] ERROR: MYSQL: can not connect to database!
 2013-09-19 18:05:40 [30340] [0] ERROR: MYSQL: Unknown database 'dlr'
 2013-09-19 18:05:40 [30340] [0] PANIC: DLR: MySQL: database pool has no
 connections!
 2013-09-19 18:05:40 [30340] [0] PANIC: 

Re: kannel service not restart

2013-09-20 Thread Alejandro Guerrieri
The dlr table only holds dlrs while in transit, they won't get stored long 
term. You need to create something using your dlr-url to records that.

--
Alex Guerrieri

 On Sep 20, 2013, at 7:26, alex Preda alexpred...@gmail.com wrote:
 
 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your response.
 
 i had configured mysql database and create table with name of dlr, my 
 kannel service works fine and sms are send successfully. but didn't get dlr 
 reports and also access.log didn't generate receive dlr fields. i made some 
 changes in kannel.conf, here is my kannel.conf file,dlr table, and 
 access.log. i'm bit confused with rsms.php. your help appreciated.  
 
 Kannel.conf
 
 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql
 
 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms
 
 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log
 
 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip = 
 user-allow-ip = 
 default-sender = update
 dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
 #dlr-mask = 31
 
 #smsroute
 group = smsbox-route
 smsbox-id = mysmsc
 smsc-id = sms1
 shortcode = ;
 
 #sms-service
 group = sms-service
 keyword = default
 get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
 accept-x-kannel-headers = true
 max-messages = 3
 concatenation = true
 catch-all = true
 
 # Example MYSQL Connection
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = redhat
 database = kannel
 port = 3306
 
 #dlr-db
 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
 -
 DLR Table 
 
 mysql desc dlr;
 +-+--+--+-+-+---+
 | Field   | Type | Null | Key | Default | Extra |
 +-+--+--+-+-+---+
 | smsc| varchar(40)  | YES  | | NULL|   |
 | ts  | varchar(40)  | YES  | | NULL|   |
 | destination | varchar(40)  | YES  | | NULL|   |
 | source  | varchar(40)  | YES  | | NULL|   |
 | service | varchar(40)  | YES  | | NULL|   |
 | url | varchar(255) | YES  | | NULL|   |
 | mask| int(10)  | YES  | | NULL|   |
 | status  | int(10)  | YES  | | NULL|   |
 | boxc| varchar(40)  | YES  | | NULL|   |
 +-+--+--+-+-+---+
 9 rows in set (0.00 sec)
 
 --
 Access.log
 
 [root@test kannel]# tail -f access.log 
 2013-09-20 14:48:05 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:] 
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we] 
 [udh:0:]
 2013-09-20 14:50:46 Log ends
 2013-09-20 14:50:55 Log begins
 2013-09-20 14:51:00 Log begins
 2013-09-20 14:51:13 send-SMS request added - sender:test:update 115.248.40.89 
 target:978221 request: 'we'
 2013-09-20 14:51:13 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:] 
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we] 
 [udh:0:]
 2013-09-20 14:51:17 send-SMS request added - sender:test:update 115.248.40.89 
 target:978221 request: 'we'
 2013-09-20 14:51:17 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:] 
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we] 
 [udh:0:]
 2013-09-20 14:53:01 send-SMS request added - sender:test:update 115.248.40.89 
 target:978221 request: 'we'
 2013-09-20 14:53:02 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:] 
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we] 
 [udh:0:]
 
 
 
 
 On Thu, Sep 19, 2013 at 8:20 PM, Alejandro Guerrieri 
 alejandro.guerri...@gmail.com wrote:
 MYSQL: Unknown database 'dlr'
 
 Did you create the database?
 
 
 On Thu, Sep 19, 2013 at 10:26 AM, alex Preda alexpred...@gmail.com wrote:
 Hello Alvaro,
   Thanks for your reply ! :) 
 As per your instructions i tried to start bearerbox but it is showing some 
 following error.
 
 [root@test1 kannel]# !b
 bearerbox -v 0 

Re: kannel service not restart

2013-09-20 Thread arun sharma
I'm trying dlr-url with url : dlr-url =
http://x.x.x.x/rsms.php?sender=%ptext=%a and for store dlr entry im
using rsms.php. is it good way to store
dlr entry in mysql or i changes required. here is my  rsms.php file that
are stored in /var/www/html.

?php
$con = mysql_connect(localhost,root,redhat);
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
else{
mysql_select_db(kannel);
}
$smsc = $_GET['smsc'];
 $ts = $_GET['ts'];
 $destination = $_GET['destination'];
 $source = $_GET['source'];
 $service = $_GET['service'];
 $url = $_GET['url'];
 $mask = $_GET['mask'];
 $status = $_GET['status'];
 $boxc = $_GET['boxc'];
 $message_id = $_GET['message_id'];
 $isisms = $_GET['isisms'];

 $sql=insert into dlr
(smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
values
 
('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
# echo mysql_query($sql);

 $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
 echo $result = mysql_query($query) or die(Query failed :  .
mysql_error());

 ?



On Fri, Sep 20, 2013 at 5:12 PM, Alejandro Guerrieri 
alejandro.guerri...@gmail.com wrote:

 The dlr table only holds dlrs while in transit, they won't get stored long
 term. You need to create something using your dlr-url to records that.

 --
 Alex Guerrieri

 On Sep 20, 2013, at 7:26, alex Preda alexpred...@gmail.com wrote:

 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your response.

 i had configured mysql database and create table with name of dlr, my
 kannel service works fine and sms are send successfully. but didn't get dlr
 reports and also access.log didn't generate receive dlr fields. i made some
 changes in kannel.conf, here is my kannel.conf file,dlr table, and
 access.log. i'm bit confused with rsms.php. your help appreciated.

 *Kannel.conf*

 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql

 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms

 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log

 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip = 
 user-allow-ip = 
 default-sender = update
 dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
 #dlr-mask = 31

 #smsroute
 group = smsbox-route
 smsbox-id = mysmsc
 smsc-id = sms1
 shortcode = ;

 #sms-service
 group = sms-service
 keyword = default
 get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
 accept-x-kannel-headers = true
 max-messages = 3
 concatenation = true
 catch-all = true

 # Example MYSQL Connection
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = redhat
 database = kannel
 port = 3306

 #dlr-db
 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

 -
 *DLR Table*

 mysql desc dlr;
 +-+--+--+-+-+---+
 | Field   | Type | Null | Key | Default | Extra |
 +-+--+--+-+-+---+
 | smsc| varchar(40)  | YES  | | NULL|   |
 | ts  | varchar(40)  | YES  | | NULL|   |
 | destination | varchar(40)  | YES  | | NULL|   |
 | source  | varchar(40)  | YES  | | NULL|   |
 | service | varchar(40)  | YES  | | NULL|   |
 | url | varchar(255) | YES  | | NULL|   |
 | mask| int(10)  | YES  | | NULL|   |
 | status  | int(10)  | YES  | | NULL|   |
 | boxc| varchar(40)  | YES  | | NULL|   |
 +-+--+--+-+-+---+
 9 rows in set (0.00 sec)


 --
 *Access.log*

 [root@test kannel]# tail -f access.log
 2013-09-20 14:48:05 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
 [udh:0:]
 2013-09-20 14:50:46 Log ends
 2013-09-20 14:50:55 Log begins
 2013-09-20 14:51:00 Log begins
 2013-09-20 14:51:13 send-SMS request added - sender:test:update
 

Re: kannel service not restart

2013-09-20 Thread alex Preda
I'm trying dlr-url with url : dlr-url =
http://x.x.x.x/rsms.php?sender=%p; text=%a
and for store dlr entry im using rsms.php. is it good way to store dlr
entry in mysql or i changes required. here is my  rsms.php file that are
stored in /var/www/html.

?php
$con = mysql_connect(localhost,root,redhat);
if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }
else{
mysql_select_db(kannel);
}
$smsc = $_GET['smsc'];
 $ts = $_GET['ts'];
 $destination = $_GET['destination'];
 $source = $_GET['source'];
 $service = $_GET['service'];
 $url = $_GET['url'];
 $mask = $_GET['mask'];
 $status = $_GET['status'];
 $boxc = $_GET['boxc'];
 $message_id = $_GET['message_id'];
 $isisms = $_GET['isisms'];

 $sql=insert into dlr
(smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
values
 
('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
# echo mysql_query($sql);

 $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
 echo $result = mysql_query($query) or die(Query failed :  .
mysql_error());

 ?


On Fri, Sep 20, 2013 at 5:22 PM, arun sharma plak...@gmail.com wrote:

 I'm trying dlr-url with url : dlr-url = 
 http://x.x.x.x/rsms.php?sender=%p; text=%a and for store dlr entry im
 using rsms.php. is it good way to store dlr entry in mysql or i changes
 required. here is my  rsms.php file that are stored in /var/www/html.

 ?php
 $con = mysql_connect(localhost,root,redhat);
 if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 else{
 mysql_select_db(kannel);
 }
 $smsc = $_GET['smsc'];
  $ts = $_GET['ts'];
  $destination = $_GET['destination'];
  $source = $_GET['source'];
  $service = $_GET['service'];
  $url = $_GET['url'];
  $mask = $_GET['mask'];
  $status = $_GET['status'];
  $boxc = $_GET['boxc'];
  $message_id = $_GET['message_id'];
  $isisms = $_GET['isisms'];

  $sql=insert into dlr

 (smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
 values

  
 ('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
 # echo mysql_query($sql);

  $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
  echo $result = mysql_query($query) or die(Query failed :  .
 mysql_error());

  ?



 On Fri, Sep 20, 2013 at 5:12 PM, Alejandro Guerrieri 
 alejandro.guerri...@gmail.com wrote:

 The dlr table only holds dlrs while in transit, they won't get stored
 long term. You need to create something using your dlr-url to records that.

 --
 Alex Guerrieri

 On Sep 20, 2013, at 7:26, alex Preda alexpred...@gmail.com wrote:

 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your response.

 i had configured mysql database and create table with name of dlr, my
 kannel service works fine and sms are send successfully. but didn't get dlr
 reports and also access.log didn't generate receive dlr fields. i made some
 changes in kannel.conf, here is my kannel.conf file,dlr table, and
 access.log. i'm bit confused with rsms.php. your help appreciated.

 *Kannel.conf*

 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql

 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms

 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log

 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip = 
 user-allow-ip = 
 default-sender = update
 dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
 #dlr-mask = 31

 #smsroute
  group = smsbox-route
 smsbox-id = mysmsc
 smsc-id = sms1
 shortcode = ;

 #sms-service
 group = sms-service
 keyword = default
 get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
 accept-x-kannel-headers = true
 max-messages = 3
 concatenation = true
 catch-all = true

 # Example MYSQL Connection
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = redhat
 database = kannel
 port = 3306

 #dlr-db
 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
 -
 *DLR Table*

 mysql desc dlr;
 +-+--+--+-+-+---+
 | Field   | Type | Null | Key | Default | Extra |

RE: sqlbox, dlr-url

2013-09-20 Thread Rene Kluwen
Please always copy the users list.
Post your log files and config. And maybe there is a user here that can help
you.

-Original Message-
From: iqbal [mailto:iq...@dv9.com] 
Sent: vrijdag 20 september 2013 11:24
To: rene.klu...@chimit.nl
Subject: sqlbox, dlr-url

Hi Rene,

your advice about
add smsbox_id = dlr-ulr
insert boxc_id with dlr-url when insert a new record at sqlbox and it is
success !! the dlr-url is invoked well

but i got another issue

the get-url isnt invoked in the sms-service group if smsbox_id = dlr-url
is exist

do you have any advice, ive searched this for 2 days, and still got nothing
please help me


Regards,
Iqbal





unsubscribe

2013-09-20 Thread Paul
unsubscribe



unsubscribe

2013-09-20 Thread Teodor Arteni
unsubscribe



Re: kannel service not restart

2013-09-20 Thread Alvaro Cornejo
Hi

Use a different table for long term storage; else might conflict with
kannels registries.

in your update statement add

AND destination = $destination

Regards

Alvaro

On 9/20/13, arun sharma plak...@gmail.com wrote:
 I'm trying dlr-url with url : dlr-url =
 http://x.x.x.x/rsms.php?sender=%ptext=%a and for store dlr entry im
 using rsms.php. is it good way to store
 dlr entry in mysql or i changes required. here is my  rsms.php file that
 are stored in /var/www/html.

 ?php
 $con = mysql_connect(localhost,root,redhat);
 if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 else{
 mysql_select_db(kannel);
 }
 $smsc = $_GET['smsc'];
  $ts = $_GET['ts'];
  $destination = $_GET['destination'];
  $source = $_GET['source'];
  $service = $_GET['service'];
  $url = $_GET['url'];
  $mask = $_GET['mask'];
  $status = $_GET['status'];
  $boxc = $_GET['boxc'];
  $message_id = $_GET['message_id'];
  $isisms = $_GET['isisms'];

  $sql=insert into dlr
 (smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
 values
 ('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
 # echo mysql_query($sql);

  $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
  echo $result = mysql_query($query) or die(Query failed :  .
 mysql_error());

  ?



 On Fri, Sep 20, 2013 at 5:12 PM, Alejandro Guerrieri 
 alejandro.guerri...@gmail.com wrote:

 The dlr table only holds dlrs while in transit, they won't get stored
 long
 term. You need to create something using your dlr-url to records that.

 --
 Alex Guerrieri

 On Sep 20, 2013, at 7:26, alex Preda alexpred...@gmail.com wrote:

 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your
 response.

 i had configured mysql database and create table with name of dlr, my
 kannel service works fine and sms are send successfully. but didn't get
 dlr
 reports and also access.log didn't generate receive dlr fields. i made
 some
 changes in kannel.conf, here is my kannel.conf file,dlr table, and
 access.log. i'm bit confused with rsms.php. your help appreciated.

 *Kannel.conf*

 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql

 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms

 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log

 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip = 
 user-allow-ip = 
 default-sender = update
 dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
 #dlr-mask = 31

 #smsroute
 group = smsbox-route
 smsbox-id = mysmsc
 smsc-id = sms1
 shortcode = ;

 #sms-service
 group = sms-service
 keyword = default
 get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
 accept-x-kannel-headers = true
 max-messages = 3
 concatenation = true
 catch-all = true

 # Example MYSQL Connection
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = redhat
 database = kannel
 port = 3306

 #dlr-db
 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

 -
 *DLR Table*

 mysql desc dlr;
 +-+--+--+-+-+---+
 | Field   | Type | Null | Key | Default | Extra |
 +-+--+--+-+-+---+
 | smsc| varchar(40)  | YES  | | NULL|   |
 | ts  | varchar(40)  | YES  | | NULL|   |
 | destination | varchar(40)  | YES  | | NULL|   |
 | source  | varchar(40)  | YES  | | NULL|   |
 | service | varchar(40)  | YES  | | NULL|   |
 | url | varchar(255) | YES  | | NULL|   |
 | mask| int(10)  | YES  | | NULL|   |
 | status  | int(10)  | YES  | | NULL|   |
 | boxc| varchar(40)  | YES  | | NULL|   |
 +-+--+--+-+-+---+
 9 rows in set (0.00 sec)


 --
 *Access.log*

 [root@test kannel]# tail -f access.log
 2013-09-20 14:48:05 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] 

Re: kannel service not restart

2013-09-20 Thread Willy Mularto
Uncomment dlr-mask
On 20 Sep 2013 18:28, alex Preda alexpred...@gmail.com wrote:

 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your response.

 i had configured mysql database and create table with name of dlr, my
 kannel service works fine and sms are send successfully. but didn't get dlr
 reports and also access.log didn't generate receive dlr fields. i made some
 changes in kannel.conf, here is my kannel.conf file,dlr table, and
 access.log. i'm bit confused with rsms.php. your help appreciated.

 *Kannel.conf*

 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql

 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms

 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log

 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip = 
 user-allow-ip = 
 default-sender = update
 dlr-url = http://174.142.163.63/rsms.php?sender=%p; text=%a
 #dlr-mask = 31

 #smsroute
 group = smsbox-route
 smsbox-id = mysmsc
 smsc-id = sms1
 shortcode = ;

 #sms-service
 group = sms-service
 keyword = default
 get-url = http://x.x.x.x/rsms.php?sender=%p; text=%a
 accept-x-kannel-headers = true
 max-messages = 3
 concatenation = true
 catch-all = true

 # Example MYSQL Connection
 group = mysql-connection
 id = mydlr
 host = localhost
 username = root
 password = redhat
 database = kannel
 port = 3306

 #dlr-db
 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

 -
 *DLR Table*

 mysql desc dlr;
 +-+--+--+-+-+---+
 | Field   | Type | Null | Key | Default | Extra |
 +-+--+--+-+-+---+
 | smsc| varchar(40)  | YES  | | NULL|   |
 | ts  | varchar(40)  | YES  | | NULL|   |
 | destination | varchar(40)  | YES  | | NULL|   |
 | source  | varchar(40)  | YES  | | NULL|   |
 | service | varchar(40)  | YES  | | NULL|   |
 | url | varchar(255) | YES  | | NULL|   |
 | mask| int(10)  | YES  | | NULL|   |
 | status  | int(10)  | YES  | | NULL|   |
 | boxc| varchar(40)  | YES  | | NULL|   |
 +-+--+--+-+-+---+
 9 rows in set (0.00 sec)


 --
 *Access.log*

 [root@test kannel]# tail -f access.log
 2013-09-20 14:48:05 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
 [udh:0:]
 2013-09-20 14:50:46 Log ends
 2013-09-20 14:50:55 Log begins
 2013-09-20 14:51:00 Log begins
 2013-09-20 14:51:13 send-SMS request added - sender:test:update
 115.248.40.89 target:978221 request: 'we'
 2013-09-20 14:51:13 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
 [udh:0:]
 2013-09-20 14:51:17 send-SMS request added - sender:test:update
 115.248.40.89 target:978221 request: 'we'
 2013-09-20 14:51:17 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
 [udh:0:]
 2013-09-20 14:53:01 send-SMS request added - sender:test:update
 115.248.40.89 target:978221 request: 'we'
 2013-09-20 14:53:02 Sent SMS [SMSC:sms1] [SVC:test] [ACT:] [BINF:] [FID:]
 [META:] [from:update] [to:978221] [flags:-1:0:-1:-1:-1] [msg:2:we]
 [udh:0:]




 On Thu, Sep 19, 2013 at 8:20 PM, Alejandro Guerrieri 
 alejandro.guerri...@gmail.com wrote:

 MYSQL: Unknown database 'dlr'

 Did you create the database?


 On Thu, Sep 19, 2013 at 10:26 AM, alex Preda alexpred...@gmail.comwrote:

 Hello Alvaro,
   Thanks for your reply ! :)
 As per your instructions i tried to start bearerbox but it is showing
 some following error.

 [root@test1 kannel]# !b
 bearerbox -v 0 /etc/kannel.conf
 2013-09-19 18:05:40 [30340] [0] INFO: Debug_lvl = 0, log_file = none,
 log_lvl = 0
 2013-09-19 18:05:40 [30340] [0] ERROR: MYSQL: can not connect to
 database!
 

Re: KANNEL POST XML:

2013-09-20 Thread johnalero9
Hii,

Kindly check and let us know if I am not call proper POST XML in kannel.


I am waiting for ur response.



Sent from BlackBerry® on Airtel

-Original Message-
From: John alero johnale...@gmail.com
Date: Fri, 20 Sep 2013 00:08:35 
To: Alvaro Cornejocornejo.alv...@gmail.com
Cc: users@kannel.orgusers@kannel.org; users-requ...@kannel.org
Subject: Re: KANNEL POST XML:

Dear Alvaro,

We have changed the mention parameters in XML code but again the same issue.

Bearerbox.log
2013-09-19 23:53:55 [19315] [26] DEBUG: boxc_receiver: sms received
2013-09-19 23:53:55 [19315] [26] WARNING: Cannot find SMSCConn for message
to 91X, rejected.
2013-09-19 23:53:55 [19315] [26] DEBUG: SMSC[UNKNOWN]: creating DLR message
2013-09-19 23:53:55 [19315] [26] DEBUG: SMSC[UNKNOWN]: DLR =
http://127.0.0.1/delivery-report.php?send_history_id=13853217to_number=91XXtype=%d
2013-09-19 23:53:55 [19315] [26] WARNING: Message rejected by bearerbox, no
router!
2013-09-19 23:53:55 [19315] [26] DEBUG: send_msg: sending msg to boxc:
asmsbox
2013-09-19 23:53:55 [19315] [27] DEBUG: send_msg: sending msg to boxc:
asmsbox
2013-09-19 23:53:55 [19315] [27] DEBUG: boxc_sender: sent message to
127.0.0.1


XML CODE:
?xml version=1.0 encoding=UTF-8?
message
submit
danumber91X/number/da
oanumberTESTSM/number/oa
udTest/ud
statusrequest
dlr-mask31/dlr-mask
 dlr-url
http://127.0.0.1/delivery-report.php?send_history_id=13853217amp;to_number=91XXamp;type=%d
/dlr-url
/statusrequest
from
usernamekannel/username
   passwordkannel1/password
  accountsmpp/account
smsc-idsmpp/smsc-id
   binfoMT/binfo
/from
to91XX/to
  /submit
/message




On Thu, Sep 19, 2013 at 7:41 PM, Alvaro Cornejo cornejo.alv...@gmail.comwrote:

 Hi

 change this:

 tosmpp/to
  with

 to91977/to // this is the destination number

 and add

 smsc-idsmpp/smsc-id // this is the route it should take. You might
 omit this

 Hope helps

 Alvaro


 On 9/19/13, John alero johnale...@gmail.com wrote:
  Dear Team,
 
  We are facing strange issue when we request POST XML request.
 
  Kindly find the logs in given below. We are getting error WARNING:
 Message
  rejected by bearerbox, no router! in Bearerbox.log. Please let me know
 if
  i missing any parameters.
 
 
  Bearerbox Log:
 
  2013-09-19 14:04:42 [13421] [26] DEBUG: boxc_receiver: sms received
  2013-09-19 14:04:42 [13421] [26] WARNING: Cannot find SMSCConn for
 message
  to 91X, rejected.
  2013-09-19 14:04:42 [13421] [26] DEBUG: SMSC[UNKNOWN]: creating DLR
 message
  2013-09-19 14:04:42 [13421] [26] DEBUG: SMSC[UNKNOWN]: DLR =
 
 http://localhost/delivery-report.php?send_history_id=13853217to_number=91type=%d
  2013-09-19 14:04:42 [13421] [26] WARNING: Message rejected by bearerbox,
 no
  router!
  2013-09-19 14:04:42 [13421] [26] DEBUG: send_msg: sending msg to boxc:
  asmsbox
  2013-09-19 14:04:42 [13421] [27] DEBUG: send_msg: sending msg to boxc:
  asmsbox
  2013-09-19 14:04:42 [13421] [27] DEBUG: boxc_sender: sent message to
  127.0.0.1
  2013-09-19 14:04:42 [13421] [26] DEBUG: boxc_receiver: got ack
 
 
  SMSBOX logs:
  2013-09-19 14:04:42 [13450] [3] INFO: smsbox: Got HTTP request
  /cgi-bin/sendsms from 192.168.1.1
  2013-09-19 14:04:42 [13450] [3] DEBUG: XMLParsing: XML: ?xml
  version=1.0 encoding=UTF-8?
  message
  submit
  danumber91X/number/da
  oanumberTESTSM/number/oa
  udTest/ud
  statusrequest
  dlr-mask31/dlr-mask
   dlr-url
 
 http://localhost/delivery-report.php?send_history_id=13853217amp;to_number=91Xamp;type=%d
  /dlr-url
  /statusrequest
  from
  usernamekannel/username
 passwordkannel1/password
accounttrans/account
binfoMT/binfo
  /from
  tosmpp/to
/submit
  /message
  2013-09-19 14:04:42 [13450] [3] INFO: sendsms used by kannel
  2013-09-19 14:04:42 [13450] [3] INFO: sendsms sender:kannel:TESTSM
  (192.168.1.1) to:multi-cast msg:Test
  2013-09-19 14:04:42 [13450] [3] DEBUG: Stored UUID
  fc45a00e-ede5-402a-9d80-4a449ee541cf
  2013-09-19 14:04:42 [13450] [3] DEBUG: message length 4, sending 1
 messages
  2013-09-19 14:04:42 [13450] [3] DEBUG: Status: 202 Answer: Sent.
  2013-09-19 14:04:42 [13450] [3] DEBUG: Delayed reply - wait for bearerbox
  2013-09-19 14:04:42 [13450] [0] DEBUG: Got ACK (1) of
  fc45a00e-ede5-402a-9d80-4a449ee541cf
  2013-09-19 14:04:42 [13450] [0] DEBUG: HTTP: Resetting HTTPClient for
  `192.168.1.1'.
  2013-09-19 14:04:42 [13450] [4] INFO: Starting delivery report
  vivakannel2 from TESTSM
  2013-09-19 14:04:42 [13450] [9] DEBUG: Queue contains 0 pending requests.
  2013-09-19 14:04:42 [13450] [9] DEBUG: Parsing URL `
 
 http://localhost/delivery-report.php?send_history_id=13853217to_number=91XXtype=16
  ':
  2013-09-19 14:04:42 [13450] [9] DEBUG:   Scheme: http://
  2013-09-19 14:04:42 [13450] [9] DEBUG:   Host: localhost
  2013-09-19 14:04:42 [13450] [9] DEBUG:   Port: 80
  2013-09-19 14:04:42 [13450] [9] DEBUG:   Username: (null)
  2013-09-19 14:04:42 

Re: kannel service not restart

2013-09-20 Thread spameden
first of all do not use INSERT into statement with $_GET variables,
it's an SQL injection.

here is an example of proper escaping:
?php
$mysqli = new mysqli(localhost, my_user, my_password, world);

/* check connection */
if (mysqli_connect_errno()) {
printf(Connect failed: %s\n, mysqli_connect_error());
exit();
}

$mysqli-query(CREATE TEMPORARY TABLE myCity LIKE City);

$city = 's Hertogenbosch;

/* this query will fail, cause we didn't escape $city */
if (!$mysqli-query(INSERT into myCity (Name) VALUES ('$city'))) {
printf(Error: %s\n, $mysqli-sqlstate);
}

$city = $mysqli-real_escape_string($city);

/* this query with escaped $city will work */
if ($mysqli-query(INSERT into myCity (Name) VALUES ('$city'))) {
printf(%d Row inserted.\n, $mysqli-affected_rows);
}

$mysqli-close();
?

adapt this to your example.

Secondly you might want to use sqlbox and put in between smsbox and
bearerbox so you'll have 2 tables: send_sms and sent_sms one for queue
and 2nd for archived messages.

2013/9/20 alex Preda alexpred...@gmail.com:
 I'm trying dlr-url with url : dlr-url = http://x.x.x.x/rsms.php?sender=%p;
 text=%a and for store dlr entry im using rsms.php. is it good way to store
 dlr entry in mysql or i changes required. here is my  rsms.php file that are
 stored in /var/www/html.

 ?php
 $con = mysql_connect(localhost,root,redhat);
 if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 else{
 mysql_select_db(kannel);
 }
 $smsc = $_GET['smsc'];
  $ts = $_GET['ts'];
  $destination = $_GET['destination'];
  $source = $_GET['source'];
  $service = $_GET['service'];
  $url = $_GET['url'];
  $mask = $_GET['mask'];
  $status = $_GET['status'];
  $boxc = $_GET['boxc'];
  $message_id = $_GET['message_id'];
  $isisms = $_GET['isisms'];

  $sql=insert into dlr
 (smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
 values

 ('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
 # echo mysql_query($sql);

  $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
  echo $result = mysql_query($query) or die(Query failed :  .
 mysql_error());

  ?


 On Fri, Sep 20, 2013 at 5:22 PM, arun sharma plak...@gmail.com wrote:

 I'm trying dlr-url with url : dlr-url =
 http://x.x.x.x/rsms.php?sender=%p; text=%a and for store dlr entry im using
 rsms.php. is it good way to store dlr entry in mysql or i changes required.
 here is my  rsms.php file that are stored in /var/www/html.

 ?php
 $con = mysql_connect(localhost,root,redhat);
 if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 else{
 mysql_select_db(kannel);
 }
 $smsc = $_GET['smsc'];
  $ts = $_GET['ts'];
  $destination = $_GET['destination'];
  $source = $_GET['source'];
  $service = $_GET['service'];
  $url = $_GET['url'];
  $mask = $_GET['mask'];
  $status = $_GET['status'];
  $boxc = $_GET['boxc'];
  $message_id = $_GET['message_id'];
  $isisms = $_GET['isisms'];

  $sql=insert into dlr

 (smsc,boxc_id,ts,source,destination,service,url,mask,status,timestamp,changed)
 values

 ('$smsc','$boxc_id','$ts','$source','$destination','$service','$url','$mask','$status','$timestamp','$changed');
 # echo mysql_query($sql);

  $query =UPDATE dlr SET status='$status' WHERE message_id='$message_id';
  echo $result = mysql_query($query) or die(Query failed :  .
 mysql_error());

  ?



 On Fri, Sep 20, 2013 at 5:12 PM, Alejandro Guerrieri
 alejandro.guerri...@gmail.com wrote:

 The dlr table only holds dlrs while in transit, they won't get stored
 long term. You need to create something using your dlr-url to records that.

 --
 Alex Guerrieri

 On Sep 20, 2013, at 7:26, alex Preda alexpred...@gmail.com wrote:

 Hello Kannel Team,
 Thanks Alejandro and Alvaro for your
 response.

 i had configured mysql database and create table with name of dlr, my
 kannel service works fine and sms are send successfully. but didn't get dlr
 reports and also access.log didn't generate receive dlr fields. i made some
 changes in kannel.conf, here is my kannel.conf file,dlr table, and
 access.log. i'm bit confused with rsms.php. your help appreciated.

 Kannel.conf

 #CORE
 group = core
 admin-port = 13000
 smsbox-port = 13001
 admin-password = test
 log-file = /var/log/kannel/kannel.log
 log-level = 1
 box-deny-ip = *.*.*.*
 box-allow-ip = 127.0.0.1;x.x.x.x
 admin-deny-ip = 
 admin-allow-ip = 
 unified-prefix = 00358,0
 access-log = /var/log/kannel/access.log
 dlr-storage = mysql

 #SMSC
 group = smsc
 smsc = smpp
 smsc-id = sms1
 host = x.x.x.x
 smsc-username = test
 smsc-password = test
 port = 1234
 system-type = sms

 #smsbox
 group = smsbox
 bearerbox-host = localhost
 sendsms-port = 13013
 global-sender = 13013
 sendsms-chars = 0123456789 +-
 log-file = /var/log/kannel/smsbox.log
 log-level = 0
 access-log = /var/log/kannel/access.log

 # sendsms-user
 group = sendsms-user
 username = test
 password = test
 user-deny-ip =