Summary: | ASTERISK-02883: Asterisk does not register with SIP proxies unless a "sip reload" command is issued | ||
Reporter: | Ben Brown (benbrown) | Labels: | |
Date Opened: | 2004-11-24 15:37:07.000-0600 | Date Closed: | 2008-01-15 15:15:08.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Subscriptions |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I am unable to register with SIP proxies after loading Asterisk unless I issue a "sip reload" command. I've tried numerous configurations etc. from lists and irc, but the fact that it isn't registered before a sip reload and is afterwards makes me think it maybe a bug with due to my configuration. ****** ADDITIONAL INFORMATION ****** Example: (note, i've added a few extra variables to try and help with debugging). server*CLI> sip show registry Host Username Refr Exp Tmout State sipgate.co.uk:5060 530xxx7 120 -1 -1 0 sipgate.co.uk:5060 143xxx8 120 -1 -1 0 sipgate.de:5060 533xxx5 120 -1 -1 0 server*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found server*CLI> sip show registry Host Username Refr Exp Tmout State sipgate.co.uk:5060 530xxx7 105 44 -1 3 sipgate.co.uk:5060 143xxx8 105 45 -1 3 sipgate.de:5060 533xxx5 105 48 -1 3 This problem works with any SIP proxy not just sipgate. | ||
Comments: | By: Brian West (bkw918) 2004-11-24 15:42:14.000-0600 Ok this IS NOT A BUG... and your output doesn't match up with latest cvs head or stable. Host Username Refresh State iptel.org:5060 bkwest 585 Registered proxy01.sipphone.com:5060 17473861189 3585 Registered fwd.pulver.com:5060 51991 3585 Registered This is what proper output should look like on a sip show registry By: Ben Brown (benbrown) 2004-11-24 15:44:34.000-0600 I guess just to be clear (my note obviously wasn't!) the output of sip show registry looked like: server*CLI> sip show registry Host Username Refresh State sipgate.co.uk:5060 530xxx7 105 Unregistered sipgate.co.uk:5060 143xxx8 105 Unregistered sipgate.de:5060 533xxx5 105 Unregistered server*CLI> sip reload Reloading SIP == Parsing '/etc/asterisk/sip.conf': Found server*CLI> sip show registry Host Username Refresh State sipgate.co.uk:5060 530xxx7 105 Registered sipgate.co.uk:5060 143xxx8 105 Registered sipgate.de:5060 533xxx5 105 Registered edited on: 11-24-04 15:52 By: Brian West (bkw918) 2004-11-24 16:53:37.000-0600 I can't reproduce this issue.. could it be a dns issue maybe.. are srvlookups on or off? By: Ben Brown (benbrown) 2004-11-25 13:44:45.000-0600 I'm digging around and it seems to be falling over in chan_sip.c in the create_addr function for some reason. It gets to this point: if ((p->addr.sin_addr.s_addr || p->defaddr.sin_addr.s_addr) && (!p->maxms || ((p->lastms > 0) && (p->lastms <= p->maxms)))) { But: addr.sin_addr.s_addr: 156175065 defaddr.sin_addr.s_addr: 0 maxms: 2000 lastms: 0 after a sip reload: addr.sin_addr.s_addr: 156175065 defaddr.sin_addr.s_addr: 0 maxms: 2000 lastms: 42 So because it has a lastms of zero it isn't sending a register. If I fudge this line to p->lastms >= 0 it all works ok. edited on: 11-25-04 14:32 edited on: 11-25-04 15:01 By: Mark Spencer (markster) 2004-11-25 17:11:37.000-0600 Fixed in CVS By: Russell Bryant (russell) 2004-11-25 20:55:02.000-0600 fixed in 1.0 - will be in 1.0.3 By: Digium Subversion (svnbot) 2008-01-15 15:15:07.000-0600 Repository: asterisk Revision: 4347 U trunk/channels/chan_sip.c ------------------------------------------------------------------------ r4347 | markster | 2008-01-15 15:15:07 -0600 (Tue, 15 Jan 2008) | 2 lines Try call if call is 0 or more (bug ASTERISK-2883) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4347 By: Digium Subversion (svnbot) 2008-01-15 15:15:08.000-0600 Repository: asterisk Revision: 4348 U branches/v1-0/channels/chan_sip.c ------------------------------------------------------------------------ r4348 | russell | 2008-01-15 15:15:08 -0600 (Tue, 15 Jan 2008) | 2 lines Try call if call is 0 or more (bug ASTERISK-2883) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=4348 |