<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][15105] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=15105">15105</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-10-06 23:30:19 -0500 (Tue, 06 Oct 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>make moc happy</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_typesh">freeswitch/trunk/src/include/switch_types.h</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc">freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_fifomod_fifoc">freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_channelc">freeswitch/trunk/src/switch_channel.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivrc">freeswitch/trunk/src/switch_ivr.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_bridgec">freeswitch/trunk/src/switch_ivr_bridge.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_originatec">freeswitch/trunk/src/switch_ivr_originate.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_types.h (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_types.h        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/include/switch_types.h        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -128,6 +128,7 @@
</span><span class="cx"> #define SWITCH_CHANNEL_EXECUTE_ON_RING_VARIABLE "execute_on_ring"
</span><span class="cx"> #define SWITCH_CALL_TIMEOUT_VARIABLE "call_timeout"
</span><span class="cx"> #define SWITCH_HOLDING_UUID_VARIABLE "holding_uuid"
</span><ins>+#define SWITCH_SOFT_HOLDING_UUID_VARIABLE "soft_holding_uuid"
</ins><span class="cx"> #define SWITCH_API_BRIDGE_END_VARIABLE "api_after_bridge"
</span><span class="cx"> #define SWITCH_API_HANGUP_HOOK_VARIABLE "api_hangup_hook"
</span><span class="cx"> #define SWITCH_SESSION_IN_HANGUP_HOOK_VARIABLE "session_in_hangup_hook"
</span><span class="lines">@@ -869,7 +870,7 @@
</span><span class="cx">         CF_ANSWERED = 1,
</span><span class="cx">         CF_OUTBOUND,
</span><span class="cx">         CF_EARLY_MEDIA,
</span><del>-        CF_ORIGINATOR,
</del><ins>+        CF_BRIDGE_ORIGINATOR,
</ins><span class="cx">         CF_TRANSFER,
</span><span class="cx">         CF_ACCEPT_CNG,
</span><span class="cx">         CF_REDIRECT,
</span><span class="lines">@@ -903,6 +904,8 @@
</span><span class="cx">         CF_REPORTING,
</span><span class="cx">         CF_PARK,
</span><span class="cx">         CF_TIMESTAMP_SET,
</span><ins>+        CF_ORIGINATOR,
+        CF_XFER_ZOMBIE,
</ins><span class="cx">         /* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
</span><span class="cx">         CF_FLAG_MAX
</span><span class="cx"> } switch_channel_flag_t;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -1533,7 +1533,7 @@
</span><span class="cx">                                 switch_caller_extension_t *extension = NULL;
</span><span class="cx">                                 const char *app = "three_way";
</span><span class="cx">                                 const char *app_arg = switch_core_session_get_uuid(session);
</span><del>-                                const char *holding = switch_channel_get_variable(channel, SWITCH_HOLDING_UUID_VARIABLE);
</del><ins>+                                const char *holding = switch_channel_get_variable(channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
</ins><span class="cx">                                 switch_core_session_t *b_session;
</span><span class="cx">
</span><span class="cx">                                 if (holding && (b_session = switch_core_session_locate(holding))) {
</span><span class="lines">@@ -1603,9 +1603,9 @@
</span><span class="cx">                 bond = switch_core_session_strdup(session, bond);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_channel_set_variable(channel, SWITCH_HOLDING_UUID_VARIABLE, bond);
</del><ins>+        switch_channel_set_variable(channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE, bond);
+        switch_channel_set_flag(channel, CF_XFER_ZOMBIE);
</ins><span class="cx">
</span><del>-
</del><span class="cx">         if ((var = switch_channel_get_variable(channel, SWITCH_CALL_TIMEOUT_VARIABLE))) {
</span><span class="cx">                 timelimit = atoi(var);
</span><span class="cx">         }
</span><span class="lines">@@ -1654,7 +1654,8 @@
</span><span class="cx">         switch_core_session_rwunlock(peer_session);
</span><span class="cx">
</span><span class="cx"> end:
</span><del>-        switch_channel_set_variable(channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
</del><ins>+        switch_channel_set_variable(channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE, NULL);
+        switch_channel_clear_flag(channel, CF_XFER_ZOMBIE);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SWITCH_STANDARD_APP(read_function)
</span><span class="lines">@@ -1906,6 +1907,35 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
+
+SWITCH_STANDARD_APP(endless_playback_function)
+{
+        switch_channel_t *channel = switch_core_session_get_channel(session);
+        switch_status_t status = SWITCH_STATUS_SUCCESS;
+        const char *file = data;
+        
+        while(switch_channel_ready(channel)) {
+                if ((status = switch_ivr_play_file(session, NULL, file, NULL)) == SWITCH_STATUS_NOTFOUND) {
+                        break;
+                }
+        }
+
+        switch (status) {
+        case SWITCH_STATUS_SUCCESS:
+        case SWITCH_STATUS_BREAK:
+                switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "FILE PLAYED");
+                break;
+        case SWITCH_STATUS_NOTFOUND:
+                switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "FILE NOT FOUND");
+                break;
+        default:
+                switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "PLAYBACK ERROR");
+                break;
+        }
+
+}
+
</ins><span class="cx"> SWITCH_STANDARD_APP(gentones_function)
</span><span class="cx"> {
</span><span class="cx">         char *tone_script = NULL;
</span><span class="lines">@@ -2791,6 +2821,8 @@
</span><span class="cx">         SWITCH_ADD_APP(app_interface, "park_state", "Park State", "Park State", park_state_function, "", SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, "gentones", "Generate Tones", "Generate tones to the channel", gentones_function, "<tgml_script>[|<loops>]", SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, "playback", "Playback File", "Playback a file to the channel", playback_function, "<path>", SAF_NONE);
</span><ins>+        SWITCH_ADD_APP(app_interface, "endless_playback", "Playback File Endlessly", "Endlessly Playback a file to the channel",
+                                 endless_playback_function, "<path>", SAF_NONE);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, "att_xfer", "Attended Transfer", "Attended Transfer", att_xfer_function, "<channel_url>", SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, "read", "Read Digits", "Read Digits", read_function, "<min> <max> <file> <var_name> <timeout> <terminators>", SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, "play_and_get_digits", "Play and get Digits", "Play and get Digits",
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_fifomod_fifoc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/mod/applications/mod_fifo/mod_fifo.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">
</span><span class="cx">                         const char *consumer_exit_key = switch_channel_get_variable(channel, "fifo_consumer_exit_key");
</span><span class="cx">
</span><del>-                        if (switch_channel_test_flag(switch_core_session_get_channel(session), CF_ORIGINATOR)) {
</del><ins>+                        if (switch_channel_test_flag(switch_core_session_get_channel(session), CF_BRIDGE_ORIGINATOR)) {
</ins><span class="cx">                                 if ( consumer_exit_key && dtmf->digit == *consumer_exit_key ) {
</span><span class="cx">                                         switch_channel_hangup(bchan, SWITCH_CAUSE_NORMAL_CLEARING);
</span><span class="cx">                                         return SWITCH_STATUS_BREAK;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -4117,8 +4117,46 @@
</span><span class="cx">
</span><span class="cx">                                                 br_a = switch_channel_get_variable(channel_a, SWITCH_SIGNAL_BOND_VARIABLE);
</span><span class="cx">                                                 br_b = switch_channel_get_variable(channel_b, SWITCH_SIGNAL_BOND_VARIABLE);
</span><ins>+                                                
+                                                if (switch_channel_test_flag(channel_b, CF_ORIGINATOR)) {
+                                                        switch_core_session_t *a_session;
</ins><span class="cx">
</span><del>-                                                if (br_a && br_b) {
</del><ins>+                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE,
+                                                                                         "Attended Transfer on originating session %s\n", switch_core_session_get_uuid(b_session));
+                                                        
+
+                                                        
+                                                        switch_channel_set_variable(channel_b, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER");
+                                                        
+                                                        
+                                                        sofia_clear_flag_locked(b_tech_pvt, TFLAG_SIP_HOLD);
+                                                        sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
+
+                                                        switch_channel_set_variable(channel_b, SWITCH_HOLDING_UUID_VARIABLE, br_a);
+                                                        switch_channel_set_flag(channel_b, CF_XFER_ZOMBIE);
+
+                                                        if ((a_session = switch_core_session_locate(br_a))) {
+                                                                const char *moh = profile->hold_music;
+                                                                switch_channel_t *a_channel = switch_core_session_get_channel(a_session);
+                                                                const char *tmp;
+
+                                                                if ((tmp = switch_channel_get_variable(a_channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
+                                                                        moh = tmp;
+                                                                }
+                                                                //switch_channel_set_variable(a_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE, "true");
+                                                                switch_channel_set_variable_printf(a_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, "'endless_playback:%s':inline", moh);
+                                                                //switch_channel_set_variable_printf(a_channel, "park_command", "moh");
+                                                                switch_core_session_rwunlock(a_session);
+                                                        }
+
+                                                        nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
+                                                                         NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 200 OK"), SIPTAG_EVENT_STR(etmp), TAG_END());
+
+                                                        //switch_channel_set_variable(channel_b, "park_timeout", "2");
+                                                        //switch_channel_set_state(channel_b, CS_PARK);
+                                                        
+                                                                                        
+                                                } else if (br_a && br_b) {
</ins><span class="cx">                                                         switch_core_session_t *new_b_session = NULL, *a_session = NULL, *tmp = NULL;
</span><span class="cx">                                                 
</span><span class="cx">                                                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Attended Transfer [%s][%s]\n",
</span><span class="lines">@@ -4138,8 +4176,9 @@
</span><span class="cx">
</span><span class="cx">                                                         sofia_clear_flag_locked(b_tech_pvt, TFLAG_SIP_HOLD);
</span><span class="cx">                                                         sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
</span><del>-                                                        switch_channel_set_variable(switch_core_session_get_channel(b_session), "park_timeout", "2");
-                                                        switch_channel_set_state(switch_core_session_get_channel(b_session), CS_PARK);
</del><ins>+                                                        switch_channel_set_variable(channel_b, "park_timeout", "2");
+                                                        switch_channel_set_state(channel_b, CS_PARK);
+                                                        
</ins><span class="cx">
</span><span class="cx">                                                         new_b_session = switch_core_session_locate(br_b);
</span><span class="cx">                                                         a_session = switch_core_session_locate(br_a);
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_channelc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_channel.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_channel.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/switch_channel.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -1706,10 +1706,11 @@
</span><span class="cx">         switch_channel_clear_flag(channel, CF_BLOCK_STATE);
</span><span class="cx">         
</span><span class="cx">         if (channel->state < CS_HANGUP) {
</span><del>-                switch_channel_state_t last_state = channel->state;
</del><ins>+                switch_channel_state_t last_state;
</ins><span class="cx">                 switch_event_t *event;
</span><span class="cx">
</span><span class="cx">                 switch_mutex_lock(channel->state_mutex);
</span><ins>+                last_state = channel->state;
</ins><span class="cx">                 channel->state = CS_HANGUP;
</span><span class="cx">                 switch_mutex_unlock(channel->state_mutex);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivrc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/switch_ivr.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -666,6 +666,7 @@
</span><span class="cx">                         expires = switch_epoch_time_now(NULL) + timeout;
</span><span class="cx">                 }
</span><span class="cx">                 switch_channel_set_variable(channel, "park_timeout", NULL);
</span><ins>+                switch_channel_set_variable(channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE, NULL);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         switch_channel_set_flag(channel, CF_CONTROLLED);
</span><span class="lines">@@ -1150,7 +1151,7 @@
</span><span class="cx">         if ((session = switch_core_session_locate(uuid))) {
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">
</span><del>-                if ((flags & SMF_REBRIDGE) && !switch_channel_test_flag(channel, CF_ORIGINATOR)) {
</del><ins>+                if ((flags & SMF_REBRIDGE) && !switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
</ins><span class="cx">                         swap = 1;
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1214,7 +1215,7 @@
</span><span class="cx">                 status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">                 channel = switch_core_session_get_channel(session);
</span><span class="cx">
</span><del>-                if ((flags & SMF_REBRIDGE) && !switch_channel_test_flag(channel, CF_ORIGINATOR)) {
</del><ins>+                if ((flags & SMF_REBRIDGE) && !switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
</ins><span class="cx">                         swap = 1;
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_bridgec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_bridge.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">         chan_b = switch_core_session_get_channel(session_b);
</span><span class="cx">
</span><span class="cx">         ans_a = switch_channel_test_flag(chan_a, CF_ANSWERED);
</span><del>-        if ((originator = switch_channel_test_flag(chan_a, CF_ORIGINATOR))) {
</del><ins>+        if ((originator = switch_channel_test_flag(chan_a, CF_BRIDGE_ORIGINATOR))) {
</ins><span class="cx">                 pre_b = switch_channel_test_flag(chan_a, CF_EARLY_MEDIA);
</span><span class="cx">                 ans_b = switch_channel_test_flag(chan_b, CF_ANSWERED);
</span><span class="cx">         }
</span><span class="lines">@@ -478,7 +478,9 @@
</span><span class="cx">         int argc;
</span><span class="cx">         char *argv[4] = { 0 };
</span><span class="cx">         char *mydata;
</span><del>-        
</del><ins>+
+        switch_channel_set_variable(switch_core_session_get_channel(session), SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, NULL);
+
</ins><span class="cx">         if (!switch_strlen_zero(where) && (mydata = switch_core_session_strdup(session, where))) {
</span><span class="cx">                 if ((argc = switch_separate_string(mydata, ':', argv, (sizeof(argv) / sizeof(argv[0])))) >= 1) {
</span><span class="cx">                         switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
</span><span class="lines">@@ -583,7 +585,7 @@
</span><span class="cx">
</span><span class="cx">         switch_channel_clear_flag(channel, CF_ORIGINATING);
</span><span class="cx">
</span><del>-        if (switch_channel_test_flag(channel, CF_ORIGINATOR)) {
</del><ins>+        if (switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
</ins><span class="cx">                 switch_channel_set_state(channel, CS_SOFT_EXECUTE);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -605,11 +607,11 @@
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM SOFT_EXECUTE\n", switch_channel_get_name(channel));
</span><span class="cx">         switch_channel_clear_state_handler(channel, &uuid_bridge_state_handlers);
</span><span class="cx">
</span><del>-        if (!switch_channel_test_flag(channel, CF_ORIGINATOR)) {
</del><ins>+        if (!switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
</ins><span class="cx">                 return SWITCH_STATUS_SUCCESS;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_channel_clear_flag(channel, CF_ORIGINATOR);
</del><ins>+        switch_channel_clear_flag(channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">         
</span><span class="cx">         if ((other_uuid = switch_channel_get_variable(channel, SWITCH_UUID_BRIDGE)) && (other_session = switch_core_session_locate(other_uuid))) {
</span><span class="cx">                 switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
</span><span class="lines">@@ -731,8 +733,8 @@
</span><span class="cx"> switch_core_session_rwunlock(other_session);
</span><span class="cx"> }
</span><span class="cx">         
</span><del>-        if (switch_channel_test_flag(channel, CF_ORIGINATOR)) {
-                switch_channel_clear_flag(channel, CF_ORIGINATOR);
</del><ins>+        if (switch_channel_test_flag(channel, CF_BRIDGE_ORIGINATOR)) {
+                switch_channel_clear_flag(channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">                 if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_UNBRIDGE) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         switch_channel_event_set_data(channel, event);
</span><span class="cx">                         switch_event_fire(&event);
</span><span class="lines">@@ -772,7 +774,7 @@
</span><span class="cx">         switch_channel_set_variable(caller_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE, switch_core_session_get_uuid(peer_session));
</span><span class="cx">         switch_channel_set_variable(peer_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE, switch_core_session_get_uuid(session));
</span><span class="cx">
</span><del>-        switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
</del><ins>+        switch_channel_set_flag(caller_channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">
</span><span class="cx">         switch_channel_clear_state_handler(caller_channel, NULL);
</span><span class="cx">         switch_channel_clear_state_handler(peer_channel, NULL);
</span><span class="lines">@@ -837,7 +839,7 @@
</span><span class="cx">                 return switch_ivr_signal_bridge(session, peer_session);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
</del><ins>+        switch_channel_set_flag(caller_channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">
</span><span class="cx">         b_leg->session = peer_session;
</span><span class="cx">         switch_copy_string(b_leg->b_uuid, switch_core_session_get_uuid(session), sizeof(b_leg->b_uuid));
</span><span class="lines">@@ -962,7 +964,7 @@
</span><span class="cx">                         switch_channel_set_state(peer_channel, CS_EXCHANGE_MEDIA);
</span><span class="cx">                         audio_bridge_thread(NULL, (void *) a_leg);
</span><span class="cx">                         
</span><del>-                        switch_channel_clear_flag(caller_channel, CF_ORIGINATOR);
</del><ins>+                        switch_channel_clear_flag(caller_channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">
</span><span class="cx">                         while (switch_channel_get_state(peer_channel) == CS_EXCHANGE_MEDIA) {
</span><span class="cx">                                 switch_cond_next();
</span><span class="lines">@@ -1184,10 +1186,13 @@
</span><span class="cx">                         switch_channel_clear_flag(originatee_channel, CF_ORIGINATING);
</span><span class="cx">
</span><span class="cx">                         /* change the states and let the chips fall where they may */
</span><ins>+
+                        switch_channel_set_variable(originator_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE, NULL);
+                        switch_channel_set_variable(originatee_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE, NULL);
</ins><span class="cx">                         switch_channel_clear_state_handler(originator_channel, NULL);
</span><span class="cx">                         switch_channel_clear_state_handler(originatee_channel, NULL);
</span><del>-                        switch_channel_set_state_flag(originator_channel, CF_ORIGINATOR);
-                        switch_channel_clear_flag(originatee_channel, CF_ORIGINATOR);
</del><ins>+                        switch_channel_set_state_flag(originator_channel, CF_BRIDGE_ORIGINATOR);
+                        switch_channel_clear_flag(originatee_channel, CF_BRIDGE_ORIGINATOR);
</ins><span class="cx">                         switch_channel_add_state_handler(originator_channel, &uuid_bridge_state_handlers);
</span><span class="cx">                         switch_channel_add_state_handler(originatee_channel, &uuid_bridge_state_handlers);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_originatec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_originate.c (15104 => 15105)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_originate.c        2009-10-07 02:49:23 UTC (rev 15104)
+++ freeswitch/trunk/src/switch_ivr_originate.c        2009-10-07 04:30:19 UTC (rev 15105)
</span><span class="lines">@@ -118,6 +118,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> typedef enum {
</span><ins>+        IDX_KEY_CANCEL = -4,
</ins><span class="cx">         IDX_TIMEOUT = -3,
</span><span class="cx">         IDX_CANCEL = -2,
</span><span class="cx">         IDX_NADA = -1
</span><span class="lines">@@ -661,9 +662,14 @@
</span><span class="cx">         const char *var;
</span><span class="cx">         switch_time_t start = 0;
</span><span class="cx">         const char *cancel_key = NULL;
</span><ins>+        switch_channel_state_t wait_state = 0;
</ins><span class="cx">
</span><span class="cx">         switch_assert(peer_channel);
</span><span class="cx">         
</span><ins>+        if (switch_channel_get_state(peer_channel) == CS_RESET) {
+                switch_channel_set_state(peer_channel, CS_SOFT_EXECUTE);
+        }
+
</ins><span class="cx">         if (session) {
</span><span class="cx">                 caller_channel = switch_core_session_get_channel(session);
</span><span class="cx">         }
</span><span class="lines">@@ -810,8 +816,11 @@
</span><span class="cx">
</span><span class="cx"> no_ringback:
</span><span class="cx">
</span><del>-        while (switch_channel_ready(peer_channel)
-                 && !(switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA))) {
</del><ins>+        if (caller_channel) {
+                wait_state = switch_channel_get_state(caller_channel);
+        }
+
+        while (switch_channel_ready(peer_channel) && !switch_channel_media_ready(peer_channel)) {
</ins><span class="cx">                 int diff = (int) (switch_micro_time_now() - start);
</span><span class="cx">
</span><span class="cx">                 if (caller_channel && cancel_key) {
</span><span class="lines">@@ -826,6 +835,10 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                if (caller_channel && switch_channel_get_state(caller_channel) != wait_state) {
+                        goto done;
+                }
+
</ins><span class="cx">                 if (diff > timelimit) {
</span><span class="cx">                         status = SWITCH_STATUS_TIMEOUT;
</span><span class="cx">                         goto done;
</span><span class="lines">@@ -918,7 +931,18 @@
</span><span class="cx">
</span><span class="cx"> end:
</span><span class="cx">
</span><del>-        return (!caller_channel || switch_channel_ready(caller_channel)) ? status : SWITCH_STATUS_FALSE;
</del><ins>+        if (!switch_channel_media_ready(peer_channel)) {
+                if (switch_channel_up(peer_channel)) {
+                        switch_channel_hangup(peer_channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                }
+                status = SWITCH_STATUS_FALSE;
+        }
+        
+        if (caller_channel && !switch_channel_ready(caller_channel)) {
+                status = SWITCH_STATUS_FALSE;
+        }
+
+        return status;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SWITCH_DECLARE(void) switch_process_import(switch_core_session_t *session, switch_channel_t *peer_channel, const char *varname)
</span><span class="lines">@@ -945,6 +969,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><ins>+#define peer_eligible(_peer) (_peer && !(switch_channel_test_flag(_peer, CF_TRANSFER) || \
+                                                                                 switch_channel_test_flag(_peer, CF_REDIRECT) || \
+                                                                                 switch_channel_test_flag(_peer, CF_BRIDGED) || \
+                                                                                 switch_channel_get_state(_peer) == CS_RESET || \
+                                                                                 !switch_channel_test_flag(_peer, CF_ORIGINATING)))
+
</ins><span class="cx"> #define MAX_PEERS 128
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
</span><span class="cx">                                                                                                          switch_core_session_t **bleg,
</span><span class="lines">@@ -981,6 +1011,7 @@
</span><span class="cx">         uint8_t pass = 0;
</span><span class="cx">         char *odata, *var;
</span><span class="cx">         switch_call_cause_t reason = SWITCH_CAUSE_NONE;
</span><ins>+        switch_call_cause_t force_reason = SWITCH_CAUSE_NONE;
</ins><span class="cx">         uint8_t to = 0;
</span><span class="cx">         char *var_val, *vars = NULL;
</span><span class="cx">         int var_block_count = 0;
</span><span class="lines">@@ -998,9 +1029,12 @@
</span><span class="cx">         int cdr_total = 0;
</span><span class="cx">         int local_clobber = 0;
</span><span class="cx">         const char *cancel_key = NULL;
</span><ins>+        const char *holding = NULL;
+        switch_channel_state_t wait_state = 0;
</ins><span class="cx">
</span><span class="cx">         if (session) {
</span><span class="cx">                 caller_channel = switch_core_session_get_channel(session);
</span><ins>+                switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
</ins><span class="cx">                 oglobals.session = session;
</span><span class="cx">
</span><span class="cx">                 if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PROXY_MEDIA_VARIABLE))) {
</span><span class="lines">@@ -1925,7 +1959,13 @@
</span><span class="cx">                                 oglobals.early_ok = 0;
</span><span class="cx">                         }
</span><span class="cx"> #endif
</span><del>-                        while ((!caller_channel || switch_channel_ready(caller_channel)) && check_channel_status(&oglobals, originate_status, and_argc)) {
</del><ins>+
+                        if (caller_channel) {
+                                wait_state = switch_channel_get_state(caller_channel);
+                        }
+                        
+                        while ((!caller_channel || switch_channel_ready(caller_channel) || switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) &&
+                                 check_channel_status(&oglobals, originate_status, and_argc)) {
</ins><span class="cx">                                 time_t elapsed = switch_epoch_time_now(NULL) - start;
</span><span class="cx">                                 if (caller_channel && !oglobals.sent_ring && oglobals.ring_ready && !oglobals.return_ring_ready) {
</span><span class="cx">                                         switch_channel_ring_ready(caller_channel);
</span><span class="lines">@@ -1939,6 +1979,11 @@
</span><span class="cx">                                         switch_ivr_parse_all_events(oglobals.session);
</span><span class="cx">                                 }
</span><span class="cx">
</span><ins>+                                if (caller_channel && switch_channel_get_state(caller_channel) != wait_state && !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
+                                        oglobals.idx = IDX_NADA;
+ goto notready;
+                                }
+
</ins><span class="cx">                                 if (!oglobals.sent_ring && !oglobals.progress && (progress_timelimit_sec && elapsed > (time_t) progress_timelimit_sec)) {
</span><span class="cx">                                         oglobals.idx = IDX_TIMEOUT;
</span><span class="cx">                                         goto notready;
</span><span class="lines">@@ -1991,9 +2036,10 @@
</span><span class="cx">                                 if (oglobals.session &&
</span><span class="cx">                                         !switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&
</span><span class="cx">                                         !switch_channel_test_flag(caller_channel, CF_PROXY_MEDIA) &&
</span><ins>+                                        !switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE) &&
</ins><span class="cx">                                         (ringback_data
</span><span class="cx">                                          || (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)))) {
</span><del>-
</del><ins>+                                        
</ins><span class="cx">                                         switch_status_t tstatus = SWITCH_STATUS_SUCCESS;
</span><span class="cx">                                         int silence = 0;
</span><span class="cx">
</span><span class="lines">@@ -2002,7 +2048,7 @@
</span><span class="cx">                                                         switch_dtmf_t dtmf = { 0, 0 };
</span><span class="cx">                                                         if (switch_channel_dequeue_dtmf(caller_channel, &dtmf) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                                                 if (dtmf.digit == *cancel_key) {
</span><del>-                                                                        oglobals.idx = IDX_CANCEL;
</del><ins>+                                                                        oglobals.idx = IDX_KEY_CANCEL;
</ins><span class="cx">                                                                         goto notready;
</span><span class="cx">                                                                 }
</span><span class="cx">                                                         }
</span><span class="lines">@@ -2079,6 +2125,17 @@
</span><span class="cx">
</span><span class="cx">                  notready:
</span><span class="cx">
</span><ins>+                        if (caller_channel) {
+                                const char *soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
+                                holding = switch_channel_get_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE);
+                                switch_channel_set_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
+
+                                if (soft_holding && switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
+                                        holding = soft_holding;
+                                        switch_channel_set_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE, NULL);
+                                }
+                        }
+                        
</ins><span class="cx">                         if (caller_channel && !switch_channel_ready(caller_channel)) {
</span><span class="cx">                                 oglobals.idx = IDX_CANCEL;
</span><span class="cx">                         }
</span><span class="lines">@@ -2088,26 +2145,86 @@
</span><span class="cx">                                 switch_core_session_reset(oglobals.session, SWITCH_FALSE, SWITCH_TRUE);
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        for (i = 0; i < and_argc; i++) {
-                                if (!originate_status[i].peer_channel) {
-                                        continue;
</del><ins>+                        if ((oglobals.idx == IDX_TIMEOUT || oglobals.idx == IDX_KEY_CANCEL) && switch_channel_ready(caller_channel)) {
+                                holding = NULL;
+                        }
+
+                        if (holding) {
+                                if (oglobals.idx > IDX_NADA) {
+                                        peer_session = originate_status[oglobals.idx].peer_session;
+                                        peer_channel = originate_status[oglobals.idx].peer_channel;
+                                        originate_status[oglobals.idx].peer_channel = NULL;
+                                } else if (and_argc == 1) {
+                                        peer_session = originate_status[0].peer_session;
+                                        peer_channel = originate_status[0].peer_channel;
+                                        originate_status[0].peer_channel = NULL;
+                                } else {
+                                        for (i = 0; i < and_argc; i++) {
+                                                if (!peer_eligible(originate_status[i].peer_channel)) {
+                                                        continue;
+                                                }
+                                                if (switch_channel_media_ready(originate_status[i].peer_channel)) {
+                                                        peer_session = originate_status[i].peer_session;
+                                                        peer_channel = originate_status[i].peer_channel;
+                                                        originate_status[i].peer_channel = NULL;
+                                                        goto end_search;
+                                                }
+                                        }
+                                        for (i = 0; i < and_argc; i++) {
+                                                if (!peer_eligible(originate_status[i].peer_channel)) {
+                                                        continue;
+                                                }
+                                                if (switch_channel_up(originate_status[i].peer_channel)) {
+                                                        peer_session = originate_status[i].peer_session;
+                                                        peer_channel = originate_status[i].peer_channel;
+                                                        originate_status[i].peer_channel = NULL;
+                                                        break;
+                                                }
+                                        }
</ins><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                //switch_channel_clear_flag(originate_status[i].peer_channel, CF_BLOCK_STATE);
</del><ins>+                        end_search:
</ins><span class="cx">
</span><del>-                                if (switch_channel_test_flag(originate_status[i].peer_channel, CF_TRANSFER)
-                                        || switch_channel_test_flag(originate_status[i].peer_channel, CF_REDIRECT)
-                                        || switch_channel_test_flag(originate_status[i].peer_channel, CF_BRIDGED) ||
-                                        switch_channel_get_state(originate_status[i].peer_channel) == CS_RESET ||
-                                        !switch_channel_test_flag(originate_status[i].peer_channel, CF_ORIGINATING)
-                                        ) {
</del><ins>+
+                                if (peer_channel && switch_channel_ready(peer_channel)) {
+                                        force_reason = SWITCH_CAUSE_ATTENDED_TRANSFER;
+                                        switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(peer_session));
+                                        oglobals.idx = IDX_NADA;
+                                        if (caller_channel) {
+                                                switch_channel_hangup(caller_channel, SWITCH_CAUSE_ATTENDED_TRANSFER);
+                                        }
+                                        switch_core_session_rwunlock(peer_session);
+                                } else {
+                                        switch_core_session_t *holding_session;
+
+                                        if ((holding_session = switch_core_session_locate(holding))) {
+                                                switch_channel_t *holding_channel = switch_core_session_get_channel(holding_session);
+                                                if (caller_channel && switch_channel_ready(caller_channel)) {
+                                                        switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(session));
+                                                } else {
+                                                        switch_channel_hangup(holding_channel, SWITCH_CAUSE_NORMAL_UNSPECIFIED);
+                                                }
+                                                switch_core_session_rwunlock(holding_session);
+                                        }
+                                }
+
+                                peer_session = NULL;
+                                peer_channel = NULL;
+                                
+                        }
+
+
+                        for (i = 0; i < and_argc; i++) {
+                                if (!peer_eligible(originate_status[i].peer_channel)) {
</ins><span class="cx">                                         continue;
</span><span class="cx">                                 }
</span><del>-
</del><ins>+                                
</ins><span class="cx">                                 if (i != oglobals.idx) {
</span><del>-                                        const char *holding = NULL;
</del><ins>+                                        holding = NULL;
</ins><span class="cx">
</span><del>-                                        if (oglobals.idx == IDX_TIMEOUT || to) {
</del><ins>+                                        if (force_reason != SWITCH_CAUSE_NONE) {
+                                                reason = force_reason;
+                                        } else if (oglobals.idx == IDX_TIMEOUT || to) {
</ins><span class="cx">                                                 reason = SWITCH_CAUSE_NO_ANSWER;
</span><span class="cx">                                         } else {
</span><span class="cx">                                                 if (oglobals.idx == IDX_CANCEL) {
</span><span class="lines">@@ -2122,19 +2239,19 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         if (switch_channel_up(originate_status[i].peer_channel)) {
</span><span class="cx">                                                 if (caller_channel && i == 0) {
</span><del>-                                                        holding = switch_channel_get_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE);
-                                                        switch_channel_set_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
-                                                }
-                                                if (holding && oglobals.idx != IDX_TIMEOUT && oglobals.idx != IDX_CANCEL) {
-                                                        switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(originate_status[i].peer_session));
-                                                } else {
</del><ins>+ holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
+ switch_channel_set_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE, NULL);
+ }
+                                                
+                                                if (holding && oglobals.idx != IDX_TIMEOUT && oglobals.idx != IDX_KEY_CANCEL) {
+ switch_ivr_uuid_bridge(holding, switch_core_session_get_uuid(originate_status[i].peer_session));
+ } else {
</ins><span class="cx">                                                         switch_channel_hangup(originate_status[i].peer_channel, reason);
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><del>-
-
</del><ins>+                        
</ins><span class="cx">                         if (oglobals.idx > IDX_NADA) {
</span><span class="cx">                                 peer_session = originate_status[oglobals.idx].peer_session;
</span><span class="cx">                                 peer_channel = originate_status[oglobals.idx].peer_channel;
</span><span class="lines">@@ -2384,6 +2501,11 @@
</span><span class="cx">         switch_safe_free(write_frame.data);
</span><span class="cx">         switch_safe_free(fail_on_single_reject_var);
</span><span class="cx">
</span><ins>+        if (caller_channel) {
+                switch_channel_clear_flag(caller_channel, CF_ORIGINATOR);
+                switch_channel_clear_flag(caller_channel, CF_XFER_ZOMBIE);
+        }
+
</ins><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>