do lookup in dingaling when an address is specified as host:foo.bar.com like sofia does

This commit is contained in:
Anthony Minessale 2012-10-26 11:57:38 -05:00
parent d905bc8488
commit fbfe830abf
1 changed files with 8 additions and 2 deletions

View File

@ -1511,8 +1511,14 @@ static int do_tport_candidates(struct private_object *tech_pvt, ldl_transport_ty
}
address = advip;
if(address && !strncasecmp(address, "host:", 5)) {
if (address && !strncasecmp(address, "host:", 5)) {
char *lookup = switch_stun_host_lookup(address + 5, switch_core_session_get_pool(tech_pvt->session));
if (zstr(lookup)) {
address = address + 5;
} else {
address = lookup;
}
}
memset(cand, 0, sizeof(*cand));