Kannel Round Robin Setup when SMSC is absent in sendsms Query String - kannel

I want to make a Round Robin configuration setting in the Kannel for the below message sending given that I have 2 SMSC(SMSC0 and SMSC1). When no SMSC is present in the query string, I like to use SMSC0 and SMSC1 in a Round Robin fashion. This is something like making a Default SMSC setting that will handle those things not explicitly handled by any SMSC. May be denied-smsc-id, allowed-smsc-id, preferred-smsc-id have some role.
cgi-bin/sendsms?username=sendsms&password=sendsms&to=44897742898855&from=test100&text=testmessagesinfohello&dlr-mask=31

NOT ROUND-ROBIN:
================
group = smsc
smsc-id = smsc1
allowed-smsc-id = smsc1
group = smsc
smsc-id = smsc2
allowed-smsc-id = smsc2
group = sendsms-user
default-smsc = smsc1
ROUND-ROBIN:
================
group = smsc
smsc-id = smsc1
denied-smsc-id = smsc2
group = smsc
smsc-id = smsc2
denied-smsc-id = smsc1

Related

Kannel - random smsc

I have Kannel and Goip32.
So, 1 sim-link on Goip is 1 smsc on Kannel.
That's configured as:
group = smsc
smsc = smpp
smsc-id = goip101
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip101"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-101.log"
log-level = 2
...
2-31
...
group = smsc
smsc = smpp
smsc-id = goip132
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip132"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-132.log"
log-level = 2
But kannel sending sms on random smsc, and after sms-delivery on goip101 may be 10 sms, on goip122 - 5 sms, on goip110 - 1 sms (for example).
How can i configured kannel to first chosen goip101, then goip102, then goip103...?
It is the purpose of Kannel to do the load-balancing between your different smsc.
If you absolutely want to force this order, you can use different smsc-id in your configuration and force the smsc-id when sending.
Do not forget to add the allowed-smsc-id setting for each smsc-id or Kannel will still share the load even if the smsc-id is not specified.
For example, with this configuration:
group = smsc
smsc = smpp
smsc-id = idSite1
host = hostname1
port = port1
transceiver-mode = true
smsc-username = username1
smsc-password = password1
max-pending-submits=50
group = smsc
smsc = smpp
smsc-id = idSite2
host = hostname2
port = port2
transceiver-mode = true
smsc-username = username2
smsc-password = password2
max-pending-submits=50
If you specify smscid=idSite1 while your send, it will still send using idSite1 OR idSite2.
You need to add allowed-smsc-id = idSite1 at the end of the 1st smsc definition and allowed-smsc-id = idSite2 at the end of the 2nd one
You have to specify the smsc-id in your configuration and for more strictly additonal parameter can be added
group = smsc
smsc = smpp
smsc-id = goip101
preferred-smsc-id=goip101
allowed-smsc-id=goip101
host = 192.168.1.48
port = 7777
transceiver-mode = true
smsc-username = "goip101"
smsc-password = ""
system-type =
max-pending-submits = 1
log-file = "/var/log/kannel/smsc-101.log"
log-level = 2

Get url not working in Kannel

