]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
sdp_m_per_ptime is now implied to be true, if you don't like this set it to false...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Aug 2011 15:22:55 +0000 (10:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Aug 2011 15:22:55 +0000 (10:22 -0500)
src/mod/endpoints/mod_sofia/sofia_glue.c
src/switch_core_session.c

index 1c3999c110d012273a4d92ca440a8aaa775012cf..590723b8bda1dc9ade817bc9a15c84c8ec4472f5 100644 (file)
@@ -208,6 +208,7 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
 
                if (!noptime) {
                        if (!cur_ptime) {
+#if 0
                                if (ptime) {
                                        if (ptime != imp->microseconds_per_packet / 1000) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
@@ -225,6 +226,11 @@ static void generate_m(private_object_t *tech_pvt, char *buf, size_t buflen,
                                } else {
                                        ptime = imp->microseconds_per_packet / 1000;
                                }
+#else
+                               if (!ptime) {
+                                       ptime = imp->microseconds_per_packet / 1000;
+                               }
+#endif
                        } else {
                                if ((imp->microseconds_per_packet / 1000) != cur_ptime) {
                                        continue;
@@ -544,7 +550,7 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
        } else if (tech_pvt->num_codecs) {
                int i;
                int cur_ptime = 0, this_ptime = 0, cng_type = 0;
-
+               const char *mult;
 
                if (!sofia_test_pflag(tech_pvt->profile, PFLAG_SUPPRESS_CNG) && tech_pvt->cng_pt && use_cng) {
                        cng_type = tech_pvt->cng_pt;
@@ -553,8 +559,10 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, switch
                                tech_pvt->cng_pt = 0;
                        }
                }
-
-               if (!switch_true(switch_channel_get_variable(tech_pvt->channel, "sdp_m_per_ptime"))) {
+               
+               mult = switch_channel_get_variable(tech_pvt->channel, "sdp_m_per_ptime");
+               
+               if (mult && switch_false(mult)) {
                        char *bp = buf;
                        
                        if ((!zstr(tech_pvt->local_crypto_key) && sofia_test_flag(tech_pvt, TFLAG_SECURE))) {
index 038dda1b834682694d81df45897a064140a2e803..168bec3695f30b413f8606d75dc06d732cf871c8 100644 (file)
@@ -503,7 +503,7 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
                if (channel) {
                        const char *val;
                        switch_codec_t *vid_read_codec = NULL, *read_codec = switch_core_session_get_read_codec(session);
-                       const char *max_forwards = switch_core_session_sprintf(session, "%d", forwardval);
+                       const char *ep, *max_forwards = switch_core_session_sprintf(session, "%d", forwardval);
 
                        switch_channel_set_variable(peer_channel, SWITCH_MAX_FORWARDS_VARIABLE, max_forwards);
 
@@ -523,6 +523,9 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
 
                                switch_snprintf(tmp, sizeof(tmp), "%s%s", rc, vrc);
                                switch_channel_set_variable(peer_channel, SWITCH_ORIGINATOR_CODEC_VARIABLE, tmp);
+                       } else if ((ep = switch_channel_get_variable(channel, "ep_codec_string"))) {
+                               printf("SET [%s] [%s]\n", switch_channel_get_name(peer_channel), ep);
+                               switch_channel_set_variable(peer_channel, SWITCH_ORIGINATOR_CODEC_VARIABLE, ep);
                        }
 
                        switch_channel_set_variable(peer_channel, SWITCH_ORIGINATOR_VARIABLE, switch_core_session_get_uuid(session));