FS-9721 #resolve [Add media_reneg_after_broadcast]

This commit is contained in:
Anthony Minessale 2016-11-09 17:22:07 -06:00
parent 6076e0c7e9
commit 56872ee052
2 changed files with 13 additions and 4 deletions

View 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"));
}

View 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");