I have configured kannel & i receive sms at bearerbox but URL containing the required action to be taken using receivesms php script is not called. receivesms script in php works fine when i call it externally, but kannel does not invokes the get-url as mentioned in the "SMS service" box & below access logs is repeating again and again in the logs & also smsbox logs doesn't have any logs related to this transaction. Please suggest what can be wrong in the configurationKannel configuration is as follows
group = core
admin-port = 13010
smsbox-port = 13012
admin-allow-ip = "10.130.252.160,127.0.0.1"
log-file = "/u03/kannel/logs/bearerbox.log"
box-allow-ip = "10.130.252.160,127.0.0.1"
access-log = "/u03/kannel/logs/bearerbox_access.log"
dlr-storage = internal
##############################TX-1##################################
group = smsc
smsc-id ="MT"
smsc = smpp
host =10.10.22.10
port = 5016
smsc-username = "CC_APPS"
smsc-password = "apps"
system-type = "INAPPS"
interface-version = 34
receive-port =0
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
keepalive = 30
log-level =0
throughput = 50
max-pending-submits=50
reconnect-delay = 60
reroute = true
log-file = "/u03/kannel/logs/smsc_conn.log"
######################RX-1################################
group = smsc
smsc-id ="MTS"
smsc = smpp
host =10.10.22.10
port = 0
smsc-username = "CC_APPS"
smsc-password = "apps"
system-type = "INAPPS"
receive-port =5016
interface-version = 34
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
keepalive = 30
log-level =0
reconnect-delay = 60
reroute = true
log-file = "/u03/kannel/logs/smsc_conn.log"
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = YD-MTS
log-file = "/u03/kannel/logs/smsbox.log"
log-level = 0
#SMSBOX ROUTING
group = smsbox-route
smsbox-id = smsbox
smsc-id ="MT"
group = sendsms-user
username = smsg
password = smsg#123
default-smsc="MT"
concatenation= true
max-messages = 6
group = sms-service
keyword = default
url = http://10.130.250.58/receivesms.php?sender=%p&text=%b
catch-all = true
max-messages = 1
text = "This is a reply"
bearerbox access log is as follows
2015-11-12 09:04:53 Sent SMS [SMSC:MTS] [SVC:] [ACT:MTSCC_APPS] [BINF:] [FID:AFB4EE11] [META:?smpp??smpp_resp?] [from:+919136006473] [to:+9177775] [flags:-1:0:-1:0:-1] [msg:2:Hi] [udh:0:]
2015-11-12 09:04:53 Receive SMS [SMSC:MTS] [SVC:] [ACT:MTSCC_APPS] [BINF:] [FID:] [META:?smpp?] [from:+919136006473] [to:+9177775] [flags:-1:0:-1:0:-1] [msg:2:Hi] [udh:0:]
2015-11-12 09:04:53 Receive SMS [SMSC:MTS] [SVC:] [ACT:MTSCC_APPS] [BINF:] [FID:] [META:?smpp?] [from:+919136006473] [to:+9177775] [flags:-1:0:-1:0:-1] [msg:2:Hi] [udh:0:]
2015-11-12 09:04:53 Sent SMS [SMSC:MTS] [SVC:] [ACT:MTSCC_APPS] [BINF:] [FID:AFB4EE31] [META:?smpp??smpp_resp?] [from:+919136006473] [to:+9177775] [flags:-1:0:-1:0:-1] [msg:2:Hi] [udh:0:]
Try this sms-service instead. You are missing "get-" before url I think.
group = sms-service
keyword = default
get-url = http://10.130.250.58/receivesms.php?sender=%p&text=%b
catch-all = true
max-messages = 0
accept-x-kannel-headers = true
assume-plain-text = true

Configuring Kannel to work with Mblox

