<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<tt>Indeed,</tt><br>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 07.08.2015 20:08, Nabeel wrote:<br>
</div>
<blockquote
cite="mid:CA+vx6KKfk6KyUby8o+iW=6tKMCrN2KUwHeDwvuJ0WqCANQiiKg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>You mean like this, right?</div>
<div><br>
</div>
<div>if (is_method("REGISTER"))</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if
( 0 ) setflag(TCP_PERSISTENT);</div>
<div><br>
</div>
<div> <span
style="font-family:arial,helvetica,sans-serif">setbflag(SIP_PING_FLAG);</span></div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>if
(!save("location"))</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>sl_reply_error();</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>exit;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On 7 August 2015 at 17:52,
Bogdan-Andrei Iancu <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:bogdan@opensips.org"
target="_blank">bogdan@opensips.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"> Hi Nabeel,<span
class=""><br>
<pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
</span>
<div>On 07.08.2015 19:39, Nabeel wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr"><font face="arial, helvetica, sans-serif">[........]</font><span
class=""><br>
<div><font face="arial, helvetica, sans-serif">Bogdan,</font></div>
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><font face="arial, helvetica, sans-serif">Regarding
UDP, I realised that the UDP port could not be
in LISTEN state and this was probably preventing
my server from fully opening that port. Running
nmap on that port showed result "open|filtered",
unlike with TCP which showed fully open. I am
not running any firewalls on my server, so this
seems to be the default behaviour of my network.</font></div>
</span></div>
</blockquote>
<font face="arial, helvetica, sans-serif">A bidirectional
traffic through the NAT will keep the NAT pinhole open,
while a unidirectional one may not. This is the
advantage of the SIP pinging versus simple UDP pinging.</font><span
class=""><br>
<blockquote type="cite">
<div dir="ltr">
<div><font face="arial, helvetica, sans-serif"><br>
</font></div>
<div><span
style="font-family:arial,helvetica,sans-serif">I
would like to clarify one thing. You mentioned
adding setbflag(SIP_PING_FLAG) before doing
save(), but in my config file I don't see save()
anywhere, there is only this line: "if
(!save("location"))". Where exactly do I add
this line?</span><font face="arial, helvetica,
sans-serif"><br>
</font></div>
</div>
</blockquote>
</span><font face="arial, helvetica, sans-serif">exactly.</font><br>
<br>
<font face="arial, helvetica, sans-serif">Regards,<br>
Bogdan<br>
</font><br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>