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.
Related
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
I'm trying to set up a kannel gateway that connects to a server, it receives SMS messages (that's already working) and it has to answer "OK".
But I'm not even seeing an error in the log related with the outgoing message.
This is my kannel.conf. I see in the log that I get the messages but it seems kannel is not trying to send anything.
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = <mypass>
log-file = "/tmp/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
group=smsc
smsc=smpp
smsc-id=personal
interface-version=34
host=<smpp-host>
port=5016
system-id=<smpp-username>
smsc-username=<smpp-username>
smsc-password=<smpp-password>
system-type=default
transceiver-mode = yes
my-number = <my-number>
group=smsc
smsc=smpp
smsc-id=personal
interface-version=34
host=<smpp-host>
port=5016
system-id=<smpp-username>
smsc-username=<smpp-username>
smsc-password=<smpp-password>
system-type=default
transceiver-mode = yes
log-file = /tmp/smsc.log
my-number = <my-number>
group = smsbox
bearerbox-host = 127.0.0.1
sendsms-port = 13013
log-level = 0
group = sms-service
keyword = default
text = "OK"
catch-all = true
omit-empty = true
max-messages = 0
What am I doing wrong? Did I missunderstand anything in the documentation?
Am I reading the incorrect log?
Thanks in advance
Try this configuration
group = sms-service
keyword = default
text = "OK"
catch-all = true
omit-empty = true
max-messages = 0
accepted-smsc = personal
#omit-empty = true
#max-messages = 100
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
My kannel.conf is :
group = core
admin-port = X
smsbox-port = Y
admin-password = Z
log-file = "/usr/local/kannel/log/clientA/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/usr/local/kannel/log/clientA/Access.log"
store-type = file
store-file = "/usr/local/kannel/log/clientA/clientA.store"
###############################################################
group = smsc
smsc = smpp
smsc-id = clientA
host =A.B.C.D
port = 9081
throughput = 2
wait-ack = 600
smsc-username = myuser
smsc-password = mypass
keepalive=30
system-type =
transceiver-mode = 1
enquire-link-interval = 1200
source-addr-ton = 0
source-addr-npi = 1
dest-addr-ton = 1
dest-addr-npi = 1
max-pending-submits = 3
#################################################################
group = smsbox
smsbox-id = smsbox82
bearerbox-host = localhost
sendsms-port = portSend
global-sender = XXXXXXX
mo-recode = true
log-file = "/usr/local/kannel/log/clientA/smsbox.log"
log-level = 0
access-log = "/usr/local/kannel/log/clientA/Access.log"
###################################################################
group = sendsms-user
username = myu
password = myp
max-messages = 3
concatenation = true
##################################################################
group = sms-service
keyword = default
get-url = "http://localhost:80/insdb.php?sender=%p&receiver=%r&smsid=%I"
I have apache running on port 80 and the URL when individually called inserts messages in DB, however, when a message is sent to the App , it never reaches DB, and I do not see any error in logs explaining this.
Any thoughts where am I missing ?
Thanks
If you need to save all SMS messages that arrived to kannel, than you need to add sms-service group into kannel.conf, so add something like this:
group = sms-service
keyword = default
get-url="http://127.0.0.1/save?sender=%p&text=%a&receiver=%P"
This will cause that , for all received messages, there will be executed the get-url where your application (apache etc) should be able to save message details to DB.
You should check kannel documentation for detailed info about available placeholders, I used only some of them (sender, receiver, text of message).
BR,
Izabel
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.