[asterisk-bugs] [JIRA] (ASTERISK-24251) chan_sip REGISTER sent to wrong port using SRV records
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Fri Aug 22 12:11:28 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-24251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-24251:
-----------------------------------
Description:
SRV record to hostname indicates port 5080
Asterisk sends REGISTER to port 5060.
This patch fixes it:
\[Edit\]: mjordan - removed the inline patch
Sorry Olle, but the patch should be attached to the issue :-). Do you mind re-attaching the diff?
was:
SRV record to hostname indicates port 5080
Asterisk sends REGISTER to port 5060.
This patch fixes it:
{code}
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);
}
{code}
> 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:
> \[Edit\]: mjordan - removed the inline patch
> Sorry Olle, but the patch should be attached to the issue :-). Do you mind re-attaching the diff?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list