]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4655 its not a bug its a behaviour request, try this patch
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 27 Sep 2012 19:27:28 +0000 (14:27 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 27 Sep 2012 19:27:28 +0000 (14:27 -0500)
src/mod/endpoints/mod_alsa/mod_alsa.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_rtmp/mod_rtmp.c
src/mod/endpoints/mod_skypopen/mod_skypopen.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_unicall/mod_unicall.c
src/switch_core_session.c

index bafe8bdcc167984f0f6c6d2e4445cf6a8ffee8e6..13e36ea53d9db6aa395b66a2f8b987d3a559141f 100644 (file)
@@ -758,7 +758,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                                                                                                        switch_call_cause_t *cancel_cause)
 {
 
-       if ((*new_session = switch_core_session_request(alsa_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool)) != 0) {
+       if ((*new_session = switch_core_session_request_uuid(alsa_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool, switch_event_get_header(var_event, "origination_uuid"))) != 0) {
                private_t *tech_pvt;
                switch_channel_t *channel;
                switch_caller_profile_t *caller_profile;
index abc36620ddb47834814c766f4563971261518c4b..f5487486ce6cd1b1cb9a66d8acc73eca8df84dbf 100644 (file)
@@ -1157,7 +1157,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                return retcause;
        }
 
-       if (!(*new_session = switch_core_session_request(portaudio_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool))) {
+       if (!(*new_session = switch_core_session_request_uuid(portaudio_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool, switch_event_get_header(var_event, "origination_uuid")))) {
                return retcause;
        }
 
index 0bdc4531de1a040078fb87e0c4dcaabeac46cb08..844b1483d0b3f0c21888e5c4246042093c7f9039 100644 (file)
@@ -590,7 +590,7 @@ switch_call_cause_t rtmp_outgoing_channel(switch_core_session_t *session, switch
                goto fail;
        }
        
-       if (!(*newsession = switch_core_session_request(rtmp_globals.rtmp_endpoint_interface, flags, SWITCH_CALL_DIRECTION_OUTBOUND, inpool))) {
+       if (!(*newsession = switch_core_session_request_uuid(rtmp_globals.rtmp_endpoint_interface, flags, SWITCH_CALL_DIRECTION_OUTBOUND, inpool, switch_event_get_header(var_event, "origination_uuid")))) {
                goto fail;
        }
        
index 21dea92d4f84bd7301a04d22c6f29d7e9b840ecc..43253a71e919e974036c8d9fb90721d5fe589019 100644 (file)
@@ -1261,7 +1261,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                                                                                                        switch_call_cause_t *cancel_cause)
 {
        private_t *tech_pvt = NULL;
-       if ((*new_session = switch_core_session_request(skypopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool)) != 0) {
+       if ((*new_session = switch_core_session_request_uuid(skypopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool, switch_event_get_header(var_event, "origination_uuid"))) != 0) {
                switch_channel_t *channel = NULL;
                switch_caller_profile_t *caller_profile;
                char *rdest;
index b7450e4e47b246c4b0862ef0f32496fe03e6d1d1..a9721b4c49916ec90d6d859f746e4f070460f201 100644 (file)
@@ -4538,7 +4538,8 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                goto error;
        }
 
-       if (!(nsession = switch_core_session_request(sofia_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, flags, pool))) {
+       if (!(nsession = switch_core_session_request_uuid(sofia_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, 
+                                                                                                         flags, pool, switch_event_get_header(var_event, "origination_uuid")))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Creating Session\n");
                goto error;
        }
index 75680bd243efeebc8de0fafd6c365762860a7e0e..18cd5d11d55cab36fa129a5d78009658830157cf 100644 (file)
@@ -197,7 +197,7 @@ static switch_call_cause_t unicall_incoming_channel(zap_sigmsg_t *sigmsg, switch
 
        *sp = NULL;
 
-       if (!(session = switch_core_session_request(openzap_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL))) {
+       if (!(session = switch_core_session_request_uuid(openzap_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL, switch_event_get_header(var_event, "origination_uuid")))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Initialization Error!\n");
                return ZAP_FAIL;
        }
index 94edc354886c0026983ca79f36fc2ddc17a20ebc..eb60968f5d7bda0e880fa58df5e1592e84a903df 100644 (file)
@@ -1682,6 +1682,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_set_uuid(switch_core_session
 
        switch_assert(use_uuid);
 
+       if (!strcmp(use_uuid, session->uuid_str)) {
+               return SWITCH_STATUS_SUCCESS;
+       }
+
+
        switch_mutex_lock(runtime.session_hash_mutex);
        if (switch_core_hash_find(session_manager.session_table, use_uuid)) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Duplicate UUID!\n");