]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make proxy mode pull the port from m=image as well
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Sep 2008 20:59:09 +0000 (20:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 25 Sep 2008 20:59:09 +0000 (20:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9650 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_glue.c

index 2712a39fbd9fe64d6c9a7d254228a970ae695d62..54151fcf1ede564fcad1ef738f680ec1455375a5 100644 (file)
@@ -806,6 +806,10 @@ switch_status_t sofia_glue_tech_proxy_remote_addr(private_object_t *tech_pvt)
                port_ptr = p + 8;
        }
 
+       if ((p = (char *) switch_stristr("m=image ", tech_pvt->remote_sdp_str))) {
+               port_ptr = p + 8;
+       }
+
        if ((p = (char *) switch_stristr("m=video ", tech_pvt->remote_sdp_str))) {
                vid_port_ptr = p + 8;
        }
@@ -945,7 +949,7 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
 
                has_ip++;
 
-               } else if (!strncmp("m=audio ", p, 8)) {
+               } else if (!strncmp("m=audio ", p, 8) || (!strncmp("m=image ", p, 8))) {
                        strncpy(q,p,8);
                        p += 8;
                        q += 8;