]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9721 #resolve [Add media_reneg_after_broadcast]
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 9 Nov 2016 23:22:07 +0000 (17:22 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 9 Nov 2016 23:24:47 +0000 (17:24 -0600)
src/switch_core_media.c
src/switch_ivr.c

index 933cdddcd037c5354b6662a599297021e526d533..41f9c36d50ee966c884482efd7b7bb9333728dd6 100644 (file)
@@ -11560,13 +11560,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_receive_message(switch_core_se
 
                        if (msg->string_arg) {
                                switch_channel_set_variable(session->channel, "absolute_codec_string", NULL);
+
                                if (*msg->string_arg == '=') {
                                        switch_channel_set_variable(session->channel, "codec_string", msg->string_arg);
                                } else {
-                                       switch_channel_set_variable_printf(session->channel, "codec_string", "=%s%s%s,%s", 
-                                                                                                          v_engine->cur_payload_map->rm_encoding ? v_engine->cur_payload_map->rm_encoding : "",
-                                                                                                          v_engine->cur_payload_map->rm_encoding ? "," : "",
-                                                                                                          a_engine->cur_payload_map->rm_encoding, msg->string_arg);                                    
+                                       switch_channel_set_variable_printf(session->channel, 
+                                                                                                          "codec_string", "=%s", switch_channel_get_variable(session->channel, "ep_codec_string"));
                                }
 
 
index bed71c97c6e81d0a17cf7007f94ecf279cfe77f3..ad58de7ee2dbf9cdfbadce27d5b2624a8437727c 100644 (file)
@@ -664,6 +664,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
                        }
                        
                        switch_channel_audio_sync(channel);
+
+                       if (switch_channel_var_true(channel, "media_reneg_after_broadcast")) {
+                               switch_core_session_message_t msg = { 0 };
+                               
+                               msg.message_id = SWITCH_MESSAGE_INDICATE_MEDIA_RENEG;
+                               msg.from = __FILE__;
+                               
+                               switch_core_session_receive_message(session, &msg);
+                       }
+
                }
        } else if (cmd_hash == CMD_UNICAST) {
                char *local_ip = switch_event_get_header(event, "local-ip");