]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix dtmf and cng neg
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 7 Feb 2013 20:34:42 +0000 (14:34 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 1 Apr 2013 02:27:24 +0000 (21:27 -0500)
src/switch_core_media.c

index f9769d71cd0767d6034e48ea398e34f6fbecf6b8..d806e1536585c883a03c9d3cf7ff9bb4aed2b369 100644 (file)
@@ -2404,19 +2404,13 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                        }
 
                        for (map = m->m_rtpmaps; map; map = map->rm_next) {
-                               int32_t i;
                                const char *rm_encoding;
-                               uint32_t map_bit_rate = 0;
-                               switch_codec_fmtp_t codec_fmtp = { 0 };
                                
-                               if (x++ < skip) {
-                                       continue;
-                               }
-
                                if (!(rm_encoding = map->rm_encoding)) {
                                        rm_encoding = "";
                                }
-                               
+
+
                                if (!strcasecmp(rm_encoding, "telephone-event")) {
                                        if (!best_te || map->rm_rate == a_engine->codec_params.rm_rate) {
                                                best_te = (switch_payload_t) map->rm_pt;
@@ -2431,6 +2425,22 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
                                        }
                                }
 
+                       }
+
+                       for (map = m->m_rtpmaps; map; map = map->rm_next) {
+                               int32_t i;
+                               const char *rm_encoding;
+                               uint32_t map_bit_rate = 0;
+                               switch_codec_fmtp_t codec_fmtp = { 0 };
+                               printf("WTF %d %s\n", x, map->rm_encoding);
+                               if (x++ < skip) {
+                                       continue;
+                               }
+
+                               if (!(rm_encoding = map->rm_encoding)) {
+                                       rm_encoding = "";
+                               }
+                               
                                if (match) {
                                        continue;
                                }
@@ -3725,6 +3735,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
                if (!zstr(a_engine->local_dtls_fingerprint.str) && switch_rtp_has_dtls()) {
                        dtls_type_t xtype, dtype = switch_channel_direction(smh->session->channel) == SWITCH_CALL_DIRECTION_INBOUND ? DTLS_TYPE_CLIENT : DTLS_TYPE_SERVER;
 
+
                        xtype = DTLS_TYPE_RTP;
                        if (a_engine->rtcp_mux > 0) xtype |= DTLS_TYPE_RTCP;