[SR-Users] Kamailio and CDR

Yu Boot yu at yu-boot.ru
Thu Apr 4 08:20:29 CEST 2019


Anyone? I can't believe that nobody of Kami users don't have these 
problems with CDR.


03.04.2019 16:03, Yu Boot пишет:
> You didn't catch my idea. Here's what Kami writes to syslog:
>
>
>  NOTICE: acc [acc_cdr.c:352]: log_write_cdr(): 
> start_time=1554295999.014; end_time=1554296092.164; duration=93.150; 
> src_user=4956885645; src_domain=65.181.181.218; src_ip=65.181.181.218; 
> dst_ouser=9956885645; dst_user=6004440; dst_domain=181.188.186.32
>
>
> 1. I want to get rid from junk in beginning of CDR string, and 
> ideally, remove params names.
>
> 2. I want end_time in human-readable format
>
> 3 and last little problem - I want call duration will be always integer.
>
> Is anything of it attainable with Kami? These CDRs issues is a last 
> thing that keep me from using Kami instead of Yate as a SBC.
>
>
> 03.04.2019 15:43, Daniel-Constantin Mierla пишет:
>> You can direct the syslog messages printed by acc module by setting the
>> parameter:
>>
>>    -
>> https://www.kamailio.org/docs/modules/5.2.x/modules/acc.html#acc.p.log_facility 
>>
>>
>> to a specific value and then configure the syslog application to write
>> the messages with that facility to a specific file. In this way you can
>> get acc records in a dedicated file, not together with the rest of logs
>> printed by kamailio. See also:
>>
>>    - https://www.kamailio.org/wiki/tutorials/3.2.x/syslog
>>
>> You can also look at acc_json, you can construct a way to push the acc
>> records to your own backend where you can do whatever suits better for
>> your needs.
>>
>> Cheers,
>> Daniel
>>
>> On 03.04.19 14:31, Yu Boot wrote:
>>> Thanks for a reply
>>>
>>>
>>> I need CDR easily "greppable", so it must be in regular text file.
>>> Very easy to parse, generate stats, and again, it can be "tail-f'ed".
>>>
>>> And I want time in human readable format.
>>>
>>> Now iI use acc/dialog, result is horrible syslog output which is 50%
>>> meaningless syslog stuff.
>>>
>>>
>>> Show me right way. Or "Kamailio-way" to get CDR.
>>>
>>>
>>> 03.04.2019 15:01, Daniel-Constantin Mierla пишет:
>>>> The dialog+acc can also write the cdrs to database, afaik. If
>>>> documentation says different, maybe it was forgotten to be updated.
>>>>
>>>> Or you look for something different than using dialog+acc?
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 03.04.19 13:27, Yu Boot wrote:
>>>>> Is there any other way to retrieve CDRs from Kami other than
>>>>> dialog/acc modules and writing CDRs to syslog only?
>>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users at lists.kamailio.org
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users



More information about the sr-users mailing list