From 53071af180f33043fdfc32e7e689b2f095e37dbc Mon Sep 17 00:00:00 2001 From: Date: Fri, 9 Jul 2010 13:30:37 +0000 Subject: [PATCH] Copy the address into the peer structure after we set the default port git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274947 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d0c131f138..d9a97fcfa4 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12526,7 +12526,6 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st ast_string_field_set(pvt, our_contact, ""); return PARSE_REGISTER_FAILED; } - ast_sockaddr_copy(&peer->addr, &testsa); /* If we have a port number in the given URI, make sure we do remember to not check for NAPTR/SRV records. The domain part is actually a host. */ @@ -12537,6 +12536,8 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st transport_type == SIP_TRANSPORT_TLS ? STANDARD_TLS_PORT : STANDARD_SIP_PORT); } + + ast_sockaddr_copy(&peer->addr, &testsa); } else { /* Don't trust the contact field. Just use what they came to us with */ -- 2.47.2