Hi,
I tried both modifications separately and at the same time, with no result.
I removed nearly everything from the config file. No result again.
I finally added an access-log directive to the wapbox group and it works ...
so my current config file looks like this :
#
# CONFIGURATION FOR KANNEL
#
# BEARERBOX SETUP, for Kannel core operations
group = core
admin-port = 13000
wapbox-port = 13002
admin-password = xxxxxx
wdp-interface-name = "*"
log-file = "/tmp/bearerbox.log"
log-level = 0
box-deny-ip = "*.*.*.*"
box-allow-ip = "127.0.0.1"
access-log = "/tmp/access.log"
store-file = "/tmp/kannel.store"
# WAPBOX SETUP
group = wapbox
bearerbox-host = localhost
log-file = "/tmp/wapbox.log"
log-level = 0
syslog-level = 1
smart-errors = true
access-log = "/tmp/wapaccess.log"
The last line is the added line, and the result in wapaccess.log is correct :
2006-06-14 13:56:51 Log begins
2006-06-14 13:56:51 Test stephane log_open
2006-06-14 13:57:27 10.153.254.253 GET <http://wap.opt.nc/> (text/vnd.wap.wml, charset='') 531 200 <SAGEM-myX-8/1.0 UP.Browser/6.2.3.3.g.1 (GUI) MMP/2.0> <Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7a PHP/5.0.3>
2006-06-14 13:57:31 10.153.254.253 GET <http://wap.opt.nc/images/optnb.wbmp> (image/vnd.wap.wbmp, charset='') 304 200 <SAGEM-myX-8/1.0 UP.Browser/6.2.3.3.g.1 (GUI) MMP/2.0> <Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7a PHP/5.0.3>
Just for info, the version used is the stable 1.4.0 downloaded from Kannel website.
I have used the map-url directive to prevent users from obtaining data from Kannel's local network (172.24.xxxx).
I have seen a new directive for that but couldn't find infos on Kannel website.
Also, the HTTP proxy is there for new mobile that runs directly in HTTP.
I thought that Kannel HTTP access might profit from it to give a better data flow for our mobile users, but frankly I have not benchmarked anything.
Thanks again for your help (and for Kannel)
Have a nice day
Stéphane
-----Message d'origine-----
De: Stipe Tolj [SMTP:[EMAIL PROTECTED]
Date: mercredi 14 juin 2006 11:43
À: MESSUD Stéphane
Objet: Re: Problem : logging wap access to access-log
Hi Stephane,
I'll try to guide.
[EMAIL PROTECTED] wrote:
> 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
seems all reasonable, so nothing that may impat this... But I have 2 assumtions
where the problem may come along:
> 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
1) the http-proxy-[host|port] directives. This was intentionally to generaly
configure a HTTP proxy to use for any HTTP client calls, which wapbox of course
does for the WAP request.
Try to deactivate this in the config and re-try to see if you get entries in
wapaccess.log.
> # 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
2) strange map-url-0 here. A HTTP client call to 0.0.0.0? Hmmm... Try to comment
out the mapping directives and the smart-errors directive too and re-try to see
if you get valiud entries in wapaccess.log.
The rest of the config seems ok from the first review.
Stipe
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany
tolj.org system architecture Kannel Software Foundation (KSF)
http://www.tolj.org/ http://www.kannel.org/
mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------
