Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 343531) +++ channels/chan_sip.c (working copy) @@ -27238,11 +27238,11 @@ ast_string_field_set(peer, tohost, srvlookup); if (global_dynamic_exclude_static) { - int err = 0; + int ha_error = 0; sip_cfg.contact_ha = ast_append_ha("deny", ast_sockaddr_stringify_addr(&peer->addr), - sip_cfg.contact_ha, &err); - if (err) { - ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value); + sip_cfg.contact_ha, &ha_error); + if (ha_error) { + ast_log(LOG_ERROR, "Bad or unresolved host/IP entry in configuration for peer %s, cannot add to contact ACL\n", peer->name); } } } else if (peer->dnsmgr && !peer->host_dynamic) { Index: main/acl.c =================================================================== --- main/acl.c (revision 343531) +++ main/acl.c (working copy) @@ -408,6 +408,9 @@ } if (!(ha = ast_calloc(1, sizeof(*ha)))) { + if (error) { + *error = 1; + } return ret; }