--- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -7913,7 +7913,7 @@ We also check for vrtp. If it's not there, we are not allowed do any video anyway. */ if (i->vrtp) { - if (ast_test_flag(&i->flags[1], SIP_PAGE2_VIDEOSUPPORT)) + if (ast_test_flag(&i->flags[1], SIP_PAGE2_VIDEOSUPPORT_ALWAYS)) needvideo = 1; else if (!ast_format_cap_is_empty(i->prefcaps)) needvideo = ast_format_cap_has_type(i->prefcaps, AST_FORMAT_TYPE_VIDEO); /* Outbound call */ @@ -7964,6 +7964,11 @@ ast_channel_set_fd(tmp, 2, ast_rtp_instance_fd(i->vrtp, 0)); ast_channel_set_fd(tmp, 3, ast_rtp_instance_fd(i->vrtp, 1)); } + else if (i->vrtp) { + // Properly disable video if not needed + ast_rtp_instance_destroy(i->vrtp); + i->vrtp = NULL; + } if (needtext && i->trtp) { ast_channel_set_fd(tmp, 4, ast_rtp_instance_fd(i->trtp, 0)); }