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
This commit is contained in:
parent
6faf76308d
commit
9058d9e591
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue