]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix att_xfer issue MAILING_LIST-00
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 31 Jul 2009 19:09:50 +0000 (19:09 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 31 Jul 2009 19:09:50 +0000 (19:09 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14438 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr_bridge.c

index 7e2309b515c39eb22da8470cf0ab40d4215d3910..42073552c5e0753a9df99a9668c1d0b8c56026f8 100644 (file)
@@ -1511,6 +1511,7 @@ static switch_status_t xfer_on_dtmf(switch_core_session_t *session, void *input,
                        switch_channel_t *peer_channel = switch_core_session_get_channel(peer_session);
 
                        if (dtmf->digit == '#') {
+                               switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
                                return SWITCH_STATUS_FALSE;
                        }
 
index 1d7469692f3e4260de6df541c212fd573715d91c..597194133ce3493d68a043ed007330e8791e4439 100644 (file)
@@ -450,9 +450,7 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
        switch_core_session_reset(session_a, SWITCH_TRUE, SWITCH_TRUE);
        switch_channel_set_variable(chan_a, SWITCH_BRIDGE_VARIABLE, NULL);
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BRIDGE THREAD DONE [%s]\n", switch_channel_get_name(chan_a));
-       if (!inner_bridge) {
-               switch_channel_clear_flag(chan_a, CF_BRIDGED);
-       }
+       switch_channel_clear_flag(chan_a, CF_BRIDGED);
        switch_core_session_kill_channel(session_b, SWITCH_SIG_BREAK);
        switch_core_session_rwunlock(session_b);
        return NULL;
@@ -948,6 +946,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
                                switch_cond_next();
                        }
 
+                       if (inner_bridge) {
+                               if (switch_channel_ready(caller_channel)) {
+                                       switch_channel_set_flag(caller_channel, CF_BRIDGED);
+                               }
+
+                               if (switch_channel_ready(peer_channel)) {
+                                       switch_channel_set_flag(peer_channel, CF_BRIDGED);
+                               }
+                       }
+                       
                        if ((cause = switch_channel_get_cause(caller_channel))) {
                                switch_channel_set_variable(peer_channel, SWITCH_BRIDGE_HANGUP_CAUSE_VARIABLE, switch_channel_cause2str(cause));
                        }