Can't receive SMS

I can’t receive smses.

In log I have:
L2 kannel__incoming # unable to process incoming SMS. remote_addr:[10.1.255.254] or remote_host:[sms.XXX.net] does not match with your bearerbox_host config:[localhost] smsc:[]

#---------------------------------------------
# SMSBOX SETUP
group = smsbox
smsbox-id = smsbox-web
bearerbox-host = "10.1.255.254"
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"
mo-recode = true

#---------------------------------------------
# SMS SERVICE
group = sms-service
keyword = default
accept-x-kannel-headers = true
omit-empty = true
catch-all = yes
max-messages = 0
assume-plain-text = true
concatenation = true
get-url = "http://sms.XXX.net/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a"
post-url = “http://sms.XXX.net/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a”

#---------------------------------------------
## SMS ROUTING
##---------------------------------------------
group = smsbox-route
smsbox-id = smsbox-web
smsc-id = kannel

Where is your playSMS, if its in the same server with Kannel then use localhost instead.

Anton

Yes kannel and sms on same server.

Do you mean change IP bearerbox and sendsms in playsms settings of SMSC?

If I change bearerbox and save I get error:
10.1.255.254 sms.XXX.net 2019-05-14 07:42:21 PID5cda472d040a6 - L2 kannel__incoming # unable to process incoming SMS. remote_addr:[10.1.255.254] or remote_host:[sms.XXX.net] does not match with your bearerbox_host config:[localhost] smsc:[]

If I change sendsms and save I get error:
10.1.255.254 sms.protvino.net 2019-05-14 07:44:09 PID5cda479901157 - L2 kannel__incoming # unable to process incoming SMS. remote_addr:[10.1.255.254] or remote_host:[sms.XXX.net] does not match with your bearerbox_host config:[localhost] smsc:[]

If I change and save both:
10.1.255.254 sms.XXX.net 2019-05-14 07:45:05 PID5cda47d143d7c - L2 kannel__incoming # unable to process incoming SMS. remote_addr:[10.1.255.254] or remote_host:[sms.XXX.net] does not match with your bearerbox_host config:[localhost] smsc:[]

There is no difference between errors.

In kannel too, change all of them to localhost, provided playsms also is accessible through localhost

the log said that kannel accessing playSMS from an IP that is not known as bearerbox host in playSMS, so make them the same, both IP 10 or both localhost

In first message I wrote conf of my kannel:

# SMSBOX SETUP
group = smsbox
smsbox-id = smsbox-web
bearerbox-host = "10.1.255.254"
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"
mo-recode = true

Its 10.1.255.254, and in playsms I wrote 10.1.255.254.

netstat -na | grep 13013
tcp4 0 0 *.13013 *.* LISTEN
It listen on any host.

sms service part, your get-url and post-url (just choose/enable one), make that accessing localhost too

anton

My SMS SERVICE PART:
#---------------------------------------------
# SMS SERVICE
group = sms-service
keyword = default
accept-x-kannel-headers = true
omit-empty = true
catch-all = yes
max-messages = 0
assume-plain-text = true
concatenation = true
get-url = “http://sms.XXX.net/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a
post-url = “http://sms.XXX.net/plugin/gateway/kannel/geturl.php?t=%t&q=%q&a=%a”

#---------------------------------------------
## SMS ROUTING
##---------------------------------------------
group = smsbox-route
smsbox-id = smsbox-web
smsc-id = kannel

this part, change to localhost if you can, it means playsms must be accessible from http://localhost/ if accessed from inside the server

and use get-url, comment the post-url

Thanks a lot, I found error with CNAME on my machine on bind server.

hello @anton,

i have one question regarding get-url or post-url, what is the difference ?

also what are the best parameters to fetch all incoming sms from all smpp account set in kannel to only use playsms route incoming sms with the #hashtag or @username settings in the incoming

contact skype id "adev09@gmail.com"