kannel bluetooth configuration require - kannel

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.

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

kannel gateway is not answering SMS

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

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.)

kannel not forwarding messages to URL

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

Resources