]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4779 FS-6467 the behaviour from 4479 is now masked behind the param 3pcc-reinvite...
authorAnthony Minessale <anthm@freeswitch.org>
Mon, 28 Apr 2014 17:10:09 +0000 (22:10 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Mon, 28 Apr 2014 17:10:33 +0000 (22:10 +0500)
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_sofia/sofia.c

index b8c5655e57f796b0b4faf94200ed42087286af7d..a1c220427ef905802869be666196f01d23123c1e 100644 (file)
@@ -229,6 +229,7 @@ typedef enum {
        PFLAG_STUN_ENABLED,
        PFLAG_STUN_AUTO_DISABLE,
        PFLAG_3PCC_PROXY,
+       PFLAG_3PCC_REINVITE_BRIDGED_ON_ACK,
        PFLAG_CALLID_AS_UUID,
        PFLAG_UUID_AS_CALLID,
        PFLAG_SCROOGE,
index 28e6d6ec1548deb93ec062ca101dc39202e9053c..0ef600b7a4251d775065a5dc556702f3fe695c43 100644 (file)
@@ -4418,6 +4418,12 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
                                                if (switch_true(val)) {
                                                        sofia_set_pflag(profile, PFLAG_BLIND_REG);
                                                }
+                                       } else if (!strcasecmp(var, "3pcc-reinvite-bridged-on-ack")) {
+                                               if (switch_true(val)) {
+                                                       sofia_set_pflag(profile, PFLAG_3PCC_REINVITE_BRIDGED_ON_ACK);
+                                               } else {
+                                                       sofia_clear_pflag(profile, PFLAG_3PCC_REINVITE_BRIDGED_ON_ACK);
+                                               }
                                        } else if (!strcasecmp(var, "enable-3pcc")) {
                                                if (switch_true(val)) {
                                                        sofia_set_pflag(profile, PFLAG_3PCC);
@@ -6493,11 +6499,14 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
                                        } else {
                                                switch_core_session_message_t *msg;
 
-                                               msg = switch_core_session_alloc(other_session, sizeof(*msg));
-                                               msg->message_id = SWITCH_MESSAGE_INDICATE_MEDIA_REDIRECT;
-                                               msg->from = __FILE__;
-                                               msg->string_arg = switch_core_session_strdup(other_session, r_sdp);
-                                               switch_core_session_queue_message(other_session, msg);
+                                               if (sofia_test_pflag(profile, PFLAG_3PCC_REINVITE_BRIDGED_ON_ACK)) {
+                                                       msg = switch_core_session_alloc(other_session, sizeof(*msg));
+                                                       msg->message_id = SWITCH_MESSAGE_INDICATE_MEDIA_REDIRECT;
+                                                       msg->from = __FILE__;
+                                                       msg->string_arg = switch_core_session_strdup(other_session, r_sdp);
+                                                       switch_core_session_queue_message(other_session, msg);
+                                               }
+
                                                switch_core_session_queue_indication(other_session, SWITCH_MESSAGE_INDICATE_ANSWER);
                                        }