I created a pull request that I tested using MongoDB.

 

It works fine.

 

Let me know if I can help more.

 

Mickael

 

From: Mickael Marrache [mailto:mickaelmarra...@gmail.com] 
Sent: Monday, April 13, 2015 5:13 PM
To: mico...@gmail.com; 'Kamailio (SER) - Users Mailing List'
Subject: RE: [SR-Users] CDR fields are all strings

 

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).

 

Mickael

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, April 13, 2015 3:03 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] CDR fields are all strings

 

Hello,

On 13/04/15 11:48, Mickael Marrache wrote:

Hi,

 

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
column types.

Cheers,
Daniel



 

I see that the time field for failed transactions is inserted as a date.

 

 

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to