[asterisk-bugs] [JIRA] (ASTERISK-24251) chan_sip REGISTER sent to wrong port using SRV records
Olle Johansson (JIRA)
noreply at issues.asterisk.org
Wed Aug 20 09:35:29 CDT 2014
Olle Johansson created ASTERISK-24251:
-----------------------------------------
Summary: chan_sip REGISTER sent to wrong port using SRV records
Key: ASTERISK-24251
URL: https://issues.asterisk.org/jira/browse/ASTERISK-24251
Project: Asterisk
Issue Type: Bug
Security Level: None
Components: Channels/chan_sip/General
Affects Versions: 1.8.30.0
Environment: Linux Centos
Reporter: Olle Johansson
SRV record to hostname indicates port 5080
Asterisk sends REGISTER to port 5060.
This patch fixes it:
Index: channels/chan_sip.c
===================================================================
--- channels/chan_sip.c (revision 421558)
+++ channels/chan_sip.c (working copy)
@@ -13790,7 +13790,8 @@
/* Copy back Call-ID in case create_addr changed it */
ast_string_field_set(r, callid, p->callid);
- if (!r->dnsmgr && r->portno) {
+ /* If we got the port from SRV lookup, never change it. */
+ if (!ast_sockaddr_port(&r->us) && !r->dnsmgr && r->portno) {
ast_sockaddr_set_port(&p->sa, r->portno);
ast_sockaddr_set_port(&p->recv, r->portno);
}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list