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"><<a href="mailto:roland@haenel.me">roland@haenel.me</a>></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'm running into a timing issue with outgoing (gateway) registrations, which results in some milliseconds in that I can'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="'courier new', monospace"> <gateway name="duro"></font></div><div><font face="'courier new', monospace"> <param name="username" value="XXXXXXX"/></font></div>
<div><font face="'courier new', monospace"> <param name="from-domain" value="<a href="http://durosip.qsc.de" target="_blank">durosip.qsc.de</a>"/></font></div><div><font face="'courier new', monospace"> <param name="password" value="XXXXXXXXXXX"/></font></div>
<div><font face="'courier new', monospace"> <param name="proxy" value="<a href="http://durosip.qsc.de" target="_blank">durosip.qsc.de</a>"/></font></div><div><font face="'courier new', monospace"> <param name="expire-seconds" value="120"/></font></div>
<div><font face="'courier new', monospace"> <param name="register" value="true"/>^M</font></div><div><font face="'courier new', monospace"> <param name="register-transport" value="udp"/></font></div>
<div><font face="'courier new', monospace"> <param name="retry-seconds" value="5"/></font></div><div><font face="'courier new', monospace"> <param name="caller-id-in-from" value="true"/></font></div>
<div><span style="font-family:'courier new',monospace"> </gateway>^M</span></div><div><br></div><div>If I look at the "200 OK" messages for the SIP REGISTER packet, the server sends me an "Expires: 30", so FreeSwitch should re-REGISTER every 30 seconds.</div>
<div><br></div><div>However, that's what happening:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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="'courier new', 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's <i>approximately</i> 30 seconds betwee registrations, but in fact every time it'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'm loosing incoming calls because of that).</div>
<div><br></div><div>Even for outgoing calls, this seems to be an issue, let'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 "UNREGED":</div>
<div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div><font face="'courier new', monospace">Content-Length: 542</font></div></div></div><div><div><font face="'courier new', monospace">Content-Type: text/event-plain</font></div>
</div><div><div><font face="'courier new', monospace"><br></font></div></div><div><div><font face="'courier new', monospace">Event-Subclass: sofia::gateway_state</font></div></div><div><div><font face="'courier new', monospace">Event-Name: CUSTOM</font></div>
</div><div><div><font face="'courier new', monospace">Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258</font></div></div><div><div><font face="'courier new', monospace">FreeSWITCH-Hostname: lap597</font></div>
</div><div><div><font face="'courier new', monospace">FreeSWITCH-Switchname: lap597</font></div></div><div><div><font face="'courier new', monospace">FreeSWITCH-IPv4: 192.168.232.164</font></div></div><div>
<div><font face="'courier new', monospace">FreeSWITCH-IPv6: ::1</font></div></div><div><div><font face="'courier new', 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="'courier new', monospace">Event-Date-GMT: Mon, 09 Jan 2012 15:39:05 GMT</font></div>
</div><div><div><font face="'courier new', monospace">Event-Date-Timestamp: 1326123545824882</font></div></div><div><div><font face="'courier new', monospace">Event-Calling-File: sofia_reg.c</font></div></div>
<div><div><font face="'courier new', monospace">Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event</font></div></div><div><div><font face="'courier new', monospace">Event-Calling-Line-Number: 151</font></div>
</div><div><div><font face="'courier new', monospace">Gateway: duro</font></div></div><div><div><font face="'courier new', monospace">State: UNREGED</font></div></div><div><div><font face="'courier new', 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="'courier new', monospace">Event-Subclass: sofia::gateway_state</font></div></div><div><div><font face="'courier new', monospace">Event-Name: CUSTOM</font></div>
</div><div><div><font face="'courier new', monospace">Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258</font></div></div><div><div><font face="'courier new', monospace">FreeSWITCH-Hostname: lap597</font></div>
</div><div><div><font face="'courier new', monospace">FreeSWITCH-Switchname: lap597</font></div></div><div><div><font face="'courier new', monospace">FreeSWITCH-IPv4: 192.168.232.164</font></div></div><div>
<div><font face="'courier new', monospace">FreeSWITCH-IPv6: ::1</font></div></div><div><div><font face="'courier new', 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="'courier new', monospace"><b>Event-Date-GMT: Mon, 09 Jan 2012 15:39:06 GMT</b></font></div>
</div><div><div><font face="'courier new', monospace">Event-Date-Timestamp: 1326123546825090</font></div></div><div><div><font face="'courier new', monospace">Event-Calling-File: sofia_reg.c</font></div></div>
<div><div><font face="'courier new', monospace">Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event</font></div></div><div><div><font face="'courier new', monospace">Event-Calling-Line-Number: 151</font></div>
</div><div><div><font face="'courier new', monospace">Gateway: duro</font></div></div><div><div><font face="'courier new', monospace">State: TRYING</font></div></div><div><div><font face="'courier new', 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>