]> 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:15:16 +0000 (16:15 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 8 Jun 2015 21:17:53 +0000 (16:17 -0500)
src/switch_core_media.c

index 90e69fe6f7c1b709c0c384cdeada48c8dd3d0301..2e8181cc6fb3a3ad456040b5d9e397838752d6a9 100644 (file)
@@ -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));
                                }