<!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][15177] </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=15177">15177</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-10-19 14:58:23 -0500 (Mon, 19 Oct 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>clear up some more display issues and fix resume-media-on-hold sofia option</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_channelh">freeswitch/trunk/src/include/switch_channel.h</a></li>
<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="#freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_channelc">freeswitch/trunk/src/switch_channel.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_sessionc">freeswitch/trunk/src/switch_core_session.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_channelh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_channel.h (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_channel.h        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/include/switch_channel.h        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -229,6 +229,8 @@
</span><span class="cx">   \returns SWITCH_STATUS_SUCCESS if successful
</span><span class="cx"> */
</span><span class="cx"> 
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_channel_set_profile_var(switch_channel_t *channel, const char *name, const char *val);
+
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_var_check(switch_channel_t *channel, 
</span><span class="cx">                                                                                                                                           const char *varname, const char *value, switch_bool_t var_check);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_printf(switch_channel_t *channel, const char *varname,  const char *fmt, ...);
</span></span></pre></div>
<a id="freeswitchtrunksrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_types.h (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_types.h        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/include/switch_types.h        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -868,6 +868,7 @@
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="cx">         CC_MEDIA_ACK = 1,
</span><ins>+        CC_BYPASS_MEDIA = 1,
</ins><span class="cx">         /* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
</span><span class="cx">         CC_FLAG_MAX
</span><span class="cx"> } switch_channel_cap_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 (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -784,15 +784,12 @@
</span><span class="cx"> 
</span><span class="cx"> SWITCH_STANDARD_APP(set_profile_var_function)
</span><span class="cx"> {
</span><del>-        switch_caller_profile_t *caller_profile;
</del><span class="cx">         char *name, *val = NULL;
</span><span class="cx"> 
</span><del>-        caller_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(session));
-
</del><span class="cx">         if (switch_strlen_zero(data)) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No variable name specified.\n&quot;);
</span><span class="cx">         } else {
</span><del>-                name = switch_core_strdup(caller_profile-&gt;pool, data);
</del><ins>+                name = switch_core_session_strdup(session, data);
</ins><span class="cx">                 val = strchr(name, '=');
</span><span class="cx"> 
</span><span class="cx">                 if (val) {
</span><span class="lines">@@ -801,66 +798,8 @@
</span><span class="cx">                                 val = NULL;
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-
-                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;SET_PROFILE_VAR [%s]=[%s]\n&quot;, name, val ? val : &quot;UNDEF&quot;);
-
-                if (!strcasecmp(name, &quot;dialplan&quot;)) {
-                        caller_profile-&gt;dialplan = val;
-                }
-                if (!strcasecmp(name, &quot;username&quot;)) {
-                        caller_profile-&gt;username = val;
-                }
-                if (!strcasecmp(name, &quot;caller_id_name&quot;)) {
-                        caller_profile-&gt;caller_id_name = val;
-                }
-                if (!strcasecmp(name, &quot;caller_id_number&quot;)) {
-                        caller_profile-&gt;caller_id_number = val;
-                }
-                if (!strcasecmp(name, &quot;callee_id_name&quot;)) {
-                        caller_profile-&gt;callee_id_name = val;
-                }
-                if (!strcasecmp(name, &quot;callee_id_number&quot;)) {
-                        caller_profile-&gt;callee_id_number = val;
-                }
-                if (val &amp;&amp; !strcasecmp(name, &quot;caller_ton&quot;)) {
-                        caller_profile-&gt;caller_ton = (uint8_t) atoi(val);
-                }
-                if (val &amp;&amp; !strcasecmp(name, &quot;caller_numplan&quot;)) {
-                        caller_profile-&gt;caller_numplan = (uint8_t) atoi(val);
-                }
-                if (val &amp;&amp; !strcasecmp(name, &quot;destination_number_ton&quot;)) {
-                        caller_profile-&gt;destination_number_ton = (uint8_t) atoi(val);
-                }
-                if (val &amp;&amp; !strcasecmp(name, &quot;destination_number_numplan&quot;)) {
-                        caller_profile-&gt;destination_number_numplan = (uint8_t) atoi(val);
-                }
-                if (!strcasecmp(name, &quot;ani&quot;)) {
-                        caller_profile-&gt;ani = val;
-                }
-                if (!strcasecmp(name, &quot;aniii&quot;)) {
-                        caller_profile-&gt;aniii = val;
-                }
-                if (!strcasecmp(name, &quot;network_addr&quot;)) {
-                        caller_profile-&gt;network_addr = val;
-                }
-                if (!strcasecmp(name, &quot;rdnis&quot;)) {
-                        caller_profile-&gt;rdnis = val;
-                }
-                if (!strcasecmp(name, &quot;destination_number&quot;)) {
-                        caller_profile-&gt;destination_number = val;
-                }
-                if (!strcasecmp(name, &quot;uuid&quot;)) {
-                        caller_profile-&gt;uuid = val;
-                }
-                if (!strcasecmp(name, &quot;source&quot;)) {
-                        caller_profile-&gt;source = val;
-                }
-                if (!strcasecmp(name, &quot;context&quot;)) {
-                        caller_profile-&gt;context = val;
-                }
-                if (!strcasecmp(name, &quot;chan_name&quot;)) {
-                        caller_profile-&gt;chan_name = val;
-                }
</del><ins>+                
+                switch_channel_set_profile_var(switch_core_session_get_channel(session), name, val);
</ins><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -1232,7 +1232,7 @@
</span><span class="cx">                         switch_channel_clear_flag(channel, CF_PROXY_MODE);
</span><span class="cx">                         sofia_glue_tech_set_local_sdp(tech_pvt, NULL, SWITCH_FALSE);
</span><span class="cx"> 
</span><del>-                        if (!switch_channel_media_ready(channel)) {
</del><ins>+                        if (!(switch_channel_test_flag(channel, CF_ANSWERED) || switch_channel_test_flag(channel, CF_EARLY_MEDIA))) {
</ins><span class="cx">                                 if (!switch_channel_test_flag(tech_pvt-&gt;channel, CF_OUTBOUND)) {
</span><span class="cx">                                         const char *r_sdp = switch_channel_get_variable(channel, SWITCH_R_SDP_VARIABLE);
</span><span class="cx"> 
</span><span class="lines">@@ -2989,6 +2989,14 @@
</span><span class="cx">                 switch_channel_set_variable(nchannel, &quot;sip_invite_params&quot;, &quot;intercom=true&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if ((hval = switch_event_get_header(var_event, &quot;sip_callee_id_name&quot;))) {
+                caller_profile-&gt;callee_id_name = switch_core_strdup(caller_profile-&gt;pool, hval);
+        }
+
+        if ((hval = switch_event_get_header(var_event, &quot;sip_callee_id_number&quot;))) {
+                caller_profile-&gt;callee_id_number = switch_core_strdup(caller_profile-&gt;pool, hval);
+        }
+
</ins><span class="cx">         if (session) {
</span><span class="cx">                 switch_channel_t *o_channel = switch_core_session_get_channel(session);
</span><span class="cx">                 const char *vval = NULL;
</span><span class="lines">@@ -3005,7 +3013,7 @@
</span><span class="cx">                 switch_ivr_transfer_variable(session, nsession, &quot;sip-force-contact&quot;);
</span><span class="cx">                 switch_ivr_transfer_variable(session, nsession, &quot;sip_sticky_contact&quot;);
</span><span class="cx">                 switch_ivr_transfer_variable(session, nsession, &quot;sip_cid_type&quot;);
</span><del>-
</del><ins>+                
</ins><span class="cx">                 if (switch_core_session_compare(session, nsession)) {
</span><span class="cx">                         /* It's another sofia channel! so lets cache what they use as a pt for telephone event so 
</span><span class="cx">                            we can keep it the same
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -3113,11 +3113,12 @@
</span><span class="cx">                         caller_profile-&gt;network_addr = switch_core_strdup(caller_profile-&gt;pool, network_ip);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+                switch_channel_clear_flag(channel, CF_REQ_MEDIA);
+
</ins><span class="cx">                 if ((status == 180 || status == 183 || status == 200)) { 
</span><span class="cx">                         const char *x_actually_support;
</span><span class="cx"> 
</span><span class="cx">                         switch_channel_set_flag(channel, CF_MEDIA_ACK);
</span><del>-                        switch_channel_clear_flag(channel, CF_REQ_MEDIA);
</del><span class="cx"> 
</span><span class="cx">                         if ((x_actually_support = sofia_glue_get_unknown_header(sip, &quot;X-Actually-Support&quot;))) {
</span><span class="cx">                                 tech_pvt-&gt;x_actually_support_remote = switch_core_session_strdup(session, x_actually_support);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -522,6 +522,7 @@
</span><span class="cx">         tech_pvt-&gt;session = session;
</span><span class="cx">         tech_pvt-&gt;channel = switch_core_session_get_channel(session);
</span><span class="cx">         switch_channel_set_cap(tech_pvt-&gt;channel, CC_MEDIA_ACK);
</span><ins>+        switch_channel_set_cap(tech_pvt-&gt;channel, CC_BYPASS_MEDIA);
</ins><span class="cx">         
</span><span class="cx">         switch_core_session_set_private(session, tech_pvt);
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_channelc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_channel.c (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_channel.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/switch_channel.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -622,6 +622,65 @@
</span><span class="cx">         return (!switch_strlen_zero(channel-&gt;name)) ? channel-&gt;name : &quot;N/A&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_channel_set_profile_var(switch_channel_t *channel, const char *name, const char *val)
+{
+        char *v;
+        switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+        switch_mutex_lock(channel-&gt;profile_mutex);
+
+        if (!switch_strlen_zero(val)) {
+                v = switch_core_strdup(channel-&gt;caller_profile-&gt;pool, val);
+        } else {
+                v = SWITCH_BLANK_STRING;
+        }
+        
+        if (!strcasecmp(name, &quot;dialplan&quot;)) {
+                channel-&gt;caller_profile-&gt;dialplan = v;
+        } else if (!strcasecmp(name, &quot;username&quot;)) {
+                channel-&gt;caller_profile-&gt;username = v;
+        } else if (!strcasecmp(name, &quot;caller_id_name&quot;)) {
+                channel-&gt;caller_profile-&gt;caller_id_name = v;
+        } else if (!strcasecmp(name, &quot;caller_id_number&quot;)) {
+                channel-&gt;caller_profile-&gt;caller_id_number = v;
+        } else if (!strcasecmp(name, &quot;callee_id_name&quot;)) {
+                channel-&gt;caller_profile-&gt;callee_id_name = v;
+        } else if (!strcasecmp(name, &quot;callee_id_number&quot;)) {
+                channel-&gt;caller_profile-&gt;callee_id_number = v;
+        } else if (val &amp;&amp; !strcasecmp(name, &quot;caller_ton&quot;)) {
+                channel-&gt;caller_profile-&gt;caller_ton = (uint8_t) atoi(v);
+        } else if (val &amp;&amp; !strcasecmp(name, &quot;caller_numplan&quot;)) {
+                channel-&gt;caller_profile-&gt;caller_numplan = (uint8_t) atoi(v);
+        } else if (val &amp;&amp; !strcasecmp(name, &quot;destination_number_ton&quot;)) {
+                channel-&gt;caller_profile-&gt;destination_number_ton = (uint8_t) atoi(v);
+        } else if (val &amp;&amp; !strcasecmp(name, &quot;destination_number_numplan&quot;)) {
+                channel-&gt;caller_profile-&gt;destination_number_numplan = (uint8_t) atoi(v);
+        } else if (!strcasecmp(name, &quot;ani&quot;)) {
+                channel-&gt;caller_profile-&gt;ani = v;
+        } else if (!strcasecmp(name, &quot;aniii&quot;)) {
+                channel-&gt;caller_profile-&gt;aniii = v;
+        } else if (!strcasecmp(name, &quot;network_addr&quot;)) {
+                channel-&gt;caller_profile-&gt;network_addr = v;
+        } else if (!strcasecmp(name, &quot;rdnis&quot;)) {
+                channel-&gt;caller_profile-&gt;rdnis = v;
+        } else if (!strcasecmp(name, &quot;destination_number&quot;)) {
+                channel-&gt;caller_profile-&gt;destination_number = v;
+        } else if (!strcasecmp(name, &quot;uuid&quot;)) {
+                channel-&gt;caller_profile-&gt;uuid = v;
+        } else if (!strcasecmp(name, &quot;source&quot;)) {
+                channel-&gt;caller_profile-&gt;source = v;
+        } else if (!strcasecmp(name, &quot;context&quot;)) {
+                channel-&gt;caller_profile-&gt;context = v;
+        } else if (!strcasecmp(name, &quot;chan_name&quot;)) {
+                channel-&gt;caller_profile-&gt;chan_name = v;
+        } else {
+                status = SWITCH_STATUS_FALSE;
+        }
+        switch_mutex_unlock(channel-&gt;profile_mutex);
+
+        return status;
+}
+
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_var_check(switch_channel_t *channel, 
</span><span class="cx">                                                                                                                                           const char *varname, const char *value, switch_bool_t var_check)
</span><span class="cx"> {
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_sessionc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_session.c (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_session.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/switch_core_session.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -506,13 +506,21 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (switch_channel_test_flag(channel, CF_PROXY_MODE)) {
</span><del>-                                switch_channel_set_flag(peer_channel, CF_PROXY_MODE);
-                        }
-
-                        if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
-                                switch_channel_set_flag(peer_channel, CF_PROXY_MEDIA);
-                                if (switch_channel_test_flag(channel, CF_VIDEO)) {
-                                        switch_channel_set_flag(peer_channel, CF_VIDEO);
</del><ins>+                                if (switch_channel_test_cap(peer_channel, CC_BYPASS_MEDIA)) {
+                                        switch_channel_set_flag(peer_channel, CF_PROXY_MODE);
+                        
+                                        if (switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
+                                                switch_channel_set_flag(peer_channel, CF_PROXY_MEDIA);
+                                                if (switch_channel_test_flag(channel, CF_VIDEO)) {
+                                                        switch_channel_set_flag(peer_channel, CF_VIDEO);
+                                                }
+                                        }
+                                } else {
+                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, 
+                                                                          &quot;%s does not support the proxy feature, disabling.\n&quot;, 
+                                                                          switch_channel_get_name(peer_channel));
+                                        switch_channel_clear_flag(channel, CF_PROXY_MODE);
+                                        switch_channel_clear_flag(channel, CF_PROXY_MEDIA);
</ins><span class="cx">                                 }
</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 (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">         switch_core_session_message_t *msg;
</span><span class="cx">         switch_caller_profile_t *caller_profile;
</span><span class="cx">         switch_channel_t *caller_channel;
</span><del>-        const char *name, *number;
</del><ins>+        const char *name, *number, *p;
</ins><span class="cx"> 
</span><span class="cx">         caller_channel = switch_core_session_get_channel(session);
</span><span class="cx">         caller_profile = switch_channel_get_caller_profile(caller_channel);
</span><span class="lines">@@ -111,6 +111,13 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        if ((p = strrchr(number, '/'))) {
+                number = p+1;
+        }
+        if ((p = strrchr(name, '/'))) {
+                name = p+1;
+        }
+
</ins><span class="cx">         msg = switch_core_session_alloc(peer_session, sizeof(*msg));
</span><span class="cx">         MESSAGE_STAMP_FFL(msg);
</span><span class="cx">         msg-&gt;message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
</span><span class="lines">@@ -394,9 +401,9 @@
</span><span class="cx">                                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;%s Media Establishment Failed.\n&quot;, switch_channel_get_name(un));
</span><span class="cx">                                         goto end_of_bridge_loop;
</span><span class="cx">                                 }
</span><del>-                                
-                                if (ans_a) ans_b = 1; else ans_a = 1;
</del><span class="cx">                         }
</span><ins>+
+                        if (ans_a) ans_b = 1; else ans_a = 1;
</ins><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 if (originator &amp;&amp; !sent_update &amp;&amp; ans_a &amp;&amp; ans_b &amp;&amp; switch_channel_media_ack(chan_a) &amp;&amp; switch_channel_media_ack(chan_b)) {
</span><span class="lines">@@ -866,6 +873,8 @@
</span><span class="cx">                 switch_channel_set_flag(peer_channel, CF_TRANSFER);
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        switch_ivr_bridge_display(session, peer_session);
+
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</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 (15176 => 15177)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_originate.c        2009-10-19 18:55:52 UTC (rev 15176)
+++ freeswitch/trunk/src/switch_ivr_originate.c        2009-10-19 19:58:23 UTC (rev 15177)
</span><span class="lines">@@ -1725,6 +1725,14 @@
</span><span class="cx">                                 if (originate_status[i].peer_channel) {
</span><span class="cx">                                         const char *vvar;
</span><span class="cx">                                         
</span><ins>+                                        if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, &quot;origination_callee_id_name&quot;))) {
+                                                switch_channel_set_profile_var(originate_status[i].peer_channel, &quot;callee_id_name&quot;, vvar);
+                                        }
+
+                                        if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, &quot;origination_callee_id_number&quot;))) {
+                                                switch_channel_set_profile_var(originate_status[i].peer_channel, &quot;callee_id_number&quot;, vvar);
+                                        }
+
</ins><span class="cx">                                         if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, &quot;leg_timeout&quot;))) {
</span><span class="cx">                                                 int val = atoi(vvar);
</span><span class="cx">                                                 if (val &gt; 0) {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>