Merge pull request #617 from signalwire/orig_session_check

[core] add orig session check
This commit is contained in:
Andrey Volk 2020-05-08 01:38:31 +04:00 committed by GitHub
commit d945566bbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -10341,6 +10341,13 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_core_session_get_partner(session, &orig_session);
if (orig_session) {
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_AUDIO,
switch_core_session_remote_media_flow(orig_session, SWITCH_MEDIA_TYPE_AUDIO), sdp_type);
switch_core_media_set_smode(smh->session, SWITCH_MEDIA_TYPE_VIDEO,
switch_core_session_remote_media_flow(orig_session, SWITCH_MEDIA_TYPE_VIDEO), sdp_type);
}
for (i = 0; i < smh->mparams->num_codecs; i++) {
const switch_codec_implementation_t *imp = smh->codecs[i];
switch_payload_t orig_pt = 0;