[sr-dev] routing time of sip request

Jan Janak jan at ryngle.com
Mon Oct 26 17:24:58 CET 2009


On Mon, Oct 26, 2009 at 4:15 PM, Juha Heinanen <jh at tutpro.com> wrote:
> Jan Janak writes:
>
>  > Wouldn't it be possible to store the timestamp of request arrival in
>  > an AVP at the beginning of request processing and then calculate the
>  > difference from the current timestamp in on-send route?
>
> that would be possible too, but it needs to be a ms timestamp, which
> would not fit into an int.  a ms counter that would start counting from
> zero, would fit.

How about using ticks then? Ticks fit into a 32-bit number. By default
there are 16 ticks per second (but you can change it in
timer_ticks.h), would that provide enough precision?

See sip-router/timer_ticks.h

   -- Jan



More information about the sr-dev mailing list