Skip to content
Snippets Groups Projects
Commit 9058d9e5 authored by Dennis Buteyn's avatar Dennis Buteyn Committed by George Joseph
Browse files

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
parent 6faf7630
Branches
Tags
No related merge requests found
......@@ -31903,6 +31903,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v_head
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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment