[Freeswitch-users] "expire" for outgoing registrations not handled correctly?

Anthony Minessale anthony.minessale at gmail.com
Tue Jan 10 03:26:13 MSK 2012


It might be because we only check for expiration every 30 seconds.

update to latest GIT and I added a profile
param: registration-thread-frequency

The default is 30 so you can try setting it to 10 or 5 or something.





2012/1/9 Roland Hänel <roland at haenel.me>

> Hi,
>
> 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.
>
> I have configured a gateway like this:
>
>             <gateway name="duro">
>               <param name="username" value="XXXXXXX"/>
>               <param name="from-domain" value="durosip.qsc.de"/>
>               <param name="password" value="XXXXXXXXXXX"/>
>               <param name="proxy" value="durosip.qsc.de"/>
>               <param name="expire-seconds" value="120"/>
>               <param name="register" value="true"/>^M
>               <param name="register-transport" value="udp"/>
>               <param name="retry-seconds" value="5"/>
>               <param name="caller-id-in-from" value="true"/>
>             </gateway>^M
>
> 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.
>
> However, that's what happening:
>
> 2012-01-09 16:37:00.804865 [NOTICE] sofia_reg.c:407 Registering duro
> 2012-01-09 16:37:31.804880 [NOTICE] sofia_reg.c:407 Registering duro
> 2012-01-09 16:38:03.804894 [NOTICE] sofia_reg.c:407 Registering duro
> 2012-01-09 16:38:35.824877 [NOTICE] sofia_reg.c:407 Registering duro
> *2012-01-09 16:39:06.825090 [NOTICE] sofia_reg.c:407 Registering duro*
> 2012-01-09 16:39:39.824881 [NOTICE] sofia_reg.c:407 Registering duro
>
>
> You can see that it's *approximately* 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).
>
> Even for outgoing calls, this seems to be an issue, let's take a look at
> the 16:39:06.825090 re-REGISTER.
>
> We can see that at 16:39:05 (no micro-seconds here) the gateway becomes
> "UNREGED":
>
> Content-Length: 542
> Content-Type: text/event-plain
>
> Event-Subclass: sofia::gateway_state
> Event-Name: CUSTOM
> Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258
> FreeSWITCH-Hostname: lap597
> FreeSWITCH-Switchname: lap597
> FreeSWITCH-IPv4: 192.168.232.164
> FreeSWITCH-IPv6: ::1
> *Event-Date-Local: 2012-01-09 16:39:05*
> Event-Date-GMT: Mon, 09 Jan  2012  15:39:05 GMT
> Event-Date-Timestamp: 1326123545824882
> Event-Calling-File: sofia_reg.c
> Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event
> Event-Calling-Line-Number: 151
> Gateway: duro
> State: UNREGED
> Ping-Status: UP
>
>
> 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):
>
> Event-Subclass: sofia::gateway_state
> Event-Name: CUSTOM
> Core-UUID: 243269fe-d280-4f83-aca1-abb88f2ad258
> FreeSWITCH-Hostname: lap597
> FreeSWITCH-Switchname: lap597
> FreeSWITCH-IPv4: 192.168.232.164
> FreeSWITCH-IPv6: ::1
> Event-Date-Local: 2012-01-09 16:39:06
> *Event-Date-GMT: Mon, 09 Jan 2012 15:39:06 GMT*
> Event-Date-Timestamp: 1326123546825090
> Event-Calling-File: sofia_reg.c
> Event-Calling-Function: sofia_reg_fire_custom_gateway_state_event
> Event-Calling-Line-Number: 151
> Gateway: duro
> State: TRYING
> Ping-Status: DOWN
>
>
> Then, the gateway gets re-registered in a couple of milliseconds and
> everything is fine again.
>
> *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.*
>
> Does anyone of you know this issue? I wonder because this looks just to
> easy to be wrong in this fashion?
>
> Greetings,
> Roland
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire

AIM: anthm
MSN:anthony_minessale at hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120109/50bee15f/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list