hi, i found that i couldn't get the destination number, so i'm parsing it out of the logs in my php script to stitch messages together:

    function getDestination()
    {
        $id = $_GET['id'];
return trim(shell_exec('egrep "'.$id.'" /tmp/access.log | sed "s/.*to:\+\([0-9]*\).*/+\1/g"'));
    }

in this case i've passed the 'message id' into my log format using:

access-log-format= "%I %t %l [SMSC:%i] [SVC:%n] [ACT:%A] [BINF:%B] [from:%p] [to:%P] [flags:%m:%c:%M:%C:%d] [msg:%L:%b] [udh:%U:%u]"

then i pass the same 'message id' into my script which does the stitching:

get-url = "http://HOST/concatenate_mo.php?from=%p&to=%Q&msg=%a&udh=%u&id=%I";

massive hack, but it works :)

cheers

iain

On Thu, 27 Mar 2008, Luis Valencia wrote:

Hi Illimar and everybody,

Im having the same need, I already try the inotify suggested before but I
cant make it work.

Have you found a solution? Can you share it please

Luis Valencia

-----Original Message-----
From: Illimar Reinbusch - Telejazz.com [mailto:[EMAIL PROTECTED]
Sent: Jueves, 13 de Marzo de 2008 03:57 a.m.
To: users@kannel.org
Subject: Parsing access.log

Hi

Has anyone done parsing access.log to somekind database, for example MySQL?
I would need allmost realtime access to logs, to see if everything is
working perfcetly,
mainly needed by my supervisors for statistics and billing purposes.

Thanks,
Illimar





Reply via email to