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@abc.com    sip:100@abc.com      2017-07-28 18:29:14          2017-07-28 18:29:14       yes               no
    2            sip:2@abc.com    sip:100@abc.com      2017-07-28 18:29:14          2017-07-28 18:29:14       no                 yes
    3            sip:3@abc.com    sip:100@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