It might be because we only check for expiration every 30 seconds.<div><br></div><div>update to latest GIT and I added a profile param: registration-thread-frequency</div><div><br></div><div>The default is 30 so you can try setting it to 10 or 5 or something.</div>
<div><br></div><div><br><div><br><div><br><br><div class="gmail_quote">2012/1/9 Roland Hänel <span dir="ltr">&lt;<a href="mailto:roland@haenel.me">roland@haenel.me</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div>It seems that I&#39;m running into a timing issue with outgoing (gateway) registrations, which results in some milliseconds in that I can&#39;t send calls over that gateway.</div><div><br></div><div>

I have configured a gateway like this:</div><div><br></div><div><div><font face="&#39;courier new&#39;, monospace">            &lt;gateway name=&quot;duro&quot;&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;username&quot; value=&quot;XXXXXXX&quot;/&gt;</font></div>

<div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;from-domain&quot; value=&quot;<a href="http://durosip.qsc.de" target="_blank">durosip.qsc.de</a>&quot;/&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;password&quot; value=&quot;XXXXXXXXXXX&quot;/&gt;</font></div>

<div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;proxy&quot; value=&quot;<a href="http://durosip.qsc.de" target="_blank">durosip.qsc.de</a>&quot;/&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;expire-seconds&quot; value=&quot;120&quot;/&gt;</font></div>

<div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;register&quot; value=&quot;true&quot;/&gt;^M</font></div><div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;register-transport&quot; value=&quot;udp&quot;/&gt;</font></div>

<div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;retry-seconds&quot; value=&quot;5&quot;/&gt;</font></div><div><font face="&#39;courier new&#39;, monospace">              &lt;param name=&quot;caller-id-in-from&quot; value=&quot;true&quot;/&gt;</font></div>

<div><span style="font-family:&#39;courier new&#39;,monospace">            &lt;/gateway&gt;^M</span></div><div><br></div><div>If I look at the &quot;200 OK&quot; messages for the SIP REGISTER packet, the server sends me an &quot;Expires: 30&quot;, so FreeSwitch should re-REGISTER every 30 seconds.</div>

<div><br></div><div>However, that&#39;s what happening:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="&#39;courier new&#39;, monospace"><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:37:00.804865 [NOTICE] sofia_reg.c:407 Registering duro</font></div>

</div></div><div><div><div><font face="&#39;courier new&#39;, monospace"><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:37:31.804880 [NOTICE] sofia_reg.c:407 Registering duro</font></div>
</div></div><div><div><div><font face="&#39;courier new&#39;, monospace"><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:38:03.804894 [NOTICE] sofia_reg.c:407 Registering duro</font></div>

</div></div><div><div><div><font face="&#39;courier new&#39;, monospace"><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:38:35.824877 [NOTICE] sofia_reg.c:407 Registering duro</font></div>
</div></div><div><div><div><font face="&#39;courier new&#39;, monospace"><b><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:39:06.825090 [NOTICE] sofia_reg.c:407 Registering duro</b></font></div>

</div></div><div><div><div><font face="&#39;courier new&#39;, monospace"><a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:39:39.824881 [NOTICE] sofia_reg.c:407 Registering duro</font></div>
</div></div></blockquote><div><div><br></div><div>You can see that it&#39;s <i>approximately</i> 30 seconds betwee registrations, but in fact every time it&#39;s just a little more than 30 secs. This alone makes me feel a little bit strange, since my registration might have been expired during this time window (and consequently, maybe I&#39;m loosing incoming calls because of that).</div>

<div><br></div><div>Even for outgoing calls, this seems to be an issue, let&#39;s take a look at the 16:39:06.825090 re-REGISTER.</div><div><br></div><div>We can see that at 16:39:05 (no micro-seconds here) the gateway becomes &quot;UNREGED&quot;:</div>

<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="&#39;courier new&#39;, monospace">Content-Length: 542</font></div></div></div><div><div><font face="&#39;courier new&#39;, monospace">Content-Type: text/event-plain</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace"><br></font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Subclass: sofia::gateway_state</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Name: CUSTOM</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-Hostname: lap597</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-Switchname: lap597</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-IPv4: 192.168.232.164</font></div></div><div>

<div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-IPv6: ::1</font></div></div><div><div><font face="&#39;courier new&#39;, monospace"><b>Event-Date-Local: <a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:39:05</b></font></div>
</div><div><div><font face="&#39;courier new&#39;, monospace">Event-Date-GMT: Mon, 09 Jan  2012  15:39:05 GMT</font></div>
</div><div><div><font face="&#39;courier new&#39;, monospace">Event-Date-Timestamp: 1326123545824882</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-File: sofia_reg.c</font></div></div>

<div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-Line-Number: 151</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">Gateway: duro</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">State: UNREGED</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Ping-Status: UP</font></div>

</div></blockquote><div><div><br></div><div>But the new REGISTER is done a full second later (this is not just a display issue, I saw those messages scrolling by and there was just a second pause between them):</div><div>

<br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><font face="&#39;courier new&#39;, monospace">Event-Subclass: sofia::gateway_state</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Name: CUSTOM</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-Hostname: lap597</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-Switchname: lap597</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-IPv4: 192.168.232.164</font></div></div><div>

<div><font face="&#39;courier new&#39;, monospace">FreeSWITCH-IPv6: ::1</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Date-Local: <a href="tel:2012-01-09%2016" value="+12012010916" target="_blank">2012-01-09 16</a>:39:06</font></div>
</div><div><div><font face="&#39;courier new&#39;, monospace"><b>Event-Date-GMT: Mon, 09 Jan 2012 15:39:06 GMT</b></font></div>
</div><div><div><font face="&#39;courier new&#39;, monospace">Event-Date-Timestamp: 1326123546825090</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-File: sofia_reg.c</font></div></div>

<div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Event-Calling-Line-Number: 151</font></div>

</div><div><div><font face="&#39;courier new&#39;, monospace">Gateway: duro</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">State: TRYING</font></div></div><div><div><font face="&#39;courier new&#39;, monospace">Ping-Status: DOWN</font></div>

</div></blockquote><div><div><br></div><div>Then, the gateway gets re-registered in a couple of milliseconds and everything is fine again.</div><div><br></div><div><b>It seems that this behaviour effectively creates a timespan of 1-2 seconds, where the gateway is not available for outgoing (and maybe also incoming) calls.</b></div>

<div><br></div><div>Does anyone of you know this issue? I wonder because this looks just to easy to be wrong in this fashion?</div><div><br></div>Greetings,<div>Roland</div><div><br></div><br>
</div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div></div></div>