[Home]

Summary:ASTERISK-24178: [patch]fromdomainport used even if not set
Reporter:Elazar Broad (ebroad)Labels:
Date Opened:2014-08-07 10:24:03Date Closed:2014-08-21 12:37:15
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:SVN Frequency of
Occurrence
Related
Issues:
causesASTERISK-24767 Regression - fromdomain port ingnored in some situations
Environment:Attachments:( 0) fromdomainport_fix.diff
Description:Long story short, we set fromdomainport to STANDARD_SIP_PORT if it is not set by the user in fromdomain(see http://doxygen.asterisk.org/trunk/df/df0/chan__sip_8c-source.html#l30599). The issue is, in two places, we do the following:

int ourport = (p->fromdomainport) ? p->fromdomainport : ast_sockaddr_port(&p->ourip);

Which means we will always use fromdomainport even if it wasn't actually set by the user. A side effect of this is when using SIP over TLS, an MWI response will always include port 5060 in the Message-Account field even though TLS uses 5061 (see http://doxygen.asterisk.org/trunk/df/df0/chan__sip_8c-source.html#l15086).

The attached patch resolves this issue.
Comments:By: Rusty Newton (rnewton) 2014-08-07 16:10:14.097-0500

[~ebroad] please go ahead and follow the [Code Review |https://wiki.asterisk.org/wiki/display/AST/Code+Review] process. You'll probably want to go ahead and get the patch up on Reviewboard as mentioned in the process. Remember to edit this issue and add the Reviewboard link in the appropriate field as well.

By: Elazar Broad (ebroad) 2014-08-07 16:29:37.787-0500

Thanks Rusty! This has been posted on on ReviewBoard.