RE: smppbox documentation
I added a documentation tree and building options to the smppbox repository. For your convenience, a .pdf version of current userguide can be found on: http://www.chimit.nl/kannel/userguide.pdf == Rene Kluwen
RE: kannel as smpp server
Hi this is what i get when sending msg smppbox 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP[VMA]: Got PDU: 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP PDU 0xb6903580 dump: 2010-07-10 16:36:55 [19026] [6] DEBUG: type_name: submit_sm 2010-07-10 16:36:55 [19026] [6] DEBUG: command_id: 4 = 0x0004 2010-07-10 16:36:55 [19026] [6] DEBUG: command_status: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sequence_number: 28 = 0x001c 2010-07-10 16:36:55 [19026] [6] DEBUG: service_type: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr_ton: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr_npi: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr: ** 2010-07-10 16:36:55 [19026] [6] DEBUG: dest_addr_ton: 2 = 0x0002 2010-07-10 16:36:55 [19026] [6] DEBUG: dest_addr_npi: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: destination_addr: 1234 2010-07-10 16:36:55 [19026] [6] DEBUG: esm_class: 3 = 0x0003 2010-07-10 16:36:55 [19026] [6] DEBUG: protocol_id: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: priority_flag: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: schedule_delivery_time: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: validity_period: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: registered_delivery: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: replace_if_present_flag: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: data_coding: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sm_default_msg_id: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sm_length: 2 = 0x0002 2010-07-10 16:36:55 [19026] [6] DEBUG: short_message: AK 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP PDU dump ends. bearerbox 2010-07-10 16:34:44 Sent SMS [SMSC:abcd] [SVC:] [ACT:] [BINF:] [FID:] [META:] [from:+2226362465] [to:1234] [flags:-1:0:-1:0:0] [msg:2:AK] [udh:0:] But no messages transmited to the client Regards --- On Fri, 7/9/10, Rene Kluwen rene.klu...@chimit.nl wrote: From: Rene Kluwen rene.klu...@chimit.nl Subject: RE: kannel as smpp server To: 'ishagh ouldbah' ishagh...@yahoo.com, users@kannel.org Date: Friday, July 9, 2010, 1:47 PM Smsbox-route should be part of bearerbox config, and not of smsbox.conf. But since you include this file that should not be the real problem. Maybe you can post more of bearerbox log as well as smppbox log? So we can nail this problem down. If what you posted below is something of your smppbox.log then bearerbox routing seems to be okay. == Rene From: ishagh ouldbah [mailto:ishagh...@yahoo.com] Sent: vrijdag 9 juli 2010 21:27 To: Rene Kluwen; users@kannel.org Subject: Re: kannel as smpp server It is VMA in my smpplogins.txt However My client is connected to me and I have no problem with that My client can send sms to me my only problem is that I can not send sms to my client Regards From: Rene Kluwen rene.klu...@chimit.nl To: ishagh ouldbah ishagh...@yahoo.com; users@kannel.org Sent: Fri, July 9, 2010 7:02:55 PM Subject: RE: kannel as smpp server Take a look at the following: group = smsbox-route smsbox-id = VMA smsc-id = l7 The smsbox-id shouldn’t necessarily be “VMA” but rather the system-type that is declared in your /root/smpplogins.txt. == Rene From: ishagh ouldbah [mailto:ishagh...@yahoo.com] Sent: vrijdag 9 juli 2010 18:37 To: users@kannel.org; Rene Kluwen Subject: RE: kannel as smpp server Hi these are my configurations group = core dlr-storage = mysql admin-port = 13000 smsbox-port = 13001 admin-password = ** status-password = ** log-file = /var/log/kannel/bearerbox-smpp.log access-log = /var/log/kannel/bearerbox-smpp.access box-allow-ip = *.*.*.* include = /etc/kannel/smsc.conf include = /etc/kannel/smsbox.conf #include = /etc/kannel/smppbox.conf group = sendsms-user username=user password=password SMSC## Motorola group = smsc smsc = at smsc-id = l7 modemtype = Motorola device = /dev/ttyUSB0 speed = 9600 sms-center = +2226398000 sim-buffering = true group = modems id = Motorola name = Motorola #init-string = AT+CGDCONT=1 init-string = ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0 #need-sleep = true #enable-mms = true speed = 9600 ##smsbox# group = smsbox bearerbox-host = localhost sendsms-port = 13013 log-file = /var/log/kannel/smsbox.log log-level = 1 access-log = /var/log/kannel/smsbox.access mo-recode = true group = smsbox-route smsbox-id = VMA smsc-id = l7 smppbox## # sample smppbox.conf group = core dlr-storage = mysql # this group defines your smppbox group = smppbox # our boxc type
RE: kannel as smpp server
Here you are sending a message from smppbox to bearerbox. You are sending to number 1234, and it does. In case you want this message to be re-routed to another smppbox, then you are out of luck. It doesn’t work. == Rene From: ishagh ouldbah [mailto:ishagh...@yahoo.com] Sent: zaterdag 10 juli 2010 18:43 To: users@kannel.org; Rene Kluwen Subject: RE: kannel as smpp server Hi this is what i get when sending msg smppbox 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP[VMA]: Got PDU: 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP PDU 0xb6903580 dump: 2010-07-10 16:36:55 [19026] [6] DEBUG: type_name: submit_sm 2010-07-10 16:36:55 [19026] [6] DEBUG: command_id: 4 = 0x0004 2010-07-10 16:36:55 [19026] [6] DEBUG: command_status: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sequence_number: 28 = 0x001c 2010-07-10 16:36:55 [19026] [6] DEBUG: service_type: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr_ton: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr_npi: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: source_addr: ** 2010-07-10 16:36:55 [19026] [6] DEBUG: dest_addr_ton: 2 = 0x0002 2010-07-10 16:36:55 [19026] [6] DEBUG: dest_addr_npi: 1 = 0x0001 2010-07-10 16:36:55 [19026] [6] DEBUG: destination_addr: 1234 2010-07-10 16:36:55 [19026] [6] DEBUG: esm_class: 3 = 0x0003 2010-07-10 16:36:55 [19026] [6] DEBUG: protocol_id: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: priority_flag: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: schedule_delivery_time: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: validity_period: NULL 2010-07-10 16:36:55 [19026] [6] DEBUG: registered_delivery: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: replace_if_present_flag: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: data_coding: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sm_default_msg_id: 0 = 0x 2010-07-10 16:36:55 [19026] [6] DEBUG: sm_length: 2 = 0x0002 2010-07-10 16:36:55 [19026] [6] DEBUG: short_message: AK 2010-07-10 16:36:55 [19026] [6] DEBUG: SMPP PDU dump ends. bearerbox 2010-07-10 16:34:44 Sent SMS [SMSC:abcd] [SVC:] [ACT:] [BINF:] [FID:] [META:] [from:+2226362465] [to:1234] [flags:-1:0:-1:0:0] [msg:2:AK] [udh:0:] But no messages transmited to the client Regards --- On Fri, 7/9/10, Rene Kluwen rene.klu...@chimit.nl wrote: From: Rene Kluwen rene.klu...@chimit.nl Subject: RE: kannel as smpp server To: 'ishagh ouldbah' ishagh...@yahoo.com, users@kannel.org Date: Friday, July 9, 2010, 1:47 PM Smsbox-route should be part of bearerbox config, and not of smsbox.conf. But since you include this file that should not be the real problem. Maybe you can post more of bearerbox log as well as smppbox log? So we can nail this problem down. If what you posted below is something of your smppbox.log then bearerbox routing seems to be okay. == Rene From: ishagh ouldbah [mailto:ishagh...@yahoo.com] Sent: vrijdag 9 juli 2010 21:27 To: Rene Kluwen; users@kannel.org Subject: Re: kannel as smpp server It is VMA in my smpplogins.txt However My client is connected to me and I have no problem with that My client can send sms to me my only problem is that I can not send sms to my client Regards _ From: Rene Kluwen rene.klu...@chimit.nl To: ishagh ouldbah ishagh...@yahoo.com; users@kannel.org Sent: Fri, July 9, 2010 7:02:55 PM Subject: RE: kannel as smpp server Take a look at the following: group = smsbox-route smsbox-id = VMA smsc-id = l7 The smsbox-id shouldn’t necessarily be “VMA” but rather the system-type that is declared in your /root/smpplogins.txt. == Rene From: ishagh ouldbah [mailto:ishagh...@yahoo.com] Sent: vrijdag 9 juli 2010 18:37 To: users@kannel.org; Rene Kluwen Subject: RE: kannel as smpp server Hi these are my configurations group = core dlr-storage = mysql admin-port = 13000 smsbox-port = 13001 admin-password = ** status-password = ** log-file = /var/log/kannel/bearerbox-smpp.log access-log = /var/log/kannel/bearerbox-smpp.access box-allow-ip = *.*.*.* include = /etc/kannel/smsc.conf include = /etc/kannel/smsbox.conf #include = /etc/kannel/smppbox.conf group = sendsms-user username=user password=password SMSC## Motorola group = smsc smsc = at smsc-id = l7 modemtype = Motorola device = /dev/ttyUSB0 speed = 9600 sms-center = +2226398000 sim-buffering = true group = modems id = Motorola name = Motorola #init-string = AT+CGDCONT=1 init-string = ATQ0 V1 E1 S0=0 C1 D2 +FCLASS=0 #need-sleep = true #enable-mms = true speed = 9600 ##smsbox# group = smsbox bearerbox-host = localhost sendsms-port = 13013 log-file = /var/log/kannel/smsbox.log log-level = 1 access-log = /var/log/kannel/smsbox.access mo-recode = true group = smsbox-route smsbox-id = VMA smsc-id = l7 smppbox##
a little contrib: init script for Ubuntu Server
- It runs in Ubuntu 10.04 Server i386 - Its based in one init script that I found in this list, poster said that runs in RedHat9, I modified for Ubuntu #!/bin/bash # # kannel init scrip for Kannel Gateway # it handles bearerbox, smppgatewat and sqlbox for now. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin VERSION=`/usr/local/bin/gw-config --version` KANNELPATH=/usr/local/sbin KANNEL_CONF=/etc/kannel.conf SMPPBOX_CONF=/etc/smppbox.conf SQLBOX_CONF=/etc/sqlbox.conf KANNEL_PID_DIR=/var/run/kannel KANNEL_OPTIONS=--daemonize --parachute --user kannel --pid-file /var/run/kannel ISRUNBEARERBOX=`ps -A | grep bearerbox | wc -l` ISRUNSMPPBOX=`ps -A | grep smppbox | wc -l` ISRUNSQLBOX=`ps -A | grep sqlbox | wc -l` # Check that we are root ... so non-root users stop here [ `id -u` = 0 ] || exit 1 # Various other checks #[ ${NETWORKING} = yes ] || exit 0 [ -x $KANNELPATH/bearerbox ] || exit 0 [ -x $KANNELPATH/smppbox ] || exit 0 [ -x $KANNELPATH/smsbox ] || exit 0 [ -f $KANNEL_CONF ] || exit 0 [ -f $SMPPBOX_CONF ] || exit 0 [ -f $SQLBOX_CONF ] || exit 0 RETVAL=0; RETVAL1=0; RETVAL2=0; RETVAL3=0 prog=Kannel start() { # Check that at least one group is defined for sms # and/or wap to start the bearer. Then start boxes # as needed. # Also make sure that there are not another instances # of programs running before start it up. if [ -d /var/run/kannel ]; then false else mkdir /var/run/kannel fi chown -R kannel:kannel /var/run/kannel chown -R kannel:kannel /var/log/kannel startgateway=`egrep -se '^[ \t]*group *= *core' $KANNEL_CONF` startsms=`egrep -se '^[ \t]*group *= *smsbox' $KANNEL_CONF` startsmpp=`egrep -se '^[ \t]*group *= *smppbox' $SMPPBOX_CONF` startsql=`egrep -se '^[ \t]*group *= *sqlbox' $SQLBOX_CONF` if [ -n $startgateway$startsms ] [ $ISRUNBEARERBOX -eq 0 ]; then echo -n Starting Mobile Gateway bearerbox Service ($VERSION): $KANNELPATH/bearerbox $KANNEL_OPTIONS/bearerbox.pid $KANNEL_CONF RETVAL1=$? echo -n[Done] ...with pid: cat /var/run/kannel/bearerbox.pid sleep 3 else exit 0 fi if [ -n $startsmpp ] [ $ISRUNSMPPBOX -eq 0 ]; then echo -n Starting Mobile Gateway sppbox Service ($VERSION): $KANNELPATH/smppbox $KANNEL_OPTIONS/smppbox.pid $SMPPBOX_CONF RETVAL2=$? echo -n [Done] ...with pid: cat /var/run/kannel/smppbox.pid sleep 3 fi if [ -n $startsql ] [ $ISRUNSQLBOX -eq 0 ]; then echo -n Starting Mobile Gateway sqlbox Service ($VERSION): $KANNELPATH/sqlbox $KANNEL_OPTIONS/sqlbox.pid $SQLBOX_CONF RETVAL3=$? echo -n [Done] ...with pid: cat /var/run/kannel/sqlbox.pid sleep 3 fi let RETVAL=$REVAL1+$RETVAL2+$RETVAL3 if [ $RETVAL -eq 0 ]; then sleep 2 touch /var/lock/kannel chmod +x /var/lock/kannel cat /var/run/kannel/*.pid /var/run/kannel.pid fi return $RETVAL } stop() { echo -n Shutting down Mobile Gateway bearerbox $VERSION: killall bearerbox RETVAL1=$? echo echo -n Shutting down Mobile Gateway smppbox $VERSION: killall smppbox RETVAL2=$? echo echo -n Shutting down Mobile Gateway sqlbox $VERSION: killall sqlbox RETVAL3=$? echo let RETVAL=$REVAL1+$RETVAL2+$RETVAL3 if [ $RETVAL -eq 0 ]; then sleep 2 rm -f /var/lock/kannel rm -f /var/run/kannel/*.pid rm /var/run/kannel.pid fi return $RETVAL } # See how we were called. case $1 in start) # Start daemons. start ;; stop) # Stop daemons stop ;; restart) # Restart daemons stop sleep 1 start ;; status) if [ $ISRUNBEARERBOX -eq 0 ]; then echo Mobile Gateway bearerbox Service is not running... else echo Mobile Gateway bearerbox Service (pid `cat /var/run/kannel/bearerbox.pid`) is running... fi if [ $ISRUNSMPPBOX -eq 0 ]; then echo Mobile Gateway smppboxx Service is not running... else echo Mobile Gateway smppbox Servcice (pid `cat /var/run/kannel/smppbox.pid`) is running... fi if [ $ISRUNSQLBOX -eq 0 ]; then echo Mobile Gateway sqlboxService is not running... else echo Mobile Gateway sqlbox Service(pid `cat /var/run/kannel/sqlbox.pid`) is running... fi exit $? ;; *) echo Usage: named {start|stop|status|restart} RETVAL=1 esac exit $RETVAL Thanks, Aldo Zavala