<!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, "No variable name specified.\n");
</span><span class="cx">         } else {
</span><del>-                name = switch_core_strdup(caller_profile->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, "SET_PROFILE_VAR [%s]=[%s]\n", name, val ? val : "UNDEF");
-
-                if (!strcasecmp(name, "dialplan")) {
-                        caller_profile->dialplan = val;
-                }
-                if (!strcasecmp(name, "username")) {
-                        caller_profile->username = val;
-                }
-                if (!strcasecmp(name, "caller_id_name")) {
-                        caller_profile->caller_id_name = val;
-                }
-                if (!strcasecmp(name, "caller_id_number")) {
-                        caller_profile->caller_id_number = val;
-                }
-                if (!strcasecmp(name, "callee_id_name")) {
-                        caller_profile->callee_id_name = val;
-                }
-                if (!strcasecmp(name, "callee_id_number")) {
-                        caller_profile->callee_id_number = val;
-                }
-                if (val && !strcasecmp(name, "caller_ton")) {
-                        caller_profile->caller_ton = (uint8_t) atoi(val);
-                }
-                if (val && !strcasecmp(name, "caller_numplan")) {
-                        caller_profile->caller_numplan = (uint8_t) atoi(val);
-                }
-                if (val && !strcasecmp(name, "destination_number_ton")) {
-                        caller_profile->destination_number_ton = (uint8_t) atoi(val);
-                }
-                if (val && !strcasecmp(name, "destination_number_numplan")) {
-                        caller_profile->destination_number_numplan = (uint8_t) atoi(val);
-                }
-                if (!strcasecmp(name, "ani")) {
-                        caller_profile->ani = val;
-                }
-                if (!strcasecmp(name, "aniii")) {
-                        caller_profile->aniii = val;
-                }
-                if (!strcasecmp(name, "network_addr")) {
-                        caller_profile->network_addr = val;
-                }
-                if (!strcasecmp(name, "rdnis")) {
-                        caller_profile->rdnis = val;
-                }
-                if (!strcasecmp(name, "destination_number")) {
-                        caller_profile->destination_number = val;
-                }
-                if (!strcasecmp(name, "uuid")) {
-                        caller_profile->uuid = val;
-                }
-                if (!strcasecmp(name, "source")) {
-                        caller_profile->source = val;
-                }
-                if (!strcasecmp(name, "context")) {
-                        caller_profile->context = val;
-                }
-                if (!strcasecmp(name, "chan_name")) {
-                        caller_profile->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->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, "sip_invite_params", "intercom=true");
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        if ((hval = switch_event_get_header(var_event, "sip_callee_id_name"))) {
+                caller_profile->callee_id_name = switch_core_strdup(caller_profile->pool, hval);
+        }
+
+        if ((hval = switch_event_get_header(var_event, "sip_callee_id_number"))) {
+                caller_profile->callee_id_number = switch_core_strdup(caller_profile->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, "sip-force-contact");
</span><span class="cx">                 switch_ivr_transfer_variable(session, nsession, "sip_sticky_contact");
</span><span class="cx">                 switch_ivr_transfer_variable(session, nsession, "sip_cid_type");
</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->network_addr = switch_core_strdup(caller_profile->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, "X-Actually-Support"))) {
</span><span class="cx">                                 tech_pvt->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->session = session;
</span><span class="cx">         tech_pvt->channel = switch_core_session_get_channel(session);
</span><span class="cx">         switch_channel_set_cap(tech_pvt->channel, CC_MEDIA_ACK);
</span><ins>+        switch_channel_set_cap(tech_pvt->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->name)) ? channel->name : "N/A";
</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->profile_mutex);
+
+        if (!switch_strlen_zero(val)) {
+                v = switch_core_strdup(channel->caller_profile->pool, val);
+        } else {
+                v = SWITCH_BLANK_STRING;
+        }
+        
+        if (!strcasecmp(name, "dialplan")) {
+                channel->caller_profile->dialplan = v;
+        } else if (!strcasecmp(name, "username")) {
+                channel->caller_profile->username = v;
+        } else if (!strcasecmp(name, "caller_id_name")) {
+                channel->caller_profile->caller_id_name = v;
+        } else if (!strcasecmp(name, "caller_id_number")) {
+                channel->caller_profile->caller_id_number = v;
+        } else if (!strcasecmp(name, "callee_id_name")) {
+                channel->caller_profile->callee_id_name = v;
+        } else if (!strcasecmp(name, "callee_id_number")) {
+                channel->caller_profile->callee_id_number = v;
+        } else if (val && !strcasecmp(name, "caller_ton")) {
+                channel->caller_profile->caller_ton = (uint8_t) atoi(v);
+        } else if (val && !strcasecmp(name, "caller_numplan")) {
+                channel->caller_profile->caller_numplan = (uint8_t) atoi(v);
+        } else if (val && !strcasecmp(name, "destination_number_ton")) {
+                channel->caller_profile->destination_number_ton = (uint8_t) atoi(v);
+        } else if (val && !strcasecmp(name, "destination_number_numplan")) {
+                channel->caller_profile->destination_number_numplan = (uint8_t) atoi(v);
+        } else if (!strcasecmp(name, "ani")) {
+                channel->caller_profile->ani = v;
+        } else if (!strcasecmp(name, "aniii")) {
+                channel->caller_profile->aniii = v;
+        } else if (!strcasecmp(name, "network_addr")) {
+                channel->caller_profile->network_addr = v;
+        } else if (!strcasecmp(name, "rdnis")) {
+                channel->caller_profile->rdnis = v;
+        } else if (!strcasecmp(name, "destination_number")) {
+                channel->caller_profile->destination_number = v;
+        } else if (!strcasecmp(name, "uuid")) {
+                channel->caller_profile->uuid = v;
+        } else if (!strcasecmp(name, "source")) {
+                channel->caller_profile->source = v;
+        } else if (!strcasecmp(name, "context")) {
+                channel->caller_profile->context = v;
+        } else if (!strcasecmp(name, "chan_name")) {
+                channel->caller_profile->chan_name = v;
+        } else {
+                status = SWITCH_STATUS_FALSE;
+        }
+        switch_mutex_unlock(channel->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,
+                                                                         "%s does not support the proxy feature, disabling.\n",
+                                                                         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->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, "%s Media Establishment Failed.\n", 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 && !sent_update && ans_a && ans_b && switch_channel_media_ack(chan_a) && 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, "origination_callee_id_name"))) {
+                                                switch_channel_set_profile_var(originate_status[i].peer_channel, "callee_id_name", vvar);
+                                        }
+
+                                        if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, "origination_callee_id_number"))) {
+                                                switch_channel_set_profile_var(originate_status[i].peer_channel, "callee_id_number", vvar);
+                                        }
+
</ins><span class="cx">                                         if ((vvar = switch_channel_get_variable(originate_status[i].peer_channel, "leg_timeout"))) {
</span><span class="cx">                                                 int val = atoi(vvar);
</span><span class="cx">                                                 if (val > 0) {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>