[SR-Users] CDR fields are all strings
mickaelmarrache at gmail.com
Mon Apr 13 16:13:20 CEST 2015
We are using MongoDB and all the values are inserted as strings.
I also tried using the time_mode and time_format parameters, but it looks
like they are only relevant for transactions accounting.
Regarding the duration, it is set as a string for any backend.
I think this behavior strongly limits us (and probably others) performing
queries on CDRs (especially queries based on start and end time).
From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of
Sent: Monday, April 13, 2015 3:03 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDR fields are all strings
On 13/04/15 11:48, Mickael Marrache wrote:
Why are all the CDR fields inserted as strings?
For extra fields, I can understand it is easier to implement. However, for
the built in fields (e.g. duration), we need to perform queries based on
duration and time and it is not really possible using strings.
Dialog variables hold only strings and those values are stored in variables,
iirc -- that was the design behind the concept done by initial developer.
Perhaps they can be easily updated to hold integers.
Anyhow, iirc, at least with mysql it should work to insert any value
enclosed in quotes, not matter the field type. For datetime that is
acutually the default -- to use quotes, afaik. So if you change the types of
columns, it should just work.
We can push a patch if most of the people think is better to use different
I see that the time field for failed transactions is inserted as a date.
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users