SMS service with Kannel.
fredmajor
-
keita1985 Posted messages 35 Status Member -
keita1985 Posted messages 35 Status Member -
Hello,
I would like to set up an SMS service with the Kannel gateway on Ubuntu. I have configured it and it works. I can send SMS to mobile phones. I am using a GSM modem Siemens TC65.
The problem is that when I send an SMS request to the service, I do not receive any response. Please help me.
Thank you in advance. Above is the configuration of my gateway.
#
# THIS IS A SAMPLE CONFIGURATION FOR KANNEL
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, send email to users@kannel.org
#
group = core
admin-port = 13000
admin-password = bar
smsbox-port = 13001
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
#log-file = "/tmp/kannel.log"
#log-level = 0
#access-log = "access.log"
#http-proxy-host = "127.0.0.1"
#http-proxy-port = 8080
#http-proxy-exceptions = "127.0.0.1"
#http-proxy-username = "user"
#http-proxy-password = "password"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
dlr-storage = mysql
include = "/etc/kannel/modems.conf"
# Smsbox related
#smsbox-port = 13001
#box-deny-ip = "*.*.*.*"
#box-allow-ip = "127.0.0.1"
#unified-prefix = "00358,0"
#white-list = "http://127.0.0.1/white-list.txt"
#black-list = "http://127.0.0.1/black-list.txt"
#store-file = "kannel.store"
# Wapbox related
#wapbox-port = 13002
#udp-deny-ip = "*.*.*.*"
#udp-allow-ip = "127.0.0.1"
#wdp-interface-name = "*"
# SMSC CONNECTIONS - GLOBAL FIELDS
#group = smsc
#smsc = at
#smsc-id = ID
#denied-smsc-id = "X;Y"
#allowed-smsc-id = "Z"
#preferred-smsc-id = "W"
#allowed-prefix = "040;050"
#denied-prefix = "060;070"
#alt-charset =
# SMSC Nokia CIMD2
#group = smsc
#smsc = cimd2
#host =
#port =
#smsc-username =
#smsc-password =
#keepalive =
#sender-prefix =
# SMSC EMI
#group = smsc
#smsc = emi2
#smsc = emi_ip to use the old implementation
#host =
#port =
#smsc-username =
#smsc-password =
#device = /dev/
#phone =
#our-port =
#receive-port =
#connect-allow-ip =
#keepalive =
#flow-control =
# SMSC SMPP
#group = smsc
#smsc = smpp
#host =
#port =
#receive-port =
#smsc-username =
#smsc-password =
#system-type =
#address-range =
# SMSC SEMA
#group = smsc
#smsc = sema
#device = /dev/tty0
#smsc_nua = (X121 smsc address)
#home_nua = (x121 radio pad address)
#wait_report = 0/1 (0 means false, 1 means true)
# SMSC OIS
#group = smsc
#smsc = ois
#host = 103.102.101.100
#port = 10000
#receive-port = 10000
#ois-debug-level = 0
# SMSC GSM
group = smsc
smsc = at
smsc-id = mysmsc
modemtype = tc65
#modemtype = auto
#modemtype = wavecom | premicell | siemens | siemens-tc35 | falcom | nokiaphone | ericsson
device = /dev/ttyS0
pin = 1234
#validityperiod = 167
sms-center = +22676600150
my-number = +22676431572
# SMSC Fake
#group = smsc
#smsc = fake
#host =
#port =
#connect-allow-ip =
# SMSC HTTP
#group = smsc
#smsc = http
#system-type = kannel
#send-url =
#port =
#connect-allow-ip =
#username =
#password =
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
sendsms-chars = "0123456789 +-"
global-sender = 13013
#log-file = "/tmp/smsbox.log"
#log-level = 0
#access-log = "access.log"
#white-list =
#black-list =
#reply-couldnotfetch =
#reply-couldnotrepresent =
#reply-requestfailed =
#reply-emptymessage =
# SEND-SMS USERS
group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
# this sender is for Kannel relay testing (http_smsc)
#group = sendsms-user
#username = kannel
#password = rL4y
#user-deny-ip = "*.*.*.*"
#user-allow-ip = "127.0.0.1"
#name = service_kannel
#forced-smsc = ID
#default-smsc = ID
#faked-sended =
#max-messages = 1
#concatenation = 1
#split-chars =
#split-suffix =
#omit-empty =
#header =
#footer =
#allowed-prefix =
#denied-prefix =
#white-list =
#black-list =
# SMS SERVICES
#group = sms-service
#name = emploiTemps
#keyword = emp
#aliases = "noppy;niente"
#text = "Operational timetable available"
#get-url = "http://"
#post-url = "http://"
#file = "/tmp/"
#accepted-smsc = ID
#allowed-prefix =
#denied-prefix =
#catch-all = false
#send-sender = false
#strip-keyword = false
#faked-sender =
#max-messages = 1
#accept-x-kannel-headers = false
#assume-plain-text = false
#concatenation = false
#split-chars =
#split-suffix = "+"
#omit-empty = true
#header =
#footer =
#prefix =
#suffix =
#white-list =
#black-list =
# SMS SERVICE GET-URL EXAMPLE
#group = sms-service
#keyword = relay
#get-url = "http://localhost/service?phone=%p&text=%r&binary=%b&smsc=$i&time=%t
# SMS SERVICE black-list
group = sms-service
keyword = emp
text = "You are not allowed to use this service, Go away!"
accepted-smsc = mysmsc
# SMS SERVICE Default
# there should be default always
group = sms-service
keyword = default
text = "No service specified"
I would like to set up an SMS service with the Kannel gateway on Ubuntu. I have configured it and it works. I can send SMS to mobile phones. I am using a GSM modem Siemens TC65.
The problem is that when I send an SMS request to the service, I do not receive any response. Please help me.
Thank you in advance. Above is the configuration of my gateway.
#
# THIS IS A SAMPLE CONFIGURATION FOR KANNEL
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, send email to users@kannel.org
#
group = core
admin-port = 13000
admin-password = bar
smsbox-port = 13001
#status-password = foo
#admin-deny-ip = ""
#admin-allow-ip = ""
#log-file = "/tmp/kannel.log"
#log-level = 0
#access-log = "access.log"
#http-proxy-host = "127.0.0.1"
#http-proxy-port = 8080
#http-proxy-exceptions = "127.0.0.1"
#http-proxy-username = "user"
#http-proxy-password = "password"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
dlr-storage = mysql
include = "/etc/kannel/modems.conf"
# Smsbox related
#smsbox-port = 13001
#box-deny-ip = "*.*.*.*"
#box-allow-ip = "127.0.0.1"
#unified-prefix = "00358,0"
#white-list = "http://127.0.0.1/white-list.txt"
#black-list = "http://127.0.0.1/black-list.txt"
#store-file = "kannel.store"
# Wapbox related
#wapbox-port = 13002
#udp-deny-ip = "*.*.*.*"
#udp-allow-ip = "127.0.0.1"
#wdp-interface-name = "*"
# SMSC CONNECTIONS - GLOBAL FIELDS
#group = smsc
#smsc = at
#smsc-id = ID
#denied-smsc-id = "X;Y"
#allowed-smsc-id = "Z"
#preferred-smsc-id = "W"
#allowed-prefix = "040;050"
#denied-prefix = "060;070"
#alt-charset =
# SMSC Nokia CIMD2
#group = smsc
#smsc = cimd2
#host =
#port =
#smsc-username =
#smsc-password =
#keepalive =
#sender-prefix =
# SMSC EMI
#group = smsc
#smsc = emi2
#smsc = emi_ip to use the old implementation
#host =
#port =
#smsc-username =
#smsc-password =
#device = /dev/
#phone =
#our-port =
#receive-port =
#connect-allow-ip =
#keepalive =
#flow-control =
# SMSC SMPP
#group = smsc
#smsc = smpp
#host =
#port =
#receive-port =
#smsc-username =
#smsc-password =
#system-type =
#address-range =
# SMSC SEMA
#group = smsc
#smsc = sema
#device = /dev/tty0
#smsc_nua = (X121 smsc address)
#home_nua = (x121 radio pad address)
#wait_report = 0/1 (0 means false, 1 means true)
# SMSC OIS
#group = smsc
#smsc = ois
#host = 103.102.101.100
#port = 10000
#receive-port = 10000
#ois-debug-level = 0
# SMSC GSM
group = smsc
smsc = at
smsc-id = mysmsc
modemtype = tc65
#modemtype = auto
#modemtype = wavecom | premicell | siemens | siemens-tc35 | falcom | nokiaphone | ericsson
device = /dev/ttyS0
pin = 1234
#validityperiod = 167
sms-center = +22676600150
my-number = +22676431572
# SMSC Fake
#group = smsc
#smsc = fake
#host =
#port =
#connect-allow-ip =
# SMSC HTTP
#group = smsc
#smsc = http
#system-type = kannel
#send-url =
#port =
#connect-allow-ip =
#username =
#password =
# SMSBOX SETUP
group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
sendsms-chars = "0123456789 +-"
global-sender = 13013
#log-file = "/tmp/smsbox.log"
#log-level = 0
#access-log = "access.log"
#white-list =
#black-list =
#reply-couldnotfetch =
#reply-couldnotrepresent =
#reply-requestfailed =
#reply-emptymessage =
# SEND-SMS USERS
group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""
# this sender is for Kannel relay testing (http_smsc)
#group = sendsms-user
#username = kannel
#password = rL4y
#user-deny-ip = "*.*.*.*"
#user-allow-ip = "127.0.0.1"
#name = service_kannel
#forced-smsc = ID
#default-smsc = ID
#faked-sended =
#max-messages = 1
#concatenation = 1
#split-chars =
#split-suffix =
#omit-empty =
#header =
#footer =
#allowed-prefix =
#denied-prefix =
#white-list =
#black-list =
# SMS SERVICES
#group = sms-service
#name = emploiTemps
#keyword = emp
#aliases = "noppy;niente"
#text = "Operational timetable available"
#get-url = "http://"
#post-url = "http://"
#file = "/tmp/"
#accepted-smsc = ID
#allowed-prefix =
#denied-prefix =
#catch-all = false
#send-sender = false
#strip-keyword = false
#faked-sender =
#max-messages = 1
#accept-x-kannel-headers = false
#assume-plain-text = false
#concatenation = false
#split-chars =
#split-suffix = "+"
#omit-empty = true
#header =
#footer =
#prefix =
#suffix =
#white-list =
#black-list =
# SMS SERVICE GET-URL EXAMPLE
#group = sms-service
#keyword = relay
#get-url = "http://localhost/service?phone=%p&text=%r&binary=%b&smsc=$i&time=%t
# SMS SERVICE black-list
group = sms-service
keyword = emp
text = "You are not allowed to use this service, Go away!"
accepted-smsc = mysmsc
# SMS SERVICE Default
# there should be default always
group = sms-service
keyword = default
text = "No service specified"
Configuration: Linux Firefox 3.5.7
4 answers
-
Ajoute ceci et essaie à nouveau
# SMS SERVICE GET-URL EXAMPLE
catch-all = true
#group = sms-service
#keyword = relay
#get-url = "http://localhost/service?phone=%p&text=%r&binary=%b&smsc=$i&time=%t
AMSY BOYS-
-
-
-
-
Sorry for not replying to you earlier. I wasn't on-site.
To send messages via Kannel, I use a GSM modem connected to my computer. This modem has a SIM card. With the configuration I've set up, I can send messages from the browser using this address:
http://127.0.0.1:13013/cgi-bin/sendsms?username=tester&password=foobar&to=+22678140701&text=%C3%A7a%20marche%20maintenant
You see, it's not complicated. But what's difficult is receiving a request (in the case of SMS services).
I tried what you suggested and it didn't work. But I'm still looking, let me know if you have any updates.
Thanks.
-
-
Hello,
I would like to know if the number defined as the messaging center number in the GSM phone is that of our GSM modem connected to Kannel when we want to send and receive SMS with Kannel.
THANK YOU -
Bibiserge, the answer to your question is No.
Amsy10's response is quite clear.
You create the folder "service" (in /var/www/html of course) and inside it the file "creerpage.php".
Don't forget to add this in kannel.conf:
# SMSC GSM
group = smsc
smsc = at
modemtype = nokiaphone
device = /dev/ttyACM0
When you connect the modem, you will see in the logs something that contains "tty" in the form "ttyACM0", that is what you will put in the device part (above).
There you go. -
Hello,
I managed to configure Kannel, I'm able to send messages correctly but I can't receive messages even though I have configured my SMS service group. Here is the configuration of my SMS service part:
group=sms-service
keyword=test
text="ok that's fine"
catch-all=true
group=sms-service
keyword=default
text="default"
Does anyone have any idea? Thank you in advance.