[SR-Users] CDR fields are all strings

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 13 14:02:32 CEST 2015


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150413/c88f1100/attachment.html>


More information about the sr-users mailing list