Need to use playsms and kannel without gsm modem using http protocol

Hi ,

Please some one help need to do some simulation and test between playsms and kannel gateway without using gsm modem.I have found the configurations for gsm modem.

Between playSMS and Kannel, just configure Kannel gateway on playSMS and create a Kannel SMSC, the communication is direct.

Now, if you need use a kannel http smsc, look for http or generic smsc on kannel userguide. Or so, playSMS provides also a generic plugin for this.

Hi Edilson,

I have followed few steps and i am trying to send SMS using kannel bearbox with help of below URL .when i am trying to send SMS it was showing that .

http:localhost:13131/cgi-bin/sendsms?username=kannel&password=kannel&to=mobileno&text=test

Not routable ,Do not try again.

Kindly let me know if i missed any installation steps when i am sending through kannel gateway

Your kannel config is missing something. What kind of smsc are you using? Please, paste it here.

Please find below kannel.conf file.

CORE

group = core
admin-port = 13000
admin-password = playsms
status-password = playsms
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
smsbox-port = 13001
store-type = spool
store-location = /var/spool/kannel/store
smsbox-max-pending = 100

SMSBOX

group = smsbox
bearerbox-host = localhost
bearerbox-port = 13001
sendsms-port = 13131
global-sender = 13131
sendsms-chars = "0123456789+ "
log-file = /var/log/kannel/smsbox.log
log-level = 0
access-log = /var/log/kannel/access.log
mo-recode = true

SMSC smpp1

#smsc = smpp
#smsc-id = smpp1
#allowed-smsc-id = smpp1
#preferred-smsc-id = smpp1
#host = SMPP_SERVER_ADDRESS_CHANGE_THIS
#port = SMPP_SERVER_PORT_NUMBER_CHANGE_THIS
#transceiver-mode = yes
#smsc-username = SMPP_USERNAME_CHANGE_THIS
#smsc-password = SMPP_PASSWORD_CHANGE_THIS
#system-type = “VMA”
#log-file = /var/log/kannel/smsc-smpp1.log
#log-level = 0

SMSC gsm1

group = smsc
smsc = at
smsc-id = gsm1
allowed-smsc-id = gsm1
preferred-smsc-id = gsm1
my-number = 101
#allowed-prefix = "+62;62;0"
unified-prefix = "+62,62,0;+,00"
modemtype = wavecom
device = /dev/ttyUSB0
speed = 115200
#validityperiod = 143
sim-buffering = true
max-error-count = 5
log-file = /var/log/kannel/smsc-gsm1.log
log-level = 0

SMSC gsm2

#group = smsc
#smsc = at
#smsc-id = gsm2
#allowed-smsc-id = gsm2
#preferred-smsc-id = gsm2
#my-number = 102
##allowed-prefix = “+62;62;0”
#unified-prefix = “+62,62,0;+,00”
#modemtype = wavecom
#device = /dev/ttyUSB1
#speed = 115200
##validityperiod = 143
#sim-buffering = true
#max-error-count = 5
#log-file = /var/log/kannel/smsc-gsm2.log
#log-level = 0

group = modems
id = wavecom
message-storage = SM
need-sleep = true
sendline-sleep = 200
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1”
#reset-string = “AT+CFUN=1”

group = modems
id = huawei
message-storage = SM
need-sleep = true
sendline-sleep = 200
init-string = “AT+CNMI=2,2,0,1,0;+CMEE=1”
#reset-string = “AT+CFUN=1”

SENDSMS-USER

group = sendsms-user
default-smsc = none
username = playsms
password = playsms
max-messages = 1000
concatenation = true

SMS SERVICE

group = sms-service
keyword = default
omit-empty = true
max-messages = 99
assume-plain-text = true
catch-all = true
get-url = “http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q&smsc=%i

Are your gsm modems up? try to add &smsc=gsm1 at playsms smsc additional parameter

I am not using gsm modem,please suggest me if configuration is wrong.
I want to send SMS using SMSC and let me know the procedure to integrate SMSC along with kannel gateway.

Ok, I´ve read again… try to use fakesmsc

Edilson ,

I used fake SMSC and trying to send message but facing issue while send message.Please help me if some thing i have missed.

Below is the error I am facing .

Sender missing and no global set , rejected.

I am attaching below kannel log for reference.We need to configure any receiver number.

2017-08-08 18:40:59 [7112] [3] DEBUG: Status: 400 Answer: <Sender missing and no global set, rejected>
2017-08-08 18:40:59 [7112] [3] DEBUG: HTTP: Resetting HTTPClient for 127.0.0.1'. 2017-08-08 18:41:19 [7112] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1> 2017-08-08 18:41:19 [7112] [3] INFO: sendsms used by <playsms> 2017-08-08 18:41:19 [7112] [3] DEBUG: Status: 400 Answer: <Sender missing and no global set, rejected> 2017-08-08 18:41:19 [7112] [3] DEBUG: HTTP: Resetting HTTPClient for127.0.0.1’.
2017-08-08 18:42:19 [7112] [1] DEBUG: Timeout for fd:24 appeares.
2017-08-08 18:42:19 [7112] [1] DEBUG: HTTP: Destroying HTTPClient area 0xb5500680.
2017-08-08 18:42:19 [7112] [1] DEBUG: HTTP: Destroying HTTPClient for 127.0.0.1'. 2017-08-08 18:54:42 [7112] [2] DEBUG: HTTP: Creating HTTPClient for127.0.0.1’.
2017-08-08 18:54:42 [7112] [2] DEBUG: HTTP: Created HTTPClient area 0xb5500788.
2017-08-08 18:54:42 [7112] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1>
2017-08-08 18:54:42 [7112] [3] INFO: sendsms used by
2017-08-08 18:54:42 [7112] [3] ERROR: /cgi-bin/sendsms got insufficient headers ( is NULL)
2017-08-08 18:54:42 [7112] [3] DEBUG: Status: 400 Answer: <Missing receiver number, rejected>
2017-08-08 18:54:42 [7112] [3] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1’.
2017-08-08 18:55:02 [7112] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1>
2017-08-08 18:55:02 [7112] [3] INFO: sendsms used by