I have signed up for an account with Mblox. I would like to use Kannel as my SMPP application to send SMS messages to U.S. phone numbers.
I can bind in, but my submits fail (usually with an error code of 0x042A). I am using the following HTTP request (to my Kannel application) to send a test message to my Verizon phone (just using 14085551212 as an example phone number).
http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=14085551212&priority=1&text=Test+message+to+VZW
I am also using the following config file. Has anyone encountered this before and been able to solve it?
My current config file:
#---------------------------------------------
# CORE
#
group = core
admin-port = 13000
smsbox-port = 13001
wapbox-port = 13002
admin-password = bar
box-allow-ip = "127.0.0.1"
#---------------------------------------------
# SMSC CONNECTIONS
#
group = smsc
smsc = smpp
smsc-id = smsc1
connect-allow-ip = 127.0.0.1
host = "smpp.psms.us.mblox.com"
transceiver-mode = true
smsc-username = (my account name)
smsc-password = (my password)
port = 3204
enquire-link-interval = 30
system-type = "mbloxclient1"
service-type = -1
interface-version = 34
bind-addr-ton = 0x02
bind-addr-npi = 0x08
my-number = (my short code)
msg-id-type = 0x00
source-addr-ton = 0x03
source-addr-npi = 0x08
dest-addr-ton = 0x02
dest-addr-npi = 0x08
esm-class = 0
#---------------------------------------------
# SMSBOX SETUP
#
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = (my short code)
log-level = 0
#---------------------------------------------
# WAPBOX SETUP
#
group = wapbox
bearerbox-host = 127.0.0.1
syslog-level = none
#---------------------------------------------
# SEND-SMS USERS
#
group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
#---------------------------------------------
# SMS SERVICES
#
group = sms-service
keyword = default
text = "No service specified"
I see a few things that need to change. First, you need to include the operator, tariff, and service ID when sending to certain US carriers (such as Verizon and T-Mobile).
To send to Verizon, you'll need to first include a TLV section in your config file with these vendor-specific parameters.
#----------------------------------------
# TLV TAGS
group = smpp-tlv
name = SERVICE_ID
tag = 0x1407
type = octetstring
length = 5
group = smpp-tlv
name = OPERATOR_ID
tag = 0x1402
type = octetstring
length = 5
group = smpp-tlv
name = TARIFF
tag = 0x1403
type = octetstring
length = 5
Note that this will require installing Kannel version 1.4.4 or higher (within the 1.4.x branch - the 1.5.0 development version does not seem to support TLVs as of this posting).
Once this is set up, you can use the following format to send SMS messages through Mblox with the required TLVs:
http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=14085551212&priority=1&meta-data=?smpp?SERVICE_ID=12345%26OPERATOR_ID=31003%26TARIFF=0&text=Test+message+to+VZW
(You'll have to change the phone number, service ID, and operator ID to the appropriate values.)
For carriers other than Verizon and T-Mobile (i.e., AT&T, Sprint, Cricket, US Cellular, etc.), you should leave out the service ID parameter.
If you are using Sure Route, you will not need the operator ID or tariff parameter.
Good luck! Note that, even with these instructions, it will still likely take a bit of trial and error, and modification to get everything working correctly.
(Disclaimer: Question and answer both provided by an Mblox advocate.)

KannelRoute message through 2 smsc

I am new to this field. I have 2 smsc service provider connection. if i send 100 message 50 message should go through first service provider and rest 50 should go through 2nd service provider. is this possible? If so how to do it?
Thanks in advance
#1st service provider
group = smsc
smsc = smpp
smsc-id = A
interface-version = 34
host = xxxxx
port = xxxx
system-id = xxxxx
smsc-password = xxxx
system-type = "default"
address-range = ""
transceiver-mode = true
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
bind-addr-ton = 1
bind-addr-npi = 1
log-level = 0
log-file = "/var/log/kannel/xxxxx.log"
#2nd service provider
group = smsc
smsc = smpp
smsc-id = B
interface-version = 34
host = xxxxx
port = xxxx
system-id = xxxxx
smsc-password = xxxx
system-type = "default"
address-range = ""
transceiver-mode = true
source-addr-ton = 1
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
bind-addr-ton = 1
bind-addr-npi = 1
log-level = 0
log-file = "/var/log/kannel/xxxxx.log"
Kannel will load balance this for you if you set smsc-id to the same name for each route. If one SMSC goes down then all message will be sent via the alternative SMSC which is live. If both SMSC are live then Kannel will randomly pick one so you should achieve roughly 50/50 distribution (although not exactly 50/50)
-- edit--
sorry I checked and actually Kannel will send via the SMSC with the smallest queue so if you have low throughput of messages this will always be the first SMSC and you will not achieve anywhere near 50/50 distribution. This is under the code smsc2_rout() in gw/bb_smscconn.c of the kannel source code.

kannel bluetooth configuration require

I have installed kannel and it is working , i am not sure how to configure kannel.conf so that sms is sent from browser to blue tooth nokia phone.
http://127.0.0.1:13013/cgi-bin/sendsms?username=tester&password=foobar&to=+91XXXXXXXX&text=hello%20from%20kannel
i get 3: Queued for later delivery in browser
kannel.conf contains
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
log-file = "/tmp/kannel.log"
log-level = 0
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/tmp/smsbox.log"
log-level = 0
access-log = "/tmp/smsaccess.log"
group = sendsms-user
username = tester
password = foobar
#Nokia Modem
# SMSC GSM
group = smsc
smsc = at
smsc-id = nokia_smsc
modemtype = nokiaphone
device = /dev/rfcomm0
speed = 9600
pin = BlueZ
group = modems
id = nokiaphone
name = "Nokia Phone"
detect-string = "Nokia Mobile Phone"
init-string = "AT+CNMI=1,2,0,0,0"
speed = 115200
enable-hwhs = "AT+IFC=2,2"
need-sleep = false
no-pin = true
no-smsc = false
sendline-sleep = 100
keepalive-cmd = "AT+CBC;+CSQ"
broken = true
message-storage = "ME"
enable-mms = true
any help would be helpful.
Its a modem issue ... this message means that kannel received the sms correctly but don't know where to send it and/or the route is not available.
Check logs and/or for error and paste it here ... may be we can help you further .
Thanks
:)
You better to use a USB modem for this instead of Bluetooth. All the other settings are correct. I am using Kannel without having problem.

Resources