[howto] Testing playSMS with Kannel

I moved the article to:

Please visit the page and comeback here for more examples and discussions.

anton

Example 1

Example kannel.conf for SMPP

For example, this is what I have

  • 1 server
    • Installed Ubuntu server 18.04
    • Installed playSMS 1.4.3 and latest Kannel from apt-get
    • Installation for playSMS 1.4.3 done following instructions in playsms.org
    • Installation for Kannel just like first post in this thread
    • playSMS and Kannel are on the same server
  • playSMS URL is accessible only from https://sms.example.com
    • Meaning when you browse it then it will show playSMS login box
    • Usually means cannot access playSMS from http://localhost (or https://localhost)
    • So that means Kannel option for get-url is https://sms.example.com/plugin/gateway/kannel/geturl.php
    • Or, this is the same, https://sms.example.com/index.php?app=call&cat=gateway&plugin=kannel&access=geturl
  • Provider give this for SMPP connection:
    • SMPP server host: sv78smpp.example.com
    • SMPP server port: 2715
    • SMPP username/system id: e1699
    • SMPP password: h239yf7n5csta6zg

Get example kannel.conf

Download and edit:
https://raw.githubusercontent.com/antonraharja/playSMS/master/contrib/kannel/kannel.conf

And this is my final example kannel.conf

## CORE

group = core
admin-password = siudfnhetwhf9jw4tyr23
status-password = 2orhf93euwfn29cbrnh
admin-port = 13000
admin-deny-ip = *.*.*.*
admin-allow-ip = 127.0.0.1
smsbox-interface = 127.0.0.1
smsbox-port = 13001
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
store-type = spool
store-location = /var/spool/kannel/store
smsbox-max-pending = 100

## SMSBOX

group = smsbox
smsbox-id = smsbox1
bearerbox-host = localhost
bearerbox-port = 13001
sendsms-interface = 127.0.0.1
sendsms-port = 13131
sendsms-chars = "0123456789+ "
log-file = /var/log/kannel/smsbox1.log
log-level = 0
access-log = /var/log/kannel/access.log

## SMSC

group = smsc
smsc-id = smpp1
smsc = smpp
host = sv78smpp.example.com
port = 2715
transceiver-mode = yes
smsc-username = e1699
smsc-password = h239yf7n5csta6zg
system-type = "VMA"
log-file = /var/log/kannel/smsc-smpp1.log
log-level = 0

## SMSBOX-ROUTE - Outgoing SMS route

group = smsbox-route
smsbox-id = smsbox1
smsc-id = smpp1

## SENDSMS-USER - Outgoing SMS

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

## SMS SERVICE - Incoming SMS

group = sms-service
keyword = default
omit-empty = true
max-messages = 0
get-url = "https://sms.example.com/index.php?app=call&cat=gateway&plugin=kannel&access=geturl&t=%t&q=%q&a=%a&Q=%Q&smsc=%i"

Example 2

Example kannel.conf for SMPP, playSMS accessible from localhost

For example, this is what I have

  • 1 server
    • Installed Ubuntu server 18.04
    • Installed playSMS 1.4.3 and latest Kannel from apt-get
    • Installation for playSMS 1.4.3 done following instructions in playsms.org
    • Installation for Kannel just like first post in this thread
    • playSMS and Kannel are on the same server
  • playSMS URL is accessible only from http://localhost/playsms
    • Meaning when you browse it then it will show playSMS login box
    • That means Kannel option for get-url is http://localhost/playsms/plugin/gateway/kannel/geturl.php
    • Or, this is the same, http://localhost/playsms/index.php?app=call&cat=gateway&plugin=kannel&access=geturl
  • Provider give this for SMPP connection:
    • SMPP server host: sv78smpp.example.com
    • SMPP server port: 2715
    • SMPP username/system id: e1699
    • SMPP password: h239yf7n5csta6zg

Get example kannel.conf

Download and edit:
https://raw.githubusercontent.com/antonraharja/playSMS/master/contrib/kannel/kannel.conf

And this is my final example kannel.conf

## CORE

group = core
admin-password = siudfnhetwhf9jw4tyr23
status-password = 2orhf93euwfn29cbrnh
admin-port = 13000
admin-deny-ip = *.*.*.*
admin-allow-ip = 127.0.0.1
smsbox-interface = 127.0.0.1
smsbox-port = 13001
box-deny-ip = *.*.*.*
box-allow-ip = 127.0.0.1
log-file = /var/log/kannel/kannel.log
log-level = 0
access-log = /var/log/kannel/access.log
store-type = spool
store-location = /var/spool/kannel/store
smsbox-max-pending = 100

## SMSBOX

group = smsbox
smsbox-id = smsbox1
bearerbox-host = localhost
bearerbox-port = 13001
sendsms-interface = 127.0.0.1
sendsms-port = 13131
sendsms-chars = "0123456789+ "
log-file = /var/log/kannel/smsbox1.log
log-level = 0
access-log = /var/log/kannel/access.log

## SMSC

group = smsc
smsc-id = smpp1
smsc = smpp
host = sv78smpp.example.com
port = 2715
transceiver-mode = yes
smsc-username = e1699
smsc-password = h239yf7n5csta6zg
system-type = "VMA"
log-file = /var/log/kannel/smsc-smpp1.log
log-level = 0

## SMSBOX-ROUTE - Outgoing SMS route

group = smsbox-route
smsbox-id = smsbox1
smsc-id = smpp1

## SENDSMS-USER - Outgoing SMS

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

## SMS SERVICE - Incoming SMS

group = sms-service
keyword = default
omit-empty = true
max-messages = 0
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"

Anton I will not know how to thank you, it’s still nice of you, I followed everything you gave to the letter and now I manage to send the message but to see the messages sent causes me a little trouble I do not know if you canHelp.

I foullow the articale here [Preformatted text](https://playsms.org/2021/01/26/testing-playsms-with-kannel/)
but i face problem with SMSC connections:

smpp1[smpp1]    SMPP:(Serverip):2715/2715:e1699:VMA (re-connecting, rcvd: sms 0 (0.00,0.00,0.00) / dlr 0 (0.00,0.00,0.00), sent: sms 0 (0.00,0.00,0.00) / dlr 0 (0.00,0.00,0.00), failed 0, queued 0 msgs)

I have open the ufw ports ( 13000,13001,13131,2715 )
IDK where or whats the problem and why like that
can you help me to solve the problem pls