From: Anthony Minessale Date: Thu, 7 Jul 2016 18:39:02 +0000 (-0500) Subject: FS-9333 #resolve [Disable video refresh by sip INFO by default] X-Git-Tag: v1.6.10~1^2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f893f2486a67b9ff2cc47c9c697c957c449e2973;p=thirdparty%2Ffreeswitch.git FS-9333 #resolve [Disable video refresh by sip INFO by default] --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 6a41f87062..b43be77da4 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -1379,25 +1379,21 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi break; case SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ: - if (!switch_channel_test_flag(channel, CF_AVPF)) { - //const char *ua = switch_channel_get_variable(tech_pvt->channel, "sip_user_agent"); - //if (ua && switch_stristr("polycom", ua)) { - - //const char *pl = "\n\n\n\n\n\n\n\n"; - const char *pl = "\n\n"; - switch_time_t now = switch_micro_time_now(); + if (!switch_channel_test_flag(channel, CF_AVPF) && switch_true(switch_core_get_variable("sofia_send_info_vid_refresh"))) { + const char *pl = "\n\n"; + switch_time_t now = switch_micro_time_now(); + + if (!tech_pvt->last_vid_info || (now - tech_pvt->last_vid_info) > 500000) { - if (!tech_pvt->last_vid_info || (now - tech_pvt->last_vid_info) > 500000) { - - 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()); + 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()); + } + } break; case SWITCH_MESSAGE_INDICATE_BROADCAST: