#
# THIS IS A SAMPLE CONFIGURATION FOR SMS KANNEL
#
# This basic version is used for system testing. It expects 'fakesmsc' to
# send messages which are replied with simple fixed text message.
# It is run like this:
#
#  1% gw/bearerbox gw/smskannel.conf
#  2% gw/smsbox gw/smskannel.conf
#  3% test/fakesmsc -i 0.1 -m 100 "123 345 text nop"
#
# ..all 3 commands in separate shells (or screen sessions)
# Note that you can run them in different machines but have to
# add certain command line argument and configuration variables then
#
#
# 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
#
# Kalle Marjola for Kannel project 2001, 2004

#---------------------------------------------
# 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
#admin-deny-ip = ""
#admin-allow-ip = ""
log-file = "/tmp/kannel.log"
log-level = 0
#box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#dlr-storage = mysql
#unified-prefix = "+358,00358,0;+,00"
access-log = "/tmp/access.log"
store-file = "kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"

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


# This is a fake smsc connection, _only_ used to test the system and services.
# It really cannot relay messages to actual handsets!
# This is Matrix GSM MODEM Used as SMSC

group = smsc
smsc = at
host=localhost
#modemtype = auto
port=13013
modemtype=simcom_ltd
smsc-id = BSNL
device = /dev/ttyS0
speed = 115200
#BSNL
my-number ="+919790335856"
sms-center = "+919417099997"


#Modem Configuration-modem definations

group = modems
id = generic
name = "Generic Modem"

#group = modems
#id = simcom_ltd
#name = simcom
#detect-string = "simcom"
#enable-hwhs = "AT"
#init-string = "ATZ^M"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
#init-string="AT+CNMI=1,2,0,1,0;+CMEE=1"
#init-string = "AT+CNMI=1,2,0,1,0;+CMGF=0;+CMEE=1;AT+CMGF=1;"
#message-storage = SM
#Pme = simcom
#detect-string = "simcom"
#enable-hwhs = "AT"
#init-string = "ATZ^M"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
#init-string = "AT+CNMI=2,1,0,1,0;+CMGF=0;+CMEE=1;AT+CMGF=1;"
#message-storage = SM
#PARA TEST:
#keepalive-cmd = AT+CSQ
#reset-string = AT+CFUN=1
#reset-string =AT+CMGF=1
#init-string = "ATE0V1;AT &C1 &D2 S0=0"
#name = "matrix"
#detect-string = "matrix"
#init-string = "ATZ<cr>"
#init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"


group = modems
id = simcom_ltd
name = simcom
detect-string = Modem
enable-hwhs = "AT"
init-string = "AT+CNMI=2,1,0,1,1;+CMGF=0;+CPIN?;+CREG?;+COPS?;+CSCA?;+CPMS?;+CPBR=?;+CMEE=2;"
message-storage = SM
# PARA TEST:
keepalive-cmd = AT+CSQ
#reset-string = AT+CFUN=1







#---------------------------------------------
# SMSBOX SETUP
##
# Smsbox(es) do higher-level SMS handling after they have been received from
                                                             
#ARA TEST:
#keepalive-cmd = AT+CSQ
#reset-string = AT+CFUN=1

##rohit old conf 
#group = modems
#id = SIMCOM_SIM300
#name = SIMCOM_SIM300
#detect-string = "SIMCOM_SIM300"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"

##temp conf
#init-string = "ATE0V1;AT &C1 &D2 S0=0"
#name = "matrix"
#detect-string = "matrix"
#init-string = "ATZ<cr>"
#init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"

#group = modems
#id = simcom_ltd
#name = simcom
#detect-string = "simcom"
#enable-hwhs = "AT"
#init-string = "ATZ^M"
#init-string = "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
#init-string = "AT+CNMI=2,1,0,1,0;+CMGF=0;+CMEE=1;AT+CMGF=1;"
#message-storage = SM
#PARA TEST:
#keepalive-cmd = AT+CSQ
#reset-string = AT+CFUN=1
#reset-string =AT+CMGF=1
#init-string = "ATE0V1;AT &C1 &D2 S0=0"
#name = "matrix"
#detect-string = "matrix"
#init-string = "ATZ<cr>"
#init-string = "AT S7=45 S0=0 L1 V1 X4 &c1 E1 Q0"
#
#---------------------------------------------
# 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
bearerbox-host = 127.0.0.1
#bearerbox-port = 13001
sendsms-port = 13013
global-sender = 13013
sendsms-chars = "0123456789 +-"
log-file = "/tmp/smsbox.log"
log-level = 0
access-log = "/tmp/access.log"




#---------------------------------------------
# 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://kannel.machine:13013/cgi-bin/sendsms?username=tester&password=foobar...

group = sendsms-user
username = tester
password = foobar
#user-deny-ip = ""
#user-allow-ip = ""

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

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

# There should be always a 'default' service. This service is used when no
# other 'sms-service' is applied.

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

#For MYSQL Connection configuration

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


# 
# Create the required table for the DLR support in the database 
# with something similar like this: 
# 
#   CREATE TABLE dlr (
#     smsc varchar(40),
#     ts varchar(40),
#     destination varchar(40),
#     source varchar(40),
#     service varchar(40),
#     url varchar(255),
#     mask int(10),
#     status int(10),
#     boxc varchar(40)
#   )
#

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


