diff options
author | Joshua Colp <jcolp@digium.com> | 2017-03-16 05:23:37 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-03-16 05:23:37 -0500 |
commit | aec2a087ed51aeb6d27a9bb87cecc9f7145fd9ee (patch) | |
tree | 39967b7688b26c3a2bde1a31f581b746f8e0965f /channels | |
parent | 5fdd61b556a5a20cbe83fa0642fd343941360784 (diff) | |
parent | 0dc007e94df4be041a984da5ed5346617127eb62 (diff) |
Merge "chan_iax2: Reload of iax peer results in loss of host address/port"
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_iax2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 6d2eda3f0..38dc5c00e 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -12913,7 +12913,13 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st /* Non-dynamic. Make sure we become that way if we're not */ AST_SCHED_DEL(sched, peer->expire); ast_clear_flag64(peer, IAX_DYNAMIC); - peer->addr.ss.ss_family = AST_AF_UNSPEC; + if (peer->dnsmgr) { + // Make sure we refresh dnsmgr if we're using it + ast_dnsmgr_refresh(peer->dnsmgr); + } else { + // Or just invalidate the address + peer->addr.ss.ss_family = AST_AF_UNSPEC; + } if (ast_dnsmgr_lookup(v->value, &peer->addr, &peer->dnsmgr, srvlookup ? "_iax._udp" : NULL)) { return peer_unref(peer); } |