On 29 Apr 2015, at 10:04, Daniel-Constantin Mierla <miconda(a)gmail.com> wrote:
Hello,
On 28/04/15 20:42, Jon Bonilla (Manwe) wrote:
Hi all
I'm replacing an Asterisk based system with a kamailio based one. One of the
features the legacy system has is showing the subscriber the latency obtained
from the qualify option of sip.conf
Now, I'd like to measure the latency but I'm not sure how to do it. AFAIK
nathelper module sends the OPTIONS keepalive messages stateless mode and
there's no information there.
I was thinking on triggering a route send_options via the timer module, save
the timestamp of the relay and the timestamp of the response in onreply_route
but it doesn't look elegant. Creating my own daemon in an external server and
reading the info from the location module seems to be another option.
I guess I'm not the first one with this need so I wonder if there's an already
existing solution or an elegant way of dealing with it.
any ideas?
it looks like you are the first wanting this, or at least the first that
has expressed it.
As Jon said, this is a feature that has been in Asterisk for a
very long time and
we need in Kamailio. I think many of us has looked for it, but never mailed about
it since we still have Asterisk in there. Since Kamailio has grown so much and
we now can build Asterisk-free solutions, I think this would be a valuable feature
both for dispatcher and for usrloc.
/O
It might not be hard to code it in c, it will require to extend the
usrloc structure to have with two timestamps, one to be set when sending
the options and one when receiving the reply. At this moment there is
only one timestamp when the reply is received, see the function
ul_refresh_keepalive() from usrloc, the field in ucontact_t structure is
last_keepalive. So half is done more or less.
You can open a feature request on tracker and probably will get into
4.4. The development for 4.3 is frozen.
Cheers,
Daniel
--
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(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users