]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
do lookup in dingaling when an address is specified as host:foo.bar.com like sofia...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 26 Oct 2012 16:57:38 +0000 (11:57 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 26 Oct 2012 16:57:38 +0000 (11:57 -0500)
src/mod/endpoints/mod_dingaling/mod_dingaling.c

index 78ee260d05e0430f7025209098f1f4553182dbfd..af67afcfc9cd19c06388eea2f77f3c165098070a 100644 (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)) {
-               address = address + 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));