]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use the correct URI on endpoints behind nat
authorBrian West <brian@freeswitch.org>
Wed, 16 Feb 2011 14:36:40 +0000 (08:36 -0600)
committerBrian West <brian@freeswitch.org>
Wed, 16 Feb 2011 14:36:40 +0000 (08:36 -0600)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 3755894cb813fdd479769e7bdb33072836110326..df472f2f56cd002dccc41fe11af2f1d1836b3cf9 100644 (file)
@@ -190,16 +190,8 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co
 
                dup_dest = strdup(dst->contact);
 
-               if (switch_stristr("fs_path", dst->contact)) {
-                       const char *s;
-
-                       if ((s = switch_stristr("fs_path=", dst->contact))) {
-                               s += 8;
-                       }
-                       if (s) {
-                               remote_host = strdup(s);
-                               switch_url_decode(remote_host);
-                       }
+               if (dst->route_uri) {
+                       remote_host = strdup(dst->route_uri);
                        if (!zstr(remote_host)) {
                                switch_split_user_domain(remote_host, NULL, &remote_ip);
                        }