[OpenSIPS-Users] OpenSIPS 3.1 DB logging INVITEs but not BYEs

Marcin Groszek marcin at voipplus.net
Thu Apr 8 17:26:22 EST 2021


At initial invite some information are stored like a start time, this is 
needed to calculate the duration at the call end.

I believe if you do: do_accounting("db","cdr") this will write only 1 
invite entry in acc at the end of the call,

but if you do: do_accounting("db") this will write your invite and bye 
as 2 entries in acc table.

make a call, select * from acc at your db hung up the call and select 
again you will see when the entries are written.

You may also use ngrep -port 3306 -dlo to monitor db access by opensips 
but you have to change localhost to 127.0.0.1 in modparam.

modparam("acc", "db_url", "mysql://opensips:opensipsrw@127.0.0.1/opensips")



On 4/8/2021 11:09 AM, Kingsley Tart wrote:
> I would prefer a single record as well. I don't understand why using
> the dialog module makes it write a new "INVITE" record at BYE time
> instead of either writing a BYE record, or allowing me to update it
> with a few custom fields, one of which would be t_end or something.
>
> Cheers,
> Kingsley.
>
> On Thu, 2021-04-08 at 09:17 -0500, Marcin Groszek wrote:
>> Because you are using dialog that invite entry in acc table is
>> written at the time of bye.
>> I prefer a single entry in acc table for each call, not 2
>>
>> Best regards:
>> Marcin Groszek
>>
>>> On Apr 8, 2021, at 8:15 AM, Kingsley Tart <kingsley at dns99.co.uk>
>>> wrote:
>>>
>>> Thanks, though that didn't seem to have made any difference :(
>>>
>>> It *is* logging durations though (something you mentioned in your
>>> other
>>> email).
>>>
>>> Cheers,
>>> Kingsley.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-- 
Best Regards:
Marcin Groszek
Business Voip Resource.
http://www.voipplus.net




More information about the Users mailing list