From: Anthony Minessale Date: Mon, 18 Jul 2016 20:41:19 +0000 (-0500) Subject: FS-9365 #resolve [SDP Format on reply to RE-INVITE does not appear to be RFC-4566... X-Git-Tag: v1.6.10~1^2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35ee4ee593e729dd0bc5d672fac5ef35928b68aa;p=thirdparty%2Ffreeswitch.git FS-9365 #resolve [SDP Format on reply to RE-INVITE does not appear to be RFC-4566 compliant] --- diff --git a/src/switch_core_media.c b/src/switch_core_media.c index c982f0c11b..e7aab352fb 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -8381,6 +8381,24 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess } switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "\r\n"); + + + if (!(vbw = switch_channel_get_variable(smh->session->channel, "rtp_video_max_bandwidth"))) { + vbw = switch_channel_get_variable(smh->session->channel, "rtp_video_max_bandwidth_in"); + } + + if (!vbw) { + vbw = "1mb"; + } + + bw = switch_parse_bandwidth_string(vbw); + + if (bw > 0) { + switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "b=AS:%d\r\n", bw); + //switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "b=TIAS:%d\r\n", bw); + } + + if (v_engine->codec_negotiated) { const char *of; @@ -8549,22 +8567,6 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess } } - - if (!(vbw = switch_channel_get_variable(smh->session->channel, "rtp_video_max_bandwidth"))) { - vbw = switch_channel_get_variable(smh->session->channel, "rtp_video_max_bandwidth_in"); - } - - if (!vbw) { - vbw = "1mb"; - } - - bw = switch_parse_bandwidth_string(vbw); - - if (bw > 0) { - switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "b=AS:%d\r\n", bw); - //switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "b=TIAS:%d\r\n", bw); - } - if (sdp_type == SDP_TYPE_REQUEST) { fir++; pli++;