[Freeswitch-users] Sofia SIP Registration/Retry Problem

Zhen Xu zhenxu_zj at yahoo.com
Sat Sep 13 17:46:39 PDT 2008


I am currently running Freeswitch 1.0.1 with the FS registering with a few SIP gateways.  Everything works great except one SIP gateway always drop out after a day or two.  I have specified in the profile to retry register but this does not seem to work after the SIP registration failure.
 
<include>
  <gateway name="vitel-inbound">
  <param name="username" value="xxxx"/>
  <param name="password" value="xxxx"/>
  <param name="proxy" value="inbound2.vitelity.net"/>
  <param name="expire-seconds" value="60"/>
  <param name="register" value="true"/>
  <param name="register-transport" value="udp"/>
  <param name="retry_seconds" value="30"/>
  </gateway>
</include>
 
I did a trace on the SIP message as well as the FS log, and found the following interesting lines:
 
2008-09-12 08:04:57 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 08:05:26 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 08:06:11 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 08:06:57 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 08:07:52 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_register] status [503][Service Unavailable] session: n/a
2008-09-12 08:07:52 [WARNING] sofia_reg.c:1001 sofia_reg_handle_sip_r_register() Registration Failed with status 503
2008-09-12 08:07:52 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_unregister] status [503][Service Unavailable] session: n/a
2008-09-12 08:07:54 [NOTICE] sofia_reg.c:139 sofia_reg_check_gateway() registering vitel-inbound
2008-09-12 08:07:54 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_register] status [503][Service Unavailable] session: n/a
2008-09-12 08:07:54 [WARNING] sofia_reg.c:1001 sofia_reg_handle_sip_r_register() Registration Failed with status 503
2008-09-12 08:08:25 [NOTICE] sofia_reg.c:139 sofia_reg_check_gateway() registering vitel-inbound
2008-09-12 08:08:55 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_register] status [503][DNS Error] session: n/a
2008-09-12 08:08:55 [WARNING] sofia_reg.c:1001 sofia_reg_handle_sip_r_register() Registration Failed with status 503
 
As you can see, the last successful registration is at 08:06am.  The subsequent registration failed due to possible network drop out and DNS error.  However, after 08:08am, the FS seems to completely drop out this SIP channel and not retrying at all.  SIP message trace shows no registration message passed between the gateway server and FS.  When this happens, the only resolution to this issue is to "sofia restart".  When the Sofia profile is restarted, the registration will resume for a few days and then drop out.
 
Here is the output after the Sofia restart:
 
2008-09-12 14:22:34 [DEBUG] sofia.c:688 sofia_profile_thread_run() Write unlock external
2008-09-12 14:22:34 [NOTICE] sofia_reg.c:1530 sofia_reg_add_gateway() Added gateway 'diamondcard' to profile 'external'
2008-09-12 14:22:34 [NOTICE] sofia_reg.c:1530 sofia_reg_add_gateway() Added gateway 'vitel-inbound' to profile 'external'
2008-09-12 14:22:34 [NOTICE] sofia_reg.c:1530 sofia_reg_add_gateway() Added gateway 'vitel-outbound' to profile 'external'
2008-09-12 14:22:34 [NOTICE] sofia.c:1865 config_sofia() Adding Alias [outbound] for profile [external]
2008-09-12 14:22:34 [NOTICE] sofia.c:1875 config_sofia() Started Profile external [sofia_reg_external]
2008-09-12 14:22:34 [DEBUG] sofia.c:514 sofia_profile_thread_run() Creating agent for external
2008-09-12 14:22:34 [DEBUG] sofia.c:549 sofia_profile_thread_run() Created agent for external
2008-09-12 14:22:34 [DEBUG] sofia.c:577 sofia_profile_thread_run() Set params for external
2008-09-12 14:22:34 [DEBUG] sofia.c:598 sofia_profile_thread_run() activated db for external
2008-09-12 14:22:34 [DEBUG] sofia.c:625 sofia_profile_thread_run() Starting thread for external
2008-09-12 14:22:35 [NOTICE] sofia_reg.c:139 sofia_reg_check_gateway() registering vitel-inbound
2008-09-12 14:22:35 [NOTICE] sofia_reg.c:139 sofia_reg_check_gateway() registering diamondcard
2008-09-12 14:22:35 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_register] status [401][Unauthorized] session: n/a
2008-09-12 14:22:35 [DEBUG] sofia_reg.c:1095 sofia_reg_handle_sip_r_challenge() Authenticating 'FreeSWITCH' with 'Digest:"sip.diamondcard.us":xxxx:xxxx'.
2008-09-12 14:22:36 [DEBUG] sofia.c:197 sofia_event_callback() event [nua_r_register] status [401][Unauthorized] session: n/a
2008-09-12 14:22:36 [DEBUG] sofia_reg.c:1095 sofia_reg_handle_sip_r_challenge() Authenticating 'FreeSWITCH' with 'Digest:"asterisk":xxxx:xxxx'.
2008-09-12 14:22:36 [DEBUG] sofia_reg.c:990 sofia_reg_handle_sip_r_register() Changing expire time to 3600 by request of proxy sip:sip.diamondcard.us
2008-09-12 14:22:36 [DEBUG] sofia_reg.c:990 sofia_reg_handle_sip_r_register() Changing expire time to 60 by request of proxy sip:inbound2.vitelity.net
2008-09-12 14:22:36 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 14:22:36 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered diamondcard
2008-09-12 14:22:51 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 14:23:37 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 14:24:13 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound
2008-09-12 14:24:40 [DEBUG] sofia_reg.c:121 sofia_reg_check_gateway() registered vitel-inbound

Any advice on this issue is greatly appreciated!  Thanks!


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080913/3e982943/attachment-0002.html 


More information about the FreeSWITCH-users mailing list