Hi,
please excuse me if this is not the right place to post as it is the first time I ask for help on Kannel.
I work for a telecom operator and we've been using Kannel as a Wap gateway for the last 12 months.
As you know, we have to archive all internet access for security reasons.
As I looked inside the Kannel source, I found that Kannel should log these access in the access-log file through the alog function.
This feature is not working properly on my installation.
"Log begins" and "Log ends" messages appear properly in the file, but when the alog function is called in the rest of the program, it doesn't print anything.
By testing a little, I found that the file descriptor used to write to access-log is NULL (in alog function when called from return_reply in wap-appl.c), so nothing is written.
It looks like this file is closed and reopened for the "Log ends" message.
I have made a temporary workaround by printing a debug message (trough debug function) with the client IP and the Url. This message goes to wapbox.log.
For maintenance reasons, I would prefer to work with an unmodified version of Kannel, so I'd rather have this feature working.
I have not worked in C for quite a while, so I am a bit stuck with that problem, and I suspect this is related to my installation, rather than to the software itself.
Do I need specific libraries to make it work ?
Please don't hesitate to ask for more testing as this question is of legal matter and I need to fix it.
--------------------------------------------------
Technical infos :
system is Fedora Core 3 fully updated with yum
Kannel has been recompiled from source
all libxml2 libs (std + devel) are installed.
[EMAIL PROTECTED] tmp]# rpm -qa | grep libxml
perl-libxml-perl-0.07-30
libxml2-python-2.6.16-3
libxml2-devel-2.6.16-3
perl-libxml-enno-1.02-31
libxml2-2.6.16-3
[EMAIL PROTECTED] tmp]# uname -a
Linux WAPGW 2.6.12-1.1381_FC3smp #1 SMP Fri Oct 21 04:03:26 EDT 2005 i686 i686 i386 GNU/Linux
Below is the content of access.log (Test lines are from debugging points I have added)
2006-06-14 10:22:04 Log begins
2006-06-14 10:22:04 Test stephane log_open
2006-06-14 10:24:36 Log ends
2006-06-14 10:24:36 Test stephane log_close
Below is an extract from wapbox.log
Added lines (Before and after alog and NULL DESCRIPTOR) are my debugging points.
"Before ..." and "After ..." messages are in wap-appl.c just before and after call to alog.
"NULL DESC..." message is inside alog function where (file == NULL) is true.
2006-06-14 10:24:13 [8687] [17] DEBUG: data: 45 45 3c 2f 61 3e 0a 20 20 20 20 20 20 20 20 20 EE</a>.
2006-06-14 10:24:13 [8687] [17] DEBUG: data: 20 20 20 20 20 20 20 3c 62 72 2f 3e 0a 20 20 20 <br/>.
2006-06-14 10:24:13 [8687] [17] DEBUG: data: 20 20 20 20 20 20 20 20 20 3c 2f 70 3e 0a 20 20 </p>.
2006-06-14 10:24:13 [8687] [17] DEBUG: data: 20 20 20 20 20 20 3c 2f 63 61 72 64 3e 0a 20 20 </card>.
2006-06-14 10:24:13 [8687] [17] DEBUG: data: 20 20 3c 2f 77 6d 6c 3e 0a </wml>.
2006-06-14 10:24:13 [8687] [17] DEBUG: Octet string dump ends.
2006-06-14 10:24:13 [8687] [9] INFO: Before alog in return_reply
2006-06-14 10:24:13 [8687] [9] DEBUG: DESCRIPTEUR NULL
2006-06-14 10:24:13 [8687] [9] INFO: After alog in return_reply
2006-06-14 10:24:13 [8687] [9] DEBUG: get_cookies: End
2006-06-14 10:24:13 [8687] [9] DEBUG: WSP: Converting from <text/vnd.wap.wml> to <application/vnd.wap.wmlc>
2006-06-14 10:24:13 [8687] [9] DEBUG: WBXML: Encoding with wbxml version <1.3>
2006-06-14 10:24:13 [8687] [9] DEBUG: WBXML: WML with ExternalID <-//WAPFORUM//DTD WML 1.3//EN>
2006-06-14 10:24:13 [8687] [9] DEBUG: WSP: Content-type is now <application/vnd.wap.wmlc>, size 133 bytes (before: 530 bytes), content body is:
Below is kannel config file
#
# SAMPLE CONFIGURATION FOR KANNEL PPG (PUSH OVER SMS)
#
# It is run like this:
#
# 1% gw/bearerbox gw/pushkannel.conf
# 2% gw/wapbox gw/pushkannel.conf
#
# Boys and girls: use more complex passwords when setting up real services,
# this is an *example* file !
#
# Aarno Syvänen in August 2001, for Wiral Ltd
# BEARERBOX SETUP, for Kannel core operations
group = core
admin-port = 13000
smsbox-port = 13001
wapbox-port = 13002
admin-password = ****
#status-password = *****
#admin-deny-ip = ""
#admin-allow-ip = ""
wdp-interface-name = "*"
log-file = "/tmp/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
#unified-prefix = "+358,00358,0;+,00"
access-log = "/tmp/access.log"
#access-log-clean = false
store-file = "/tmp/kannel.store"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
#ssl-certkey-file = "mycertandprivkeyfile.pem"
http-proxy-host = "127.0.0.1"
http-proxy-port = 3130
# WAPBOX SETUP, for pushing and for pulling (fetching) the wap data
group = wapbox
bearerbox-host = localhost
log-file = "/tmp/wapbox.log"
log-level = 0
#syslog-level = debug
syslog-level = none
map-url-max = 2
map-url-0 = "http://172.24.*.* http://0.0.0.0"
smart-errors = true
# RADIUS SETUP
group = radius-acct
secret-nas = radius
remote-host = 172.24.97.1
secret-radius = test-secret-gtw-bkp
# PPG CORE SETUP, for defining the push request interface
group = ppg
ppg-url = "">
ppg-port = 8080
#ppg-ssl-port = 8081
concurrent-pushes = 100
trusted-pi = true
users = 1024
#ppg-deny-ip = "*.*.*.*"
ppg-allow-ip = "*.*.*.*"
#ssl-server-cert-file = "cert.pem"
#ssl-server-key-file = "key.pem"
# PPG USER SETUP, for authorizing a specific push user
group = wap-push-user
wap-push-user = foo
ppg-username = ppg-user
ppg-password = ppg-user
#country-prefix = +358
#allowed-prefix = "40;60;70"
#denied-prefix = 50
#white-list = http://localhost:8082/whitelist
#black-list = http://localhost:8082/blacklist
#deny-ip = "*.*.*.*"
#allow-ip = "127.0.0.1"
# Connection vers le SMSC
group = smsc
smsc = smpp
smsc-id = OPT-SMSC
host = 163.176.17.232
port = 6200
smsc-username = "KANNEL-WG"
smsc-password = *******
system-type = "SMPP"
transceiver-mode = true
# SMSBOX SETUP (a kludge!)
group = smsbox
bearerbox-host = localhost
sendsms-port = 9081
sendsms-url = "">
sendota-url = "">
#global-sender = 13013
#sendsms-chars = "0123456789 +-"
log-file = "/tmp/smsbox.log"
log-level = 0
access-log = "/tmp/smsaccess.log"
# SMS SERVICE (TEST)
group = sms-service
keyword = www
text = "TEST KANNEL SMSGW OK"
# OTA SETTINGS
group = ota-setting
location = http://wap.opt.nc
service = "Portail OPT WAP"
ipaddress = 172.24.97.5
phonenumber = 360101
bearer = data
calltype = analog
pppsecurity = off
connection = cont
authentication = normal
login = wap
secret = password
group = sendsms-user
username = otauser
password = otauser
forced-smsc = TEST-HTTP
# SENDSMS USER (SMSBOX USERS ??)
group = sendsms-user
username = "sendsmsuser"
password = "sendsmsuser"
name = "name-of-sendsms-usr"
forced-smsc = OPT-SMSC
Thank you for your attention and have a nice day.
Stephane MESSUD
OPT-NC
