<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>using xlog() and relying on syslog for writing is a good
      solution.</p>
    <p>Is the CALL-ID in your example an auto-increment or should be the
      value of Call-ID SIP header?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 31.07.17 18:56, amit Kumar wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOtn_dVUw9yy-SBUQJOqQQ98T0iBUdapPv4mGEja79DijXkj8w@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div>Hi Developers,<br>
            <br>
          </div>
          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.<br>
          <br>
        </div>
        <div>For example:<br>
          <br>
        </div>
        <div>CALL-ID               TO                   
          FROM                    START TIME                      END
          TIME  ....        MISSED    COMPLETED<br>
        </div>
        <div>    1            <a href="mailto:sip%3A1@abc.com"
            moz-do-not-send="true">sip:1@abc.com</a>    <a
            href="mailto:sip%3A100@abc.com" moz-do-not-send="true">sip:100@abc.com</a>     
          2017-07-28 18:29:14          2017-07-28 18:29:14      
          yes               no<br>
        </div>
        <div>    2            <a href="mailto:sip%3A2@abc.com"
            moz-do-not-send="true">sip:2@abc.com</a>    <a
            href="mailto:sip%3A100@abc.com" moz-do-not-send="true">sip:100@abc.com</a>     
          2017-07-28 18:29:14          2017-07-28 18:29:14      
          no                 yes <br>
              3            <a href="mailto:sip%3A3@abc.com"
            moz-do-not-send="true">sip:3@abc.com</a>    <a
            href="mailto:sip%3A100@abc.com" moz-do-not-send="true">sip:100@abc.com</a>     
          2017-07-28 18:29:14          2017-07-28 18:29:14      
          no                 yes<br>
          <br>
        </div>
        <div>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.<br>
        </div>
        <div>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 <br>
          <br>
        </div>
        <div>For ex.<br>
        </div>
        <div>$avp(from)=$fu;<br>
          $avp(to)=$tu;<br>
        </div>
        <div>$avp(starttime)=startime<br>
        </div>
        <div>$avp(endtime)=endtime<br>
        </div>
        <div>etc...<br>
          <br>
        </div>
        <div>//log at call end in a seperate logs file <br>
        </div>
        <div>and
          xlog("LOG_INFO",$avp(from),,$avp(to),$avp(starttime),$avp(endtime))<br>
          <br>
        </div>
        <div>Please let know if this approach is correct or any other
          way to achieve this,<br>
        </div>
        <div><br>
        </div>
        <div>Thanks,<br>
        </div>
        <div>Amit<br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>