From 831d5892b91ce695b16d906049040e8148d4102c Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 3 Jul 2014 23:50:14 +0500 Subject: [PATCH] preserve timer name for recovery --- src/switch_core_media.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index cd0774eb83..e4f6861fff 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -5022,7 +5022,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi } if (switch_channel_up(session->channel)) { - + switch_channel_set_variable(session->channel, "rtp_use_timer_name", timer_name); + a_engine->rtp_session = switch_rtp_new(a_engine->local_sdp_ip, a_engine->local_sdp_port, a_engine->cur_payload_map->remote_sdp_ip, @@ -8687,6 +8688,9 @@ SWITCH_DECLARE (void) switch_core_media_recover_session(switch_core_session_t *s smh->mparams->remote_sdp_str = switch_core_session_strdup(session, tmp); } + if ((tmp = switch_channel_get_variable(session->channel, "rtp_use_timer_name"))) { + smh->mparams->timer_name = switch_core_session_strdup(session, tmp); + } if ((tmp = switch_channel_get_variable(session->channel, "rtp_last_audio_codec_string"))) { const char *vtmp = switch_channel_get_variable(session->channel, "rtp_last_video_codec_string");