summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 08a16805f..fadb349a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3843,7 +3843,7 @@ static void ast_sip_ouraddrfor(const struct ast_sockaddr *them, struct ast_socka
(!sip_cfg.matchexternaddrlocally || !ast_apply_ha(localaddr, us)) ) {
/* if we used externhost, see if it is time to refresh the info */
if (externexpire && time(NULL) >= externexpire) {
- if (ast_sockaddr_resolve_first(&externaddr, externhost, 0)) {
+ if (ast_sockaddr_resolve_first_af(&externaddr, externhost, 0, AST_AF_INET)) {
ast_log(LOG_NOTICE, "Warning: Re-lookup of '%s' failed!\n", externhost);
}
externexpire = time(NULL) + externrefresh;
@@ -32573,7 +32573,7 @@ static int reload_config(enum channelreloadreason reason)
externexpire = 0;
} else if (!strcasecmp(v->name, "externhost")) {
ast_copy_string(externhost, v->value, sizeof(externhost));
- if (ast_sockaddr_resolve_first(&externaddr, externhost, 0)) {
+ if (ast_sockaddr_resolve_first_af(&externaddr, externhost, 0, AST_AF_INET)) {
ast_log(LOG_WARNING, "Invalid address for externhost keyword: %s\n", externhost);
}
externexpire = time(NULL);