How do I configure playsms if it is on another machine(cloud VPS) and Kannel with modem on the same machine(Local)?


(Henry) #1

Hi Guys

Thanks for the support

How do I configure playsms if it is on another machine(cloud VPS) and Kannel with modem
on the same machine(Local)?

I keep getting message Unable to access Kannel admin commands in the playsms kannel
status thus no sms is sent to kannel.

Surprisingly, when I check playsms Report -->sandbox there is an indication that I have ever got 2 promotional SMS from my local utility companies. Which implies that, at a certain point in time, while trying this and that, the kannel which is installed on my local machine has ever communicated to playsms installed separately on a cloud VPS.

Kannel is tested and sends sms to my phone using browser

N.B: I use Ubuntu on both machines. 197.XX.34.176 is the psuedo IP for my local machine
hosting kannel while 34.XX.230.86 is my Playsms server IP address.

Thank you,

/etc/kannel/kannel.conf

#Core

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = mypassword
status-password = mypassword
log-file = "/var/log/kannel/bearerbox.log"
log-level = 0
#Henry commented the 2 lines below because when uncommented the kannel gets errors
#box-deny-ip = “...
#box-allow-ip =“34.XX.230.86” #My Playsms server IP address
#Send sms only once. No retry
sms-resend-retry = 1

group = smsc
smsc = at
smsc-id = kannel
modemtype = Huwei
device = /dev/ttyUSB0
speed = 19200
my-number = +phone80392243
sim-buffering = true
log-level = 0

#Modem
group = modems
id = huawei
name = "Huawei Edge"
detect-string = "huawei"
enable-mms = true
init-string = "AT+CNMI=2,1,2,2,0"
message-storage = "SM"
speed = 115200

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”

group = sendsms-user
username = myusername
password = mypassword
#Henry added the 2 lines below
#user-deny-ip = “...
#user-allow-ip = "34.XX.230.86"
concatenation = true
max-messages = 1000

group = sms-service
keyword = default
get-url = “http://localhost/kannel/receivesms.php?sender=%p&text=%b

If you have playSMS installed to receive sms use below line instead

get-url = “http://34.XX.230.86/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q

+++++++++
Manage kannel

Configuration
Gateway name - kannel
Username – myusername
Password - mypassword
Module sender ID
Module timezone - +03:00
Bearerbox hostname or IP – 197.XX.34.176 (IP for my local machine hosting kannel)
Send SMS hostname or IP – 197.XX.34.176 (IP for my local machine hosting kannel)
Send SMS port - 13013
DLR mask 27
Additional URL parameter
playSMS web URL - http://34.XX.230.86/playsms
Incoming SMS time is in local time – No

Operational
Kannel admin host – 197.XX.34.176 (IP for my local machine hosting kannel)
Kannel admin port - 13000
Kannel admin password - mypassword
Kannel status - Unable to access Kannel admin commands
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Manage gateway and SMSC
Edit SMSC

Gateway - kannel
SMSC name - kannel
Username - myusername
Password - mypassword
Module sender ID
Module timezone
Bearerbox hostname or IP – 197.XX.34.176 (IP for my local machine hosting kannel)
Send SMS hostname or IP – 197.XX.34.176 (IP for my local machine hosting kannel)
Send SMS port - 13013
DLR mask
Additional URL parameter
playSMS web URL - http://34.XX.230.86/playsms

+++++++++++++++++++++++++++++++++++++++++++++++++

View log
playSMS daemon
status
/var/log/playsms/playsms.log

197.XX.34.176 34.XX.230.86 PID5911779b34d2c - L2 init # WARNING: possible CSRF attack. sid: ip:197.XX.34.176
197.XX.34.176 34.XX.230.86 2017-05-09 08:02:42 PID591177a262f19 - L2 auth_validate_login # valid login u:admin uid:1 ip:197.XX.34.176
197.XX.34.176 34.XX.230.86 2017-05-09 08:02:42 PID591177a262f19 - L2 login # u:admin uid:1 status:2 sid:vhtttbj4aj9komnv4oq1n675n1 ip:197.XX.34.176
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2 sendsms #
start uid:1 sender_id:[1234] smsc:[]
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2
sendsms_queue_create # saving queue_code:34ee99ca3b38eaebb12772dfbb3d56bc src:1234
scheduled:2017-05-09 09:44:38
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2
sendsms_queue_create # saved
queue_code:34ee99ca3b38eaebb12772dfbb3d56bc id:7
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2 sendsms #
dst_count:1 sms_count:1 total_charges:0
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2
sendsms_queue_push # saving queue_code:34ee99ca3b38eaebb12772dfbb3d56bc st:+phone72570274
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2
sendsms_queue_push # saved queue_code:34ee99ca3b38eaebb12772dfbb3d56bc smslog_id:8
197.XX.34.176 34.XX.230.86 2017-05-09 12:41:38 PID5911b9023379e admin L2 sendsms #
end queue_code:34ee99ca3b38eaebb12772dfbb3d56bc queue_count:1sms_count:1 failed_queue:0 failed_sms:0


(Edilson Spessoto) #2

From your playsms machine, you can send sms through kannel, using curl or wget, e.g?


(Henry) #3

Thank you very much Edilson for your prompt reply and I apologize for sending unformatted message. You guys will excuse me am using this forum for the first time neither am I an expert in configuring playsms + kannel.

Please help me with more details on how to send sms through kannel, using curl or wget.