<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body 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="moz-cite-prefix">Am 05.09.19 um 03:06 schrieb Anuran Barman:<br>
</div>
<blockquote type="cite" cite="mid:CABFEs=ZiZp30F+cbzcEM2tWqp34UKgUBMJ3m+n=j5x9xyjKpng@mail.gmail.com">
<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" moz-do-not-send="true">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_-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" moz-do-not-send="true">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_-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_-9102471885064429771gmail-m_-3060693611907365627mimeAttachmentHeader">
</fieldset>
<pre class="m_-9102471885064429771gmail-m_-3060693611907365627moz-quote-pre">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a class="m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="m_-9102471885064429771gmail-m_-3060693611907365627moz-signature" cols="72">-- 
Henning Westerholt - <a class="m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_-9102471885064429771gmail-m_-3060693611907365627moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</blockquote>
<pre class="m_-9102471885064429771moz-signature" cols="72">-- 
Henning Westerholt - <a class="m_-9102471885064429771moz-txt-link-freetext" href="https://skalatan.de/blog/" target="_blank" moz-do-not-send="true">https://skalatan.de/blog/</a>
Kamailio services - <a class="m_-9102471885064429771moz-txt-link-freetext" href="https://skalatan.de/services" target="_blank" moz-do-not-send="true">https://skalatan.de/services</a></pre>
</div>
</blockquote>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</body>
</html>