thedevtips

Navigation

Recent site activity

Home‎ > ‎

kannel

Installing kannel under cygwin


start the setup of cygwin and install
  • libxml (something like that)
  • make (something like that)
  • gcc c compiler (something like that)
# tar xvfz <xmllib tarfile>
# cd <xmllib directory>
# ./configure ; make ; make install

# tar xvfz <kannel tarfile>
# ./configure --prefix=<the directory you wanna install kannel in>
# touch .depend
# make depend
# make
# make install

shell> /usr/sbin/bearerbox /usr/local/kannel/etc/kannel.conf &
shell> /usr/sbin/smsbox /usr/local/kannel/etc/kannel.conf &
shell> /usr/sbin/wapbox /usr/local/kannel/etc/kannel.conf &
shell> tail -f /usr/local/kannel/log/synchronica.log

Example kannel.conf for mobile phone


group = core
admin-port = 13000
smsbox-port = 13001
wapbox-port = 13002
admin-password = bar
log-file = "/usr/local/kannel/log/kannel.log"
log-level = 0
#box-deny-ip = "*.*.*.*"
#box-allow-ip = "127.0.0.1"
unified-prefix = "00358,0"
dlr-storage = internal

# WAPBOX SETUP, for pushing and for pulling (fetching) the wap data
group = wapbox
bearerbox-host = localhost
log-file = "/usr/local/kannel/log/wapbox.log"
syslog-level = none

# PPG CORE SETUP, for defining the push request interface

group = ppg
ppg-smsbox-id = dlrbox
service-name = ppg
ppg-url = /wappush
ppg-port = 8380
concurrent-pushes = 100
trusted-pi = false
global-sender = 5040
users = 1024
ppg-allow-ip = "*.*.*.*"

# PPG USER SETUP, for authorizing a specific push user

group = wap-push-user
wap-push-user = foo
ppg-username = foo
ppg-password = bar
forced-smsc = testsmsc

############

# SMSC CONNECTIONS

group = smsc
smsc = at
smsc-id = testsmsc
modemtype = auto
device = /dev/ttyS0
speed = 9600
log-file = /usr/local/kannel/log/phone.log
#sms-center = +972543784837
##my-number = +972544374387


# SMSBOX SETUP

group = smsbox
bearerbox-host = localhost
sendsms-port = 13013
global-sender = 5040
log-file = "/usr/local/kannel/log/smsbox.log"
access-log = "/usr/local/kannel/log/access.log"


# SEND-SMS USERS

group = sendsms-user
username = tester
password = foobar
max-messages = 5
concatenation = true
#faked-sender = 5040

# 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

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

# there should be default always

group = sms-service
keyword = default
#keyword = start
get-url = http://somehost:8080/somelocation?msisdn=%p&text=%a
assume-plain-text = true
accept-x-kannel-headers = true
max-messages = 5
concatenation = true
omit-empty = true

group = modems
id = nokiaphone
name = "Nokia"
detect-string = "Nokia"
message-storage = "ME"
#Use this if sim-buffering = true
init-string = "AT+CNMI=1,2,0,0,1"
#Use this if sim-buffering = false
#init-string = "AT+CNMI=3,2,0,0"
reset-string = "ATZ"
broken = true

Install kannel under ubuntu


> apt-get install build-essential
> apt-get install libxml2-dev
> wget http://www.kannel.org/download/1.4.2/gateway-1.4.2.tar.gz
> tar xvfz gateway-1.4.2.tar.gz
> cd gateway-1.4.2
> ./configure
> make
> make install


Test Kannel

in your home directory
> mkdir kannel
> vi kannel.conf
> paste the example kannel.conf in this page
> :wq
> bearerbox kannel.conf &
> smsbox kannel.conf &
http://localhost:13013/cgi-bin/sendsms?username=tester&password=foobar&to=0123456&text=Hello+world