<div><div dir="auto">A CONNECTED call is:</div><div dir="auto"><br></div><div dir="auto">$rs=200 & is_method(“INVITE”)</div></div><div dir="auto"><br></div><div dir="auto">Anything $rs>200 is a not connected call.</div><div dir="auto"><br></div><div dir="auto">This is only valid when $rs is set.</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 Sep 2019 at 12:44, Anuran Barman <<a href="mailto:anuranbarman@gmail.com">anuranbarman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">No i need it for simple logging only. With your suggestion i was able to hook into missed calls with $rr and $rs. Just wondering if $rr=OK and $rs=200 will mean accepted call or not?</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 Sep 2019 at 5:12 PM, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div dir="auto">Just curious, do you need this info for statistical purposes? In terms of call quality, etc? Because if so, you might want to think about implementing homer.</div></div><div dir="auto"><div dir="auto"><br></div><div><a href="https://github.com/sipcapture/homer/wiki/Quick-Install" target="_blank">https://github.com/sipcapture/homer/wiki/Quick-Install</a></div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 Sep 2019 at 08:35, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Anuran,</p>
<p>not sure if I understood you correctly. In your case the 486 is the reply to the CANCEL, and you already got this status code.</p>
<p>You can get the status of an reply e.g. in a onreply_route with the pseudo-variable "$rs". About the reason in the reply, this is available with the pv "$rr".</p>
<p>About the last question - the Reason header in the CANCEL request - this could be read with the pv $hdr(Reason).</p>
<p>You can also add pseudo-variables to the extra accounting in the acc module cfg, then it will log them (if available) during the normal accounting log.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234moz-cite-prefix">Am 05.09.19 um 03:06 schrieb Anuran Barman:<br>
</div></div><div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div>
<div dir="auto">Yes i was following that path only. So i have noticed that if A calls B and cancels it while ringing Kamailio logs it as misscall. The log says its 486 status code with Reason being "Request Cancellation". So in the request_route I am hooking
 to CANCEL method but I am not able to get the status code. From the cookbook i saw there is a variable named "status" but it does not give what I need as it seems from the documentation. How can get the status of the CANCEL method? </div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Or how can i get the Reason of CANCEL method. As its a String and never gonna change I can do string comparison with this but cookbook does not say anything about getting the Reason. Is it possible to get the reason?</div>
<div><br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Thu, 5 Sep 2019 at 2:14 AM, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello Anuran,</p>
<p>first you can also try it with simple acc logging to the kamailio log file. This is maybe easier for a start to see how its working. So there is no need to enable WITH_ACCDB. So bascially it works like this that you set the appropriate flags and then the
 acc module will account the call.<br>
</p>
<p>Have a look to your kamailio log, there should be some entries from the acc module after you placed a test call.</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771moz-cite-prefix">Am 04.09.19 um 08:57 schrieb Anuran Barman:<br>
</div>
</div>
<div text="#000000" bgcolor="#FFFFFF">
<blockquote type="cite">
<div dir="ltr">So I need to enable WITH_ACCDB so that it can alter the database table as it seems. I enabled this and restarted kamailio but it is not logging the misscall in the "acc" or "missed_calls" tables. In the config file there is something like this,<br>
$avp(oexten) = $rU;<br>
        if (!lookup("location")) {<br>
                $var(rc) = $rc;<br>
                route(TOVOICEMAIL);<br>
                t_newtran();<br>
                switch ($var(rc)) {<br>
                        case -1:<br>
                        case -3:<br>
                                send_reply("404", "Not Found");<br>
                                exit;<br>
                        case -2:<br>
                                send_reply("405", "Method Not Allowed");<br>
                                exit;<br>
                }<br>
        }<br>
<br>
        # when routing via usrloc, log the missed calls also<br>
        if (is_method("INVITE")) {<br>
                setflag(FLT_ACCMISSED);<br>
<div>        }</div>
<div><br>
</div>
<div>but I am not able to understand what it's doing. How can I get the missed calls logs? </div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2019 at 12:07 PM Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Anuran,</p>
<p>you are probably want to look into the "acc" accounting module. The default cfg already has some code for this. It can account e.g. succesful and failed calls.<br>
</p>
<p>Cheers,</p>
<p>Henning<br>
</p>
<div class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-cite-prefix">Am 03.09.19 um 06:36 schrieb Anuran Barman:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi,
<div>I want to show call logs in my SIP app. How can I do this with Kamailio? I want to do it from the
<b>kamailio.cfg </b>file. Is it possible to do it from where? I guess Dialog module should be used for this, but can not figure out how to do it. I want minimalist feature like who call whom with timestamp, thats all. How can I do this?</div>
</div>
<br>
<fieldset class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627mimeAttachmentHeader">
</fieldset>
<pre class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-signature" cols="72">-- 
Henning Westerholt - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771moz-signature" cols="72">-- 
Henning Westerholt - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234m_-9102471885064429771moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234moz-signature" cols="72">-- 
Henning Westerholt - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_-4899015344932850577m_7322015011586639263m_3538621050345163234moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank">https://skalatan.de/services</a></pre>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="m_-4899015344932850577m_7322015011586639263gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>
</blockquote></div></div>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>