FS-9316 #resolve [INVITE with empty SDP from Cisco VCS cannot setup video]
This commit is contained in:
parent
2f8a3fc5f2
commit
3a3f456e88
|
@ -7402,6 +7402,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
|||
} else {
|
||||
switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_NOSDP");
|
||||
switch_core_media_choose_port(tech_pvt->session, SWITCH_MEDIA_TYPE_AUDIO, 0);
|
||||
switch_core_media_prepare_codecs(session, 1);
|
||||
switch_core_media_gen_local_sdp(session, SDP_TYPE_RESPONSE, NULL, 0, NULL, 0);
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_3PCC);
|
||||
switch_channel_set_state(channel, CS_HIBERNATE);
|
||||
|
|
|
@ -7716,7 +7716,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||
int is_outbound = switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_OUTBOUND;
|
||||
const char *vbw;
|
||||
int bw = 256;
|
||||
uint8_t fir = 0, nack = 0, pli = 0, tmmbr = 0;
|
||||
uint8_t fir = 0, nack = 0, pli = 0, tmmbr = 0, has_vid = 0;
|
||||
|
||||
switch_assert(session);
|
||||
|
||||
|
@ -8306,7 +8306,26 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
|
|||
|
||||
video:
|
||||
|
||||
if (!switch_channel_test_flag(session->channel, CF_VIDEO_POSSIBLE)) {
|
||||
|
||||
if (!switch_channel_test_flag(session->channel, CF_VIDEO_POSSIBLE) && sdp_type == SDP_TYPE_REQUEST) {
|
||||
has_vid = 0;
|
||||
} else {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < smh->mparams->num_codecs; i++) {
|
||||
const switch_codec_implementation_t *imp = smh->codecs[i];
|
||||
|
||||
|
||||
if (imp->codec_type == SWITCH_CODEC_TYPE_VIDEO) {
|
||||
has_vid = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!has_vid) {
|
||||
if (switch_channel_test_flag(session->channel, CF_VIDEO_SDP_RECVD)) {
|
||||
switch_channel_clear_flag(session->channel, CF_VIDEO_SDP_RECVD);
|
||||
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "m=video 0 %s 19\r\n",
|
||||
|
|
Loading…
Reference in New Issue