From: Anthony Minessale Date: Sun, 11 Aug 2013 19:57:47 +0000 (+0500) Subject: FS-5687 this patch adds a debouncer to that info message. if you still have problems... X-Git-Tag: v1.4.1~18^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9adbb7ac6ce215aab076f42258fa4a46fe972f2;p=thirdparty%2Ffreeswitch.git 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)) { --- 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; - nua_info(tech_pvt->nh, SIPTAG_CONTENT_TYPE_STR("application/media_control+xml"), SIPTAG_PAYLOAD_STR(pl), TAG_END()); + 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()); + } } 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; };