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

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 1 08:35:24 CEST 2017


Hello,

using xlog() and relying on syslog for writing is a good solution.

Is the CALL-ID in your example an auto-increment or should be the value
of Call-ID SIP header?

Cheers,
Daniel


On 31.07.17 18:56, amit Kumar wrote:
> 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 <mailto:sip%3A1 at abc.com>   
> sip:100 at abc.com <mailto:sip%3A100 at abc.com>      2017-07-28
> 18:29:14          2017-07-28 18:29:14       yes               no
>     2            sip:2 at abc.com <mailto:sip%3A2 at abc.com>   
> sip:100 at abc.com <mailto:sip%3A100 at abc.com>      2017-07-28
> 18:29:14          2017-07-28 18:29:14       no                 yes
>     3            sip:3 at abc.com <mailto:sip%3A3 at abc.com>   
> sip:100 at abc.com <mailto:sip%3A100 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
>
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170801/a93645ea/attachment.html>


More information about the sr-users mailing list