]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7432 send actpass on re-invites
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 8 Jun 2015 21:22:44 +0000 (16:22 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 8 Jun 2015 21:22:44 +0000 (16:22 -0500)
src/switch_core_media.c

index 2a43e6334a0b0a202d1655e4cac338621da14d23..6150519e183cba20d6bd142db63723ab63d83eea 100644 (file)
@@ -5887,9 +5887,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";
        }
 
@@ -6053,7 +6053,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) {
@@ -6661,7 +6661,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) {
@@ -7058,7 +7058,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));
                                }