[SR-Users] Need help to log the call trace/flow in file

amit Kumar tomar.iitr at gmail.com
Mon Jul 31 18:56:55 CEST 2017


Hi Developers,

I need help to log the call flow in a file. Our purpose to have only one
entry per call in a file based system at the end of the call.

For example:

CALL-ID               TO                    FROM                    START
TIME                      END TIME  ....        MISSED    COMPLETED
    1            sip:1 at abc.com    sip:100 at abc.com      2017-07-28
18:29:14          2017-07-28 18:29:14       yes               no
    2            sip:2 at abc.com    sip:100 at abc.com      2017-07-28
18:29:14          2017-07-28 18:29:14       no                 yes
    3            sip:3 at abc.com    sip:100 at abc.com      2017-07-28
18:29:14          2017-07-28 18:29:14       no                 yes

I have gone through various trace module, but its appear that all module
record the call flow/logs in database. ie siptrace,acc,dialoge module.
Could you please help me to log the information. one of the approach I have
thought to store all the variable in AVP variables in
request_route,failure_route,on_reply route..etc

For ex.
$avp(from)=$fu;
$avp(to)=$tu;
$avp(starttime)=startime
$avp(endtime)=endtime
etc...

//log at call end in a seperate logs file
and xlog("LOG_INFO",$avp(from),,$avp(to),$avp(starttime),$avp(endtime))

Please let know if this approach is correct or any other way to achieve
this,

Thanks,
Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170731/82ad2b8e/attachment.html>


More information about the sr-users mailing list