Search code examples
callbacksmssms-gatewaykannelgeturl

Receiving SMS on Kannel but not able to forward it on URL


I have configured and connected an SMSC to receive SMS on Kannel properly. I am able to receive SMS successfully, as I can see from access logs, but not getting hit on my API.

This is the configuration file :

group = smsc
smsc = smpp
smsc-id = XXXXXX
host = abc.abc.abc.abc
port = 1111
transceiver-mode = true
throughput = 10
smsc-username = xxxxx
smsc-password = xxxxx
reconnect-delay = 60
system-type = XXXXXX
allowed-smsc-id = XXXXXX
#get-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work


group = sms-service
keyword-regex = .*
catch-all = true
forced-smsc = XXXXXX
get-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work
#post-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work

And I am getting following in my access-log :

2018-09-11 13:08:38 Receive SMS [SMSC:XXXXXX] [SVC:] [ACT:xxxxx] [BINF:CMT] [FID:] [META:?smpp?] [from:91xxxxxxxxxx] [to:+91xxxxxxxxxx] [flags:-1:0:-1:0:-1] [msg:16:Hello World] [udh:0:]

What am I doing wrong or missing?


Solution

  • To anyone, who find themselves with the same problem,I found out what I was missing.

    I needed to add following block as well in the main conf file :

    group = smsbox-route
    smsbox-id = smsbox
    smsc-id = XXXXXX; //name of the smsc
    

    Just adding this block, I started getting hit on my callback URL.

    There was nothing wrong with the conf in the original question, just a block was missing.

    Hope this helps someone :)