[Home]

Summary:ASTERISK-03720: [patch] bindport statement seems not to function
Reporter:gmelis (gmelis)Labels:
Date Opened:2005-03-20 08:31:12.000-0600Date Closed:2008-01-15 15:28:07.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 3810_sip_bindport_rev1.diff.txt
( 1) sip_bindport_rev2.diff.txt
Description:Today I tried to change the IAX and SIP ports asterisk listens on but the changes to the bindport statement in the iax.conf and sip.conf files seem to have no effect. The CVS was yesterday's and the system is a Slackware Linux 10.1 running on i386.
Comments:By: Kevin P. Fleming (kpfleming) 2005-03-20 09:03:52.000-0600

Patch corrects chan_sip to match documentation:

- general section now responds to 'bindport', not 'port'
- peer sections no longer respond to 'bindport' (which is not logical and was not documented)
- invalid (non-parseable) port numbers specified to 'bindport' do not result in a random port number (the bindport is set back to DEFAULT_SIP_PORT)

Disclaimer is on file.

By: Kevin P. Fleming (kpfleming) 2005-03-20 09:04:44.000-0600

chan_iax2 appears to support bindport properly; please make sure that you are specifying it _before_ bindaddr in the general section of your config file, as the 'bindaddr' statements take effect immediately when they are processed.

By: Olle Johansson (oej) 2005-03-20 14:48:32.000-0600

Just a quick glance, but I think you are setting "ourport" without setting the bindaddress port to DEFAULT_SIP_PORT... Or?

By: Kevin P. Fleming (kpfleming) 2005-03-20 15:07:58.000-0600

bindaddr.sin_port is already set to DEFAULT_SIP_PORT earlier in the code.

However, if the user does something really stupid, like:

[general]
bindport=7898
bindport=this_is_not_a_number

Then bindaddr.sin_port will be 7898 but ourport will be DEFAULT_SIP_PORT. I will remove this line from the patch, as it's really not needed (I thought the code was using atoi(), which always produces a result, rather than sscanf, which won't modify ourport if the conversion fails).

By: Mark Spencer (markster) 2005-03-20 20:22:47.000-0600

Added to CVS, thanks.  Also note that bindport / bindaddr do not change on a RELOAD.

By: Russell Bryant (russell) 2005-03-31 16:37:46.000-0600

not included in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:28:07.000-0600

Repository: asterisk
Revision: 5220

U   trunk/channels/chan_sip.c
U   trunk/configs/iax.conf.sample

------------------------------------------------------------------------
r5220 | markster | 2008-01-15 15:28:07 -0600 (Tue, 15 Jan 2008) | 2 lines

Update SIP/IAX documentation and code (Bug ASTERISK-3720)

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

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