]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
only honor hangup_after_bridge=true if the channel is answered
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 Oct 2007 17:56:10 +0000 (17:56 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 10 Oct 2007 17:56:10 +0000 (17:56 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5837 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_bridge.c

index 15ed086edde11eb29fdf44f677797676354b9109..bd116eb97f8359be553c8709e9d6c8fa2b27031a 100644 (file)
@@ -671,7 +671,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
 
   done:
 
-       if (switch_channel_test_flag(caller_channel, CF_ANSWERED) && switch_channel_get_state(caller_channel) < CS_HANGUP && 
+       if (switch_channel_test_flag(peer_channel, CF_ANSWERED) && 
+               switch_channel_get_state(caller_channel) < CS_HANGUP && 
                switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
                switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
        }