From 251c4ab439eea53772aaf5636eb60bb7689f0fc9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 8 Jun 2015 16:15:16 -0500 Subject: [PATCH] FS-7432 send actpass on re-invites --- src/switch_core_media.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/switch_core_media.c b/src/switch_core_media.c index 90e69fe6f7..2e8181cc6f 100644 --- a/src/switch_core_media.c +++ b/src/switch_core_media.c @@ -6561,9 +6561,9 @@ static const char *get_media_profile_name(switch_core_session_t *session, int se } -static char *get_setup(switch_core_session_t *session) +static char *get_setup(switch_core_session_t *session, switch_sdp_type_t sdp_type) { - if (switch_channel_direction(session->channel) == SWITCH_CALL_DIRECTION_INBOUND && !switch_channel_test_flag(session->channel, CF_RECOVERING)) { + if (sdp_type == SDP_TYPE_RESPONSE) { return "active"; } @@ -6727,7 +6727,7 @@ static void generate_m(switch_core_session_t *session, char *buf, size_t buflen, if (!zstr(a_engine->local_dtls_fingerprint.type) && secure) { switch_snprintf(buf + strlen(buf), buflen - strlen(buf), "a=fingerprint:%s %s\na=setup:%s\n", a_engine->local_dtls_fingerprint.type, - a_engine->local_dtls_fingerprint.str, get_setup(session)); + a_engine->local_dtls_fingerprint.str, get_setup(session, sdp_type)); } if (smh->mparams->rtcp_audio_interval_msec) { @@ -7380,7 +7380,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess if (!zstr(a_engine->local_dtls_fingerprint.type)) { switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=fingerprint:%s %s\na=setup:%s\n", a_engine->local_dtls_fingerprint.type, - a_engine->local_dtls_fingerprint.str, get_setup(session)); + a_engine->local_dtls_fingerprint.str, get_setup(session, sdp_type)); } if (smh->mparams->rtcp_audio_interval_msec) { @@ -7786,7 +7786,7 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess if (!zstr(v_engine->local_dtls_fingerprint.type)) { switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=fingerprint:%s %s\na=setup:%s\n", v_engine->local_dtls_fingerprint.type, - v_engine->local_dtls_fingerprint.str, get_setup(session)); + v_engine->local_dtls_fingerprint.str, get_setup(session, sdp_type)); }