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.

https://github.com/sipcapture/homer/wiki/Quick-Install


On Thu, 5 Sep 2019 at 08:35, Henning Westerholt <h...@skalatan.de> wrote:

> Hello Anuran,
>
> 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.
>
> 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".
>
> About the last question - the Reason header in the CANCEL request - this
> could be read with the pv $hdr(Reason).
>
> 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.
>
> Cheers,
>
> Henning
> Am 05.09.19 um 03:06 schrieb Anuran Barman:
>
> 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?
>
> 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?
>
> On Thu, 5 Sep 2019 at 2:14 AM, Henning Westerholt <h...@skalatan.de> wrote:
>
>> Hello Anuran,
>>
>> 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.
>>
>> Have a look to your kamailio log, there should be some entries from the
>> acc module after you placed a test call.
>>
>> Cheers,
>>
>> Henning
>> Am 04.09.19 um 08:57 schrieb Anuran Barman:
>>
>> 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,
>> $avp(oexten) = $rU;
>>         if (!lookup("location")) {
>>                 $var(rc) = $rc;
>>                 route(TOVOICEMAIL);
>>                 t_newtran();
>>                 switch ($var(rc)) {
>>                         case -1:
>>                         case -3:
>>                                 send_reply("404", "Not Found");
>>                                 exit;
>>                         case -2:
>>                                 send_reply("405", "Method Not Allowed");
>>                                 exit;
>>                 }
>>         }
>>
>>         # when routing via usrloc, log the missed calls also
>>         if (is_method("INVITE")) {
>>                 setflag(FLT_ACCMISSED);
>>         }
>>
>> but I am not able to understand what it's doing. How can I get the missed
>> calls logs?
>>
>> On Tue, Sep 3, 2019 at 12:07 PM Henning Westerholt <h...@skalatan.de>
>> wrote:
>>
>>> Hello Anuran,
>>>
>>> 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.
>>>
>>> Cheers,
>>>
>>> Henning
>>> Am 03.09.19 um 06:36 schrieb Anuran Barman:
>>>
>>> Hi,
>>> I want to show call logs in my SIP app. How can I do this with Kamailio?
>>> I want to do it from the *kamailio.cfg *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?
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Henning Westerholt - https://skalatan.de/blog/
>>> Kamailio services - https://skalatan.de/services
>>>
>>> --
>> Henning Westerholt - https://skalatan.de/blog/
>> Kamailio services - https://skalatan.de/services
>>
>> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to