--- channels/chan_sip.orig 2014-08-08 17:18:17.000000000 +0000 +++ channels/chan_sip.c 2014-12-10 23:38:38.000000000 +0000 @@ -3810,7 +3810,7 @@ ast_ouraddrfor(them, us); ast_sockaddr_copy(&theirs, them); - if (ast_sockaddr_is_ipv6(&theirs)) { + if (ast_sockaddr_is_ipv6(&theirs) && !ast_sockaddr_is_ipv4_mapped(&theirs)) { if (localaddr && !ast_sockaddr_isnull(&externaddr) && !ast_sockaddr_is_any(&bindaddr)) { ast_log(LOG_WARNING, "Address remapping activated in sip.conf " "but we're using IPv6, which doesn't need it. Please " @@ -3826,7 +3826,7 @@ (!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, AF_INET)) { ast_log(LOG_NOTICE, "Warning: Re-lookup of '%s' failed!\n", externhost); } externexpire = time(NULL) + externrefresh;