[Kamailio-Users] Is Timestamp supported in kamailio?
Daniel-Constantin Mierla
miconda at gmail.com
Wed Mar 17 14:12:01 CET 2010
Hello,
On 03/16/2010 07:03 PM, Iñaki Baz Castillo wrote:
> 2010/3/16 Alex Balashov<abalashov at evaristesys.com>:
>
>> Sure. What I meant is that apart from $Ts in K>= 3.0.x, there aren't
>> really any ways to compute the delay on that level of time resolution. Are
>> there?
>>
> Yes, right. I did something similar long time ago and just got seconds
> precision :)
>
one of the old function in textops is append_time() which adds a date
header, with complete date and time, still up to second precision.
http://kamailio.org/docs/modules/3.0.x/modules_k/textops.html#id2494947
It is true that before 3.0.0 there was no script variable returning
better time precision than second, devel has it as timeval variable:
http://sip-router.org/wiki/cookbooks/pseudo-variables/devel#timeval
But there are options to do it in case you really need better precision,
using sql query, exec or perl. Not only those, because benchmark has a
nicer way to get the difference of time for config execution:
http://kamailio.org/docs/modules/stable/modules_k/benchmark.html#id2521780
Then adding a header to a local generated reply is easy.
Cheers,
Daniel
More information about the sr-users
mailing list