configure sender id on sms user
2017-08-08 18:41:19 [7112] [3] DEBUG: Status: 400 Answer: <Sender missing and no global set, rejected>

Thanks for your back to back assistance. After configuring the sender id and i have found that message are queued for later delivery.

But in SMS box log i am getting status response as 200 and in kannel logs it was showing routing failed requeed.

SMS BOX :

2017-08-09 15:50:13 [3383] [0] DEBUG: Got ACK (3) of fca92418-f866-4464-a4c7-5eeda6aba65e
2017-08-09 15:50:13 [3383] [0] DEBUG: HTTP: Resetting HTTPClient for 127.0.0.1'. 2017-08-09 15:50:15 [3383] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1> 2017-08-09 15:50:15 [3383] [3] INFO: sendsms used by <playsms> 2017-08-09 15:50:15 [3383] [3] INFO: sendsms sender:<playsms:XXXX> (127.0.0.1) to:< 9003413993> msg:<hi> 2017-08-09 15:50:15 [3383] [3] DEBUG: Stored UUID 6961a13c-41a7-4856-9b66-599617c35ac9 2017-08-09 15:50:15 [3383] [3] DEBUG: message length 2, sending 1 messages 2017-08-09 15:50:15 [3383] [3] DEBUG: Status: 202 Answer: <Sent.> 2017-08-09 15:50:15 [3383] [3] DEBUG: Delayed reply - wait for bearerbox 2017-08-09 15:50:15 [3383] [0] DEBUG: Got ACK (3) of 6961a13c-41a7-4856-9b66-599617c35ac9 2017-08-09 15:50:15 [3383] [0] DEBUG: HTTP: Resetting HTTPClient for127.0.0.1’.
2017-08-09 15:51:15 [3383] [1] DEBUG: Timeout for fd:24 appeares.
2017-08-09 15:51:15 [3383] [1] DEBUG: HTTP: Destroying HTTPClient area 0xb5300558.
2017-08-09 15:51:15 [3383] [1] DEBUG: HTTP: Destroying HTTPClient for 127.0.0.1'. 2017-08-09 15:55:12 [3383] [2] DEBUG: HTTP: Creating HTTPClient for127.0.0.1’.
2017-08-09 15:55:12 [3383] [2] DEBUG: HTTP: Created HTTPClient area 0xb5300680.
2017-08-09 15:55:12 [3383] [3] INFO: smsbox: Got HTTP request </cgi-bin/sendsms> from <127.0.0.1>
2017-08-09 15:55:12 [3383] [3] INFO: sendsms used by
2017-08-09 15:55:12 [3383] [3] INFO: sendsms sender:playsms:XXXX (127.0.0.1) to:< 9003413993> msg:
2017-08-09 15:55:12 [3383] [3] DEBUG: Stored UUID 4e70f162-b1f8-451d-9b37-42626b57a7fd
2017-08-09 15:55:12 [3383] [3] DEBUG: message length 2, sending 1 messages
2017-08-09 15:55:12 [3383] [3] DEBUG: Status: 202 Answer: <Sent.>
2017-08-09 15:55:12 [3383] [3] DEBUG: Delayed reply - wait for bearerbox
2017-08-09 15:55:12 [3383] [0] DEBUG: Got ACK (3) of 4e70f162-b1f8-451d-9b37-42626b57a7fd
2017-08-09 15:55:12 [3383] [0] DEBUG: HTTP: Resetting HTTPClient for `127.0.0.1’.

Kannel log

2017-08-09 15:56:02 [3369] [1] DEBUG: Timeout for fd:31 appeares.
2017-08-09 15:56:02 [3369] [1] DEBUG: HTTP: Destroying HTTPClient area 0xb4b00680.
2017-08-09 15:56:02 [3369] [1] DEBUG: HTTP: Destroying HTTPClient for `127.0.0.1’.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: gwlist_len = 9
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe1170 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe88c8 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe8e80 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0xb3900e50 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0xb3901010 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe95f8 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fdf840 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0xb39013e0 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe0fb0 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: handling message (0x9fe1170 vs 0x9fe1170)
2017-08-09 15:56:08 [3369] [7] DEBUG: Routing failed, re-queued.
2017-08-09 15:56:08 [3369] [7] DEBUG: sms_router: time to sleep 30.00 secs.

default-smsc point to your fake smsc

i am using gsm modem with kannel and when i try to receive sms it says pdu_extract failed. what should i do? my CNMI is 1,2,0,1,0

Have you configured your modem properly on kannel? Right parameters on modem type?

yes. my configuration file has following parameters

group = smsc
smsc = at
smsc-id = gsm1
allowed-smsc-id = gsm1
preferred-smsc-id = gsm1
my-number = +xxxx
modemtype = auto
device = /dev/ttyS1
speed = 9600
sim-buffering = true
transceiver-mode = true
connect-allow-ip = "127.0.0.1"
max-error-count = 5
#dlr-mask=31
#log-file = /var/log/kannel/smsc-gsm1.log
log-level = 0

group = modems
id = g900
message-storage = SM
need-sleep = true
broken=true
sendline-sleep = 200
init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
init-string = “AT+CNMI=1,2,0,1,0;+CMEE=1”