Bulk SMS Sender
Kannel issues please help. # SMSBOX SETUP # # Smsbox(es) do higher-level SMS handling after they have been received from. # Kannel knows which SMSC to use to.
Before beginning to use Kannel, it is necessary to install the Kannel gateway first.
Kannel Gateway Installation
- Download the archive with a source code:
wget https://redmine.kannel.org/attachments/download/199/gateway-1.5.0.zip - Unzip the archive:
unzip gateway-1.5.0.zip - Compile and install the gateway:
cd gateway-1.5.0
./configure --with-mysql --enable-start-stop-daemon
Note: You MUST install all required libraries (usually this is libxml2-dev or mysql-dev).
Example for Ubuntu:
sudo apt-get install libmysqlclient-dev
sudo apt-get install libxml2-dev
After installing all required packages the gateway is compiled
touch .depend
make .depend
make
make install
touch .depend
make .depend
make
make install
The last command will install Kannel executables to your default directory ( /usr/local/sbin/ )
After installation, download and unzip the archive.
The archive contains the following files:
- smskannel.conf – configuration file.
- kannel.sh – start / stop system script.
- kannel-install.txt – system installation description.
- kannel-setup.sh – optional script, creates work directories.
To complete the installation, launch kannel-setup.sh. This will create work directories, write configuration, and start script into /etc/kannel.
Use . /etc/kannel/kannel.sh command to start.
First, though, you need to open and edit the configuration file /etc/kannel/smskannel.conf.
Edit parameters that are required to be changed:
- smsc-username - use the received login
- smsc-password - use the received password
It is highly recommended that you “uncomment” any lines that relate to logging, and that you change ports and passwords.
You can find settings and advanced settings descriptions in the formal documentation at http://kannel.org/download/kannel-userguide-snapshot/userguide.html, or contact our customer support.
After you edit and run the system, check its status by putting these links in your browser:
http://host:port/status?password=defined_password
where
host – IP-address of the server
port – admin-port from Kannel settings
defined_password – admin-password or status-password from Kannel settings.
http://host:port/status?password=defined_password
where
host – IP-address of the server
port – admin-port from Kannel settings
defined_password – admin-password or status-password from Kannel settings.
SMS is sent by sending a GET-request to the port specified in the smsbox section. See detailed information in the documentation at http://kannel.org/download/kannel-userguide-snapshot/userguide.html#AEN4952, You can also use this PHP script example (download).
FREE SIGNUP |
- Bulk Mailers
- SMS Senders
- – Bulk SMS Sender
- Email Extractors
- List Managers
- Services
Hello,
I am sending you email because i have read your posts about Kannel SMS Gateway. I hope i will get my answers here...
Actually i want to run an Small SMS site for localhost, since long i was using windows based server with ActiveXpert but now i want to play with ubuntu i liked the interface and want to make sms gateway in ubuntu. I have installed Kannel and extras but i dont know what is wrong with my settings...
1. My Kannel.conf file is:
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
# 3) read the user guide
include = '/etc/kannel/modems.conf'
#---------------------------------------------
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
dlr-storage = mysql
box-deny-ip = '*.*.*.*'
box-allow-ip = '127.0.0.1'
log-file = '/var/log/kannel/bearerbox.log'
log-level = 0
# DLR with MySQL support configuration
group = mysql-connection
id = mydlr
host = localhost
username = root
password = xxxxx
database = kannel
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc
#---------------------------------------------
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC specific
# protocol and message relying. You need these to actually receive and send
# messages to handset, but can use GSM modems as virtual SMSCs
# Here is a sample SMSC for use with the /usr/lib/kannel/test/fakesmsc command
group = smsc
smsc = at
modemtype = auto
device=/dev/ttyUSB1
my-number = xxxxxxxxxxxxx
sms-center= xxxxxxxxxxxxx
connect-allow-ip = 127.0.0.1
log-level = 0
#---------------------------------------------
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been received from
# SMS centers by bearerbox, or before they are given to bearerbox for delivery
group = smsbox
smsbox-id = mysmsc
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = xxxxxxxxxxxxx
log-file = '/var/log/kannel/smsbox.log'
log-level = 0
access-log = '/var/log/kannel/access.log'
http-request-retry = 3
http-queue-delay = 10
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://localhost:13013/cgi-bin/sends...assword=foobar...
# This is the username and password that RapidSMS uses to deliver SMSes to
# Kannel. It must also set the 'smsc' variable in the query string, so that
# Kannel knows which SMSC to use to route the message.
group = sendsms-user
username = kannel
password = kannel
concatenation= true
#---------------------------------------------
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving from
# handsets. The response is based on message content. Only one sms-service is
# applied, using the first one to match.
# The 'ping-kannel' service let's you check to see if Kannel is running,
# even if RapidSMS is offline for some reason.
group = sms-service
keyword = default
catch-all = true
accept-x-kannel-headers = true
max-messages = 0
get-url = 'http://localhost/kannel/receivesms.php?sender=%p&text=%b'
2. My Sqlbox.conf file Is:
group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
global-sender = 'xxxxxxxxxx'
bearerbox-host = localhost
bearerbox-port = 13005
smsbox-port = 13001
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = '/var/log/kannel/kannel-sqlbox.log'
log-level = 0
#ssl-client-certkey-file = '
#ssl-server-cert-file = '
#ssl-server-key-file = '
#ssl-trusted-ca-file = '
# Database connection examples. Please uncomment as needed
# Example MYSQL Connection
group = mysql-connection
id = sqlbox-db
host = localhost
username = root
password = xxxxxxx
database = kannel
max-connections = 10
3. Issues:
Now when i send SMS to my device it does not come in mysql in both like DLR and also in Kannel database.,..
When i send message through: http://localhost:13013/cgi-bin/sends...ext=hi%20buddy!
It send SMS but not adding in database... I have created service for smsbox and bearerbox, when i start my server both services starts in background and work fine just dont know why it has database issues and also when i try to start sqlbox it shows:
2013-09-12 16:10:37 [16231] [0] INFO: MYSQL: Connected to server at localhost.
2013-09-12 16:10:37 [16231] [0] INFO: MYSQL: server version 5.5.32-0ubuntu0.12.04.1, client version 5.5.32.
2013-09-12 16:10:37 [16231] [0] DEBUG: Started thread 1 (sqlbox.c:sql_to_bearerbox)
2013-09-12 16:10:37 [16231] [0] ERROR: bind failed
2013-09-12 16:10:37 [16231] [0] ERROR: System error 98: Address already in use
2013-09-12 16:10:37 [16231] [0] PANIC: Could not open sqlbox port 13001
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox(gw_panic+0xd2) [0x80745d2]
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox(main+0x5c0) [0x8050a40]
2013-09-12 16:10:37 [16231] [0] PANIC: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb6e7e4d3]
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox() [0x8050ad5]
Please tell me where i am wrong? I am using Ubuntu 12.04 LTS. If you will help me for an PHP sms form too i shall be thankful. Where users write their name recipient number and message and press send sms go to recipient number and also save in database....
I am sending you email because i have read your posts about Kannel SMS Gateway. I hope i will get my answers here...
Actually i want to run an Small SMS site for localhost, since long i was using windows based server with ActiveXpert but now i want to play with ubuntu i liked the interface and want to make sms gateway in ubuntu. I have installed Kannel and extras but i dont know what is wrong with my settings...
1. My Kannel.conf file is:
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
# 3) read the user guide
include = '/etc/kannel/modems.conf'
#---------------------------------------------
# CORE
#
# There is only one core group and it sets all basic settings
# of the bearerbox (and system). You should take extra notes on
# configuration variables like 'store-file' (or 'store-dir'),
# 'admin-allow-ip' and 'access.log'
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
dlr-storage = mysql
box-deny-ip = '*.*.*.*'
box-allow-ip = '127.0.0.1'
log-file = '/var/log/kannel/bearerbox.log'
log-level = 0
# DLR with MySQL support configuration
group = mysql-connection
id = mydlr
host = localhost
username = root
password = xxxxx
database = kannel
group = dlr-db
id = mydlr
table = dlr
field-smsc = smsc
field-timestamp = ts
field-destination = destination
field-source = source
field-service = service
field-url = url
field-mask = mask
field-status = status
field-boxc-id = boxc
#---------------------------------------------
# SMSC CONNECTIONS
#
# SMSC connections are created in bearerbox and they handle SMSC specific
# protocol and message relying. You need these to actually receive and send
# messages to handset, but can use GSM modems as virtual SMSCs
# Here is a sample SMSC for use with the /usr/lib/kannel/test/fakesmsc command
group = smsc
smsc = at
modemtype = auto
device=/dev/ttyUSB1
my-number = xxxxxxxxxxxxx
sms-center= xxxxxxxxxxxxx
connect-allow-ip = 127.0.0.1
log-level = 0
#---------------------------------------------
# SMSBOX SETUP
#
# Smsbox(es) do higher-level SMS handling after they have been received from
# SMS centers by bearerbox, or before they are given to bearerbox for delivery
group = smsbox
smsbox-id = mysmsc
bearerbox-host = 127.0.0.1
sendsms-port = 13013
global-sender = xxxxxxxxxxxxx
log-file = '/var/log/kannel/smsbox.log'
log-level = 0
access-log = '/var/log/kannel/access.log'
http-request-retry = 3
http-queue-delay = 10
# SEND-SMS USERS
#
# These users are used when Kannel smsbox sendsms interface is used to
# send PUSH sms messages, i.e. calling URL like
# http://localhost:13013/cgi-bin/sends...assword=foobar...
# This is the username and password that RapidSMS uses to deliver SMSes to
# Kannel. It must also set the 'smsc' variable in the query string, so that
# Kannel knows which SMSC to use to route the message.
group = sendsms-user
username = kannel
password = kannel
concatenation= true
#---------------------------------------------
# SERVICES
#
# These are 'responses' to sms PULL messages, i.e. messages arriving from
# handsets. The response is based on message content. Only one sms-service is
# applied, using the first one to match.
# The 'ping-kannel' service let's you check to see if Kannel is running,
# even if RapidSMS is offline for some reason.
group = sms-service
keyword = default
catch-all = true
accept-x-kannel-headers = true
max-messages = 0
get-url = 'http://localhost/kannel/receivesms.php?sender=%p&text=%b'
2. My Sqlbox.conf file Is:
group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
global-sender = 'xxxxxxxxxx'
bearerbox-host = localhost
bearerbox-port = 13005
smsbox-port = 13001
smsbox-port-ssl = false
sql-log-table = sent_sms
sql-insert-table = send_sms
log-file = '/var/log/kannel/kannel-sqlbox.log'
log-level = 0
#ssl-client-certkey-file = '
#ssl-server-cert-file = '
#ssl-server-key-file = '
#ssl-trusted-ca-file = '
# Database connection examples. Please uncomment as needed
# Example MYSQL Connection
group = mysql-connection
id = sqlbox-db
host = localhost
username = root
password = xxxxxxx
database = kannel
max-connections = 10
3. Issues:
Now when i send SMS to my device it does not come in mysql in both like DLR and also in Kannel database.,..
When i send message through: http://localhost:13013/cgi-bin/sends...ext=hi%20buddy!
It send SMS but not adding in database... I have created service for smsbox and bearerbox, when i start my server both services starts in background and work fine just dont know why it has database issues and also when i try to start sqlbox it shows:
2013-09-12 16:10:37 [16231] [0] INFO: MYSQL: Connected to server at localhost.
2013-09-12 16:10:37 [16231] [0] INFO: MYSQL: server version 5.5.32-0ubuntu0.12.04.1, client version 5.5.32.
2013-09-12 16:10:37 [16231] [0] DEBUG: Started thread 1 (sqlbox.c:sql_to_bearerbox)
2013-09-12 16:10:37 [16231] [0] ERROR: bind failed
2013-09-12 16:10:37 [16231] [0] ERROR: System error 98: Address already in use
2013-09-12 16:10:37 [16231] [0] PANIC: Could not open sqlbox port 13001
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox(gw_panic+0xd2) [0x80745d2]
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox(main+0x5c0) [0x8050a40]
2013-09-12 16:10:37 [16231] [0] PANIC: /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0xb6e7e4d3]
2013-09-12 16:10:37 [16231] [0] PANIC: sqlbox() [0x8050ad5]
Please tell me where i am wrong? I am using Ubuntu 12.04 LTS. If you will help me for an PHP sms form too i shall be thankful. Where users write their name recipient number and message and press send sms go to recipient number and also save in database....