[Asterisk-code-review] chan_sip: Clear ToHost property on peer when changing to dynamic host (asterisk[13])

Dennis asteriskteam at digium.com
Mon Jul 27 04:07:35 CDT 2020


Dennis has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14697 )


Change subject: chan_sip: Clear ToHost property on peer when changing to dynamic host
......................................................................

chan_sip: Clear ToHost property on peer when changing to dynamic host

The ToHost parameter was not cleared when a peer's host value was
changed to dynamic. This causes invites to be sent to the original host.

ASTERISK-29011 #close

Change-Id: I9678d512741f71baca8f131a65b7523020b07d5c
---
M channels/chan_sip.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/97/14697/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c67081c..4cf3a79 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -31660,6 +31660,7 @@
 					if ((!found && !ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS)) || !peer->host_dynamic) {
 						/* Initialize stuff if this is a new peer, or if it used to
 						 * not be dynamic before the reload. */
+						ast_string_field_set(peer, tohost, NULL);
 						ast_sockaddr_setnull(&peer->addr);
 					}
 					peer->host_dynamic = TRUE;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14697
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I9678d512741f71baca8f131a65b7523020b07d5c
Gerrit-Change-Number: 14697
Gerrit-PatchSet: 1
Gerrit-Owner: Dennis <dennis.buteyn at xorcom.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200727/20db44ab/attachment.html>


More information about the asterisk-code-review mailing list