]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5530 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 21 Jun 2013 02:10:23 +0000 (21:10 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 21 Jun 2013 02:10:23 +0000 (21:10 -0500)
src/switch_ivr_bridge.c

index 202c2f46f2c8c1850746dfcf76bbc892d27f520c..583fda498720a9a2e4f3de672fecfbe104bba1ad 100644 (file)
@@ -1537,7 +1537,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
                !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE) && !a_leg->clean_exit && !inner_bridge) {
                if ((state != CS_EXECUTE && state != CS_SOFT_EXECUTE && state != CS_PARK && state != CS_ROUTING) ||
                        (switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP)) {
+                       switch_call_cause_t cause = switch_channel_get_cause(peer_channel);
 
+                       if (cause && !switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
+                               switch_channel_handle_cause(caller_channel, cause);
+                       }
+                       
                        if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) {
                                switch_ivr_park_session(session);
                        } else if ((var = switch_channel_get_variable(caller_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE))) {