Summary: | ASTERISK-24767: Regression - fromdomain port ingnored in some situations | ||||
Reporter: | Tony Jago (tonyjago) | Labels: | |||
Date Opened: | 2015-02-08 00:54:03.000-0600 | Date Closed: | 2016-01-08 14:42:56.000-0600 | ||
Priority: | Major | Regression? | Yes | ||
Status: | Closed/Complete | Components: | Channels/chan_sip/General | ||
Versions: | SVN | Frequency of Occurrence | Constant | ||
Related Issues: |
| ||||
Environment: | Any | Attachments: | |||
Description: | Revision 421720 has a side affect of allowing asterisk to sent the from domain port to a different value than is specified in the configuration file. This happens when the user is running asterisk on a non-standard sip port but has the fromdomain's port set to be the sip standard. Sample configuration:
{noformat} udpbindaddr=192.168.1.2:50000 tcpbindaddr=192.168.1.2:50000 fromdomain=sip.mysuperserver.com:5060 {noformat} Should emit: {noformat} From: <sip:6111111111@sip.convoitec.com:5060>;tag=as16cce70e {noformat} Does emit: {noformat} From: <sip:6111111111@sip.convoitec.com:50000>;tag=as16cce70e {noformat} Previous to the 421720 revision, the code would simply assign the port as the user requested - {code} ourport = (p->fromdomainport) ? p->fromdomainport : ast_sockaddr_port(&p->ourip); {code} this was changed to: {code} ourport = (p->fromdomainport && (p->fromdomainport != STANDARD_SIP_PORT)) ? p->fromdomainport : ast_sockaddr_port(&p->ourip); {code} The {{(p->fromdomainport != STANDARD_SIP_PORT))}} is {{FALSE}} so instead of setting the {{fromdomain}} port to what the user has requested, it is set to {{ast_sockaddr_port(&p->ourip);}} Clearly, the correct operation is to emit the port number that has been set in the configuration file - this happens in all cases except when you try and set that port to 5060 AND your bound sip port is not 5060. | ||||
Comments: | By: Malcolm Davenport (mdavenport) 2016-01-08 14:42:56.857-0600 fix was committed; see reviewboard |