<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>maybe we can just add this feature to the usrloc module -- right
now the nat keepalive is done from nathelper module, which queries
usrloc module to retrieve the list of the contacts to send OPTIONS
to. Of course, the nathelper has the other variant witj 4-bytes
pings, but I expect not many are using it these days.</p>
<p>Furthermore, because the nathelper has some options to forge the
source ip address as well as willing to be lightweight, it sends
the packets directly, no relying on tm module.</p>
<p>However, it seems that it is an increase interest in having more
feedback based on these keepalives. Including the ability to do
mirroring for sipcapture (a feature request being open in the
tracker). Other request in the past was to send OPTIONS also for
non-UDP contacts, nathelper does it only for UDP.</p>
<p>So we can consider adding a transaction based keepalive layer,
which of course might take a bit more resources that current
nathelper implementation, but can bring extra benefits. I think we
can leave nathelper as it is and add this feature directly in the
usrloc module, avoiding to pass data between modules, but also
because we have to set/updates some fields in the contract
structure (like this round trip time).</p>
<p>There are other modules that do keepalive, some mentioned
dispatcher, there is a dedicated one named keepalive, and, afaik,
also nat_traversal can do it. I am listing them so others can
assert where it would be better to add the new feature -- as said,
I would do it in usrloc, but I am open for other suggestions as
well (eventually accompanied with a pull request).</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 15.01.19 21:12, Julien Chavanton
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAKmcL2murekESKhsOPApHvbUyf2-iVA5L73EWcV-HZEm_3n2Wg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div>Depending on the use case, you could use the dispatcher
module latency stats.</div>
<div><br>
</div>
<div><a
href="https://kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.ds_ping_latency_stats"
moz-do-not-send="true">https://kamailio.org/docs/modules/devel/modules/dispatcher.html#dispatcher.p.ds_ping_latency_stats</a><br>
</div>
<div><br>
</div>
<div>Regards</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Jan 15, 2019 at 2:29 AM Daniel Tryba <<a
href="mailto:d.tryba@pocos.nl" moz-do-not-send="true">d.tryba@pocos.nl</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On
Sun, Jan 13, 2019 at 10:08:31PM +0300, Soltanici Ilie wrote:<br>
> With Asterisk, we are able to get some peer round-trip
connection statistic by setting qualify=yes for the specified
peer. <br>
> It sends periodic OPTIONS to the peer and calculates the
time round trip time.<br>
> It's something like - "Status: OK (30 ms)".<br>
> Is there any way to achieve this in Kamailio by using
nathelper??module, or any other?<br>
<br>
I think the only way to do this is to make this yourself (tm).
In your<br>
favorite scripting language, query the locations and fire
OPTIONS and<br>
measure the time for a response (if any) on basis of the
"random" callid<br>
you create. If you route these requests through kamailio you
will<br>
prevent any NAT problems or connection with TCP endpoints.<br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank"
moz-do-not-send="true">sr-users@lists.kamailio.org</a><br>
<a
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio World Conference - May 6-8, 2019 -- <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a>
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in Washington, DC, USA -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a></pre>
</body>
</html>