[Home]

Summary:ASTERISK-05288: SIP does NOT change bindaddr when "sip reload"
Reporter:redice li (redice li)Labels:
Date Opened:2005-10-12 19:50:13Date Closed:2008-01-15 15:50:46.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I found that if I change the bindaddr in sip.conf, then use "sip reload", the address is re-read by chan_sip, but the bind address is not really changed. "sip reload" only change bind address when a only port change in sip.conf(see below):

static int reload_config(void)
{
  .....

  if ((sipsock > -1) && (ntohs(bindaddr.sin_port) != oldport)) {
      close(sipsock);
      sipsock = -1;
  }
  if (sipsock < 0) {
     /* DO bind here */
     ...

When use "sip show settings", it display the settings with new bindaddr, but netstat show old address binded!
Comments:By: Russell Bryant (russell) 2005-10-13 16:22:51

fixed in cvs head, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:50:46.000-0600

Repository: asterisk
Revision: 6762

U   trunk/channels/chan_sip.c

------------------------------------------------------------------------
r6762 | russell | 2008-01-15 15:50:46 -0600 (Tue, 15 Jan 2008) | 2 lines

re-bind the socket if the bindaddr option is changed during reload (issue ASTERISK-5288)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=6762