Summary: | ASTERISK-20724: Fix natdetected flag being set when VIA doesn't include port in address | ||
Reporter: | Michael L. Young (elguero) | Labels: | |
Date Opened: | 2012-11-25 22:27:30.000-0600 | Date Closed: | 2012-11-29 15:51:45.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | 11.0.1 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Attachments: | ( 0) asterisk-20724-set-port-v2.diff | |
Description: | While troubleshooting another issue, came across this message in the debug log:
{noformat} [2012-11-25 19:07:25] DEBUG[13375][C-00000007]: chan_sip.c:17910 check_via: NAT detected for 216.115.69.144:0 / 216.115.69.144:5060 Sending to 216.115.69.144:5060 (NAT) {noformat} Upon looking at the code in check_via, I discovered that if the port is not set on the address in the VIA header, the default SIP port is not being set on the tmp ast_sockaddr used to check if the requesting UA might be behind NAT. | ||
Comments: | By: Michael L. Young (elguero) 2012-11-25 22:29:29.480-0600 Attached patch sets the port to the standard SIP port if a port is not specified in the VIA header. |