[SR-Users] Calculating time differences

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 11 12:36:12 CEST 2016


Hello,

the config doesn't support float. You can try some options:

- use embedded lua (perl, python, ..., exec, sqlops) to make such operations

- split each value in two integers using s.select transformation and do
operations for seconds and miliseconds parts, then build again a value

Cheers,
Daniel


On 08/07/16 15:30, Sebastian Damm wrote:
> Hi,
>
> we are suspending a transaction at one place in our route and resume
> it later. I want to log the time difference between suspending and
> resuming. I thought I could do it with saving $TV(Sn), but apparently
> I can't. Kamailio says, it can't convert the saved value into integer.
> This true, of course.
>
> I was searching for a transformation function converting this string
> into float, but there is none.
>
> Is there any way to calculate a time difference other than to live
> with seconds-only precision?
>
> Best Regards,
> Sebastian
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda




More information about the sr-users mailing list