Archives

Sunday, September 12, 2010

Kannel configuration file

Here is my current Kannel SMS gateway configuration file for use with a GSM modem.

--------------- kannel.conf ------------

#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# It is run like this:
#
# 1% gw/bearerbox gw/smskannel.conf
# 2% gw/smsbox gw/smskannel.conf
# 3% test/fakesmsc -p 10000 -H localhost -i 1 -m 100 "123 345 text nop"
#
# ..all 3 commands in separate shells (or screen sessions)
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, send email to users@...
#
# Kalle Marjola May 2000
# Changed for new fakesmsc version by Uoti Urpala Jan 2001
# Added service and sendsms for HTTP SMSC by Kalle Marjola Mar 2001
#

group = core
admin-port = 13000
smsbox-port = 13001
admin-password = bar
status-password = foo
admin-deny-ip = ""
admin-allow-ip = "127.0.0.1"
log-file = "/var/log/kannel.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
unified-prefix = "00358,0"
#access-log = "access.log"
#store-file = "kannel.store"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
dlr-storage = mysql


# SMSC CONNECTIONS
#
#group = smsc
#smsc = fake
#smsc-id = FAKE
#port = 10001
#connect-allow-ip = 127.0.0.1

#NOKIA 7110
#group = smsc
#smsc = at2
#smsc-id = 7110
#modemtype=nokiaphone
#device=/dev/ttyS0
#speed = 19200
#pin=1234
#include=/usr/local/etc/modems.conf

#NOKIA N70-1
group = smsc
smsc = at
smsc-id = N70
modemtype = auto
device = /dev/ttyACM0
my-number = 0725529969
connect-allow-ip = 127.0.0.1
log-level = 0
speed = 460800
pin = 6594
include = /etc/kannel/modems.conf

#AUTO_CONF
#group = smsc
#smsc = at
#modemtype = auto
#device=/dev/ttyACM0
#my-number = 254725529969
#connect-allow-ip = 127.0.0.1
#log-level = 0

# SMSBOX SETUP

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/var/log/smsbox.log"
log-level = 0
access-log = "access.log"


# 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"


# SERVICES

group = sms-service
keyword = nop
text = "You asked nothing and I did it!"

# this service is for Kannel relay testing, when this Kannel
# works as relay gateway

group = sms-service
keyword = relay
get-url = "http://localhost:15130/sms?user=kannel&pass=rL4y&from=%p&to=%P&text=%r"
max-messages = 0


# there should be default always

group = sms-service
keyword = default
text = "No service specified"

#
# DLR with MySQL support configuration
#
# Example defining a MySQL database connection resource and
# the required table and field values.
#

group = mysql-connection
id = mydlr
host = localhost
username = root
password = "xxxxxx"
database = kannel
# max count of connections that will be opened for dbpool
# default is 1
max-connections = 1

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


#Modem Detection
group = modems
id = sonyericsson_k800
name = "Sony Ericsson K800"
detect-string = "Sony Ericsson"
detect-string2 = "K800"
init-string = "AT+CNMI=2,3"
#message-storage = "SM"
enable-mms = true

#Modem Detection
group = modems
id = nokia_6610
name = "Nokia 6610"
detect-string = "Nokia"
detect-string2 = "6610"
init-string = "AT+CNMI=1,2,0,1,0"
message-storage = "SM"
enable-mms = true





-------- modems.conf ---------------


# Modems configuration
#
# Example and default values
#
# group = modems
# id = "my-id"
# name = "my-name"
# detect-string = "MODEM"
# detect-string2 = "" [Default]
# init-string = "AT+CNMI=1,2,0,0,0" [Default]
# speed = 9600 [Default]
# enable-hwhs = "AT+IFC=2,2" [Default]
# need-sleep = false [Default]
# no-pin = false [Default]
# no-smsc = false [Default]
# sendline-sleep = 100 [Default, miliseconds]
# keepalive-cmd = "AT" [Default]
# broken = false [Default]
# message-storage = "SM"
# enable-mms = false [Default]


# If modemtype=auto, try everyone and defaults to this one
group = modems
id = generic
name = "Generic Modem"

group = modems
id = wavecom
name = Wavecom
detect-string = "WAVECOM"

group = modems
id = premicell
name = Premicell
detect-string = "PREMICEL"
no-pin = true
no-smsc = true

group = modems
id = siemens_tc35
name = "Siemens TC35"
detect-string = "SIEMENS"
detect-string2 = "TC35"
init-string = "AT+CNMI=1,2,0,1,1"
speed = 19200
enable-hwhs = "AT\\Q3"
need-sleep = true

group = modems
id = siemens_m20
name = "Siemens M20"
detect-string = "SIEMENS"
detect-string2 = "M20"
speed = 19200
enable-hwhs = "AT\\Q3"
keepalive-cmd = "AT+CBC;+CSQ"
need-sleep = true

group = modems
id = siemens_sl45
name = "Siemens SL45"
detect-string = "SIEMENS"
detect-string2 = "SL45"
init-string = "AT+CNMI=1,2,2,2,1"
keepalive-cmd = "AT+CBC;+CSQ"
speed = 19200
enable-hwhs = "AT\\Q3"
need-sleep = true
message-storage = "SM"

group = modems
id = nokiaphone
name = "Nokia Phone"
detect-string = "Nokia Mobile Phone"
need-sleep = true
keepalive-cmd = "AT+CBC;+CSQ"
enable-mms = true

group = modems
id = falcom
name = "Falcom"
detect-string = "Falcom"
#no-smsc = true

group = modems
id = ericsson_r520m
name = "Ericsson R520m"
detect-string = "R520m"
init-string = "AT+CNMI=3,2,0,0"

group = modems
id = ericsson_t68
name = "Ericsson T68"
detect-string = "T68"
init-string = "AT+CNMI=3,3"
keepalive-cmd = "AT+CBC;+CSQ"
broken = true

group = modems
id = sonyericsson_gr47
name = "Sony Ericsson GR47"
detect-string = "GR47"
message-storage = "ME"
# use this init-string for non sim-buffering
init-string = "AT+CNMI=3,2,0,0"
# use this init-string for sim-buffering
#init-string = "AT+CNMI=3,1,0,0"
reset-string = "ATZ"
broken = true

group = modems
id = alcatel
name = "Alcatel"
detect-string = "Alcatel"
init-string = "AT+CNMI=3,2,0,0"

group = modems
id = sonyericsson_T630-T628
name = "Sony Ericsson T630-T628?
init-string = "AT+CNMI=2,3,2,0,0;+CMGF=0?
keepalive-cmd = "AT+CBC;+CSQ;+CMGF=0?
broken = true

No comments:

Post a Comment