From e9adbb7ac6ce215aab076f42258fa4a46fe972f2 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 12 Aug 2013 00:57:47 +0500 Subject: [PATCH] FS-5687 this patch adds a debouncer to that info message. if you still have problems try altering switch_rtp.c:5469 to add 0 condition so it skips that whole block and retest eg... if (0 && switch_rtp_test_flag(rtp_session, SWITCH_RTP_FLAG_VIDEO)) { --- src/mod/endpoints/mod_sofia/mod_sofia.c | 14 ++++++++++---- src/mod/endpoints/mod_sofia/mod_sofia.h | 1 + 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 50261d7f4e..bdee17669d 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1295,12 +1295,18 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi case SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ: { const char *pl = ""; + time_t now = switch_epoch_time_now(NULL); - if (!zstr(msg->string_arg)) { - pl = msg->string_arg; + if (!tech_pvt->last_vid_info || (now - tech_pvt->last_vid_info) > 5) { + + tech_pvt->last_vid_info = now; + + if (!zstr(msg->string_arg)) { + pl = msg->string_arg; + } + + nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/media_control+xml"), SIPTAG_PAYLOAD_STR(pl), TAG_END()); } - - nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/media_control+xml"), SIPTAG_PAYLOAD_STR(pl), TAG_END()); } break; diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.h b/src/mod/endpoints/mod_sofia/mod_sofia.h index 574e211209..a2f85806b4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.h +++ b/src/mod/endpoints/mod_sofia/mod_sofia.h @@ -752,6 +752,7 @@ struct private_object { char *respond_phrase; int respond_code; char *respond_dest; + time_t last_vid_info; };