LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-12-2013, 06:17 AM   #1
efuzone
LQ Newbie
 
Registered: Jan 2013
Posts: 4

Rep: Reputation: Disabled
Kannel issues please help


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....
 
Old 09-24-2013, 05:36 PM   #2
Gwadaman
LQ Newbie
 
Registered: Sep 2013
Posts: 1

Rep: Reputation: Disabled
Hi efuzone,

You have the answer in the log:
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

The 13001 port is used by the "smsbox-port" in the bearerbox config:
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo

So you can't use it in your Sqlbox.conf as "smsbox-port".
You must use this port as the "bearerbox-port" in the sqlbox.conf.
The correct sqlbox.conf's details must be:
group = sqlbox
id = sqlbox-db
smsbox-id = sqlbox
global-sender = "xxxxxxxxxx"
bearerbox-host = localhost
bearerbox-port = 13001
smsbox-port = 13005
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 = ""

Hope this will help you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kannel configuration dboira Linux - Mobile 3 12-08-2010 02:57 AM
help to install kannel icemansam07 Linux - Software 3 10-10-2007 01:41 AM
kannel shakil Linux - Software 0 10-15-2005 06:04 PM
kannel thoyyib Linux - Software 0 10-13-2005 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration