<!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][15658] </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=15658">15658</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-11-24 12:52:57 -0600 (Tue, 24 Nov 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>add separate inbound/outound codec prefs params to sofia profile original codec-prefs sets both to the same value for back-compat</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkconfsip_profilesexternalxml">freeswitch/trunk/conf/sip_profiles/external.xml</a></li>
<li><a href="#freeswitchtrunkconfsip_profilesinternalipv6xml">freeswitch/trunk/conf/sip_profiles/internal-ipv6.xml</a></li>
<li><a href="#freeswitchtrunkconfsip_profilesinternalxml">freeswitch/trunk/conf/sip_profiles/internal.xml</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiamod_sofiah">freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h</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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkconfsip_profilesexternalxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/conf/sip_profiles/external.xml (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/conf/sip_profiles/external.xml        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/conf/sip_profiles/external.xml        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -24,7 +24,8 @@
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;context&quot; value=&quot;public&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${outbound_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${outbound_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;hold-music&quot; value=&quot;$${hold_music}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!--&lt;param name=&quot;enable-100rel&quot; value=&quot;true&quot;/&gt;--&gt;
</span></span></pre></div>
<a id="freeswitchtrunkconfsip_profilesinternalipv6xml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/conf/sip_profiles/internal-ipv6.xml (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/conf/sip_profiles/internal-ipv6.xml        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/conf/sip_profiles/internal-ipv6.xml        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -14,7 +14,8 @@
</span><span class="cx">     &lt;param name=&quot;sip-port&quot; value=&quot;$${internal_sip_port}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;use-rtp-timer&quot; value=&quot;true&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!-- ip address to use for rtp --&gt;
</span></span></pre></div>
<a id="freeswitchtrunkconfsip_profilesinternalxml"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/conf/sip_profiles/internal.xml (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/conf/sip_profiles/internal.xml        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/conf/sip_profiles/internal.xml        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -47,7 +47,8 @@
</span><span class="cx">     &lt;param name=&quot;sip-port&quot; value=&quot;$${internal_sip_port}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES --&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-ip&quot; value=&quot;$${local_ip_v4}&quot;/&gt;
</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 (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -1966,7 +1966,9 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;HOLD-MUSIC       \t%s\n&quot;, zstr(profile-&gt;hold_music) ? &quot;N/A&quot; : profile-&gt;hold_music);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;OUTBOUND-PROXY   \t%s\n&quot;, zstr(profile-&gt;outbound_proxy) ? &quot;N/A&quot; : profile-&gt;outbound_proxy);
</span><del>-                                        stream-&gt;write_function(stream, &quot;CODECS           \t%s\n&quot;, switch_str_nil(profile-&gt;codec_string));
</del><ins>+                                        stream-&gt;write_function(stream, &quot;CODECS IN        \t%s\n&quot;, switch_str_nil(profile-&gt;inbound_codec_string));
+                                        stream-&gt;write_function(stream, &quot;CODECS OUT       \t%s\n&quot;, switch_str_nil(profile-&gt;outbound_codec_string));
+
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;TEL-EVENT        \t%d\n&quot;, profile-&gt;te);
</span><span class="cx">                                         if (profile-&gt;dtmf_type == DTMF_2833) {
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;DTMF-MODE        \trfc2833\n&quot;);
</span><span class="lines">@@ -2186,7 +2188,9 @@
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;tls-bind-url&gt;%s&lt;/tls-bind-url&gt;\n&quot;, switch_str_nil(profile-&gt;tls_bindurl));
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;hold-music&gt;%s&lt;/hold-music&gt;\n&quot;, zstr(profile-&gt;hold_music) ? &quot;N/A&quot; : profile-&gt;hold_music);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;outbound-proxy&gt;%s&lt;/outbound-proxy&gt;\n&quot;, zstr(profile-&gt;outbound_proxy) ? &quot;N/A&quot; : profile-&gt;outbound_proxy);
</span><del>-                                        stream-&gt;write_function(stream, &quot;    &lt;codecs&gt;%s&lt;/codecs&gt;\n&quot;, switch_str_nil(profile-&gt;codec_string));
</del><ins>+                                        stream-&gt;write_function(stream, &quot;    &lt;inbound-codecs&gt;%s&lt;/inbound-codecs&gt;\n&quot;, switch_str_nil(profile-&gt;inbound_codec_string));
+                                        stream-&gt;write_function(stream, &quot;    &lt;outbound-codecs&gt;%s&lt;/outbound-codecs&gt;\n&quot;, switch_str_nil(profile-&gt;outbound_codec_string));
+
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;tel-event&gt;%d&lt;/tel-event&gt;\n&quot;, profile-&gt;te);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;dtmf-mode&gt;rfc2833&lt;/dtmf-mode&gt;\n&quot;);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;dtmf-mode&gt;info&lt;/dtmf-mode&gt;\n&quot;);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiamod_sofiah"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -459,7 +459,8 @@
</span><span class="cx">         switch_port_t sip_port;
</span><span class="cx">         switch_port_t tls_sip_port;
</span><span class="cx">         int tls_version;
</span><del>-        char *codec_string;
</del><ins>+        char *inbound_codec_string;
+        char *outbound_codec_string;
</ins><span class="cx">         int running;
</span><span class="cx">         int dtmf_duration;
</span><span class="cx">         uint8_t flags[TFLAG_MAX];
</span><span class="lines">@@ -705,6 +706,8 @@
</span><span class="cx"> 
</span><span class="cx"> void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt);
</span><span class="cx"> 
</span><ins>+const char *sofia_glue_get_codec_string(private_object_t *tech_pvt);
+
</ins><span class="cx"> void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *profile, private_object_t *tech_pvt, const char *channame);
</span><span class="cx"> 
</span><span class="cx"> switch_status_t sofia_glue_tech_choose_port(private_object_t *tech_pvt, int force);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -2179,7 +2179,12 @@
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;max-calls&quot;)) {
</span><span class="cx">                                                 profile-&gt;max_calls = atoi(val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;codec-prefs&quot;)) {
</span><del>-                                                profile-&gt;codec_string = switch_core_strdup(profile-&gt;pool, val);
</del><ins>+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;inbound-codec-prefs&quot;)) {
+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;outbound-codec-prefs&quot;)) {
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;challenge-realm&quot;)) {
</span><span class="cx">                                                 profile-&gt;challenge_realm = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-duration&quot;)) {
</span><span class="lines">@@ -2883,7 +2888,12 @@
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;max-calls&quot;)) {
</span><span class="cx">                                                 profile-&gt;max_calls = atoi(val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;codec-prefs&quot;)) {
</span><del>-                                                profile-&gt;codec_string = switch_core_strdup(profile-&gt;pool, val);
</del><ins>+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;inbound-codec-prefs&quot;)) {
+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;outbound-codec-prefs&quot;)) {
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;challenge-realm&quot;)) {
</span><span class="cx">                                                 profile-&gt;challenge_realm = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-duration&quot;)) {
</span><span class="lines">@@ -3700,7 +3710,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 if (sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) &amp;&amp; (parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0))) {
</span><span class="cx">                                         if ((sdp = sdp_session(parser))) {
</span><del>-                                                sofia_glue_set_r_sdp_codec_string(session, (tech_pvt-&gt;profile?tech_pvt-&gt;profile-&gt;codec_string:NULL), sdp);
</del><ins>+                                                sofia_glue_set_r_sdp_codec_string(session, sofia_glue_get_codec_string(tech_pvt), sdp);
</ins><span class="cx">                                         }
</span><span class="cx">                                         sdp_parser_free(parser);
</span><span class="cx">                                 }
</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 (15657 => 15658)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-24 18:18:09 UTC (rev 15657)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-24 18:52:57 UTC (rev 15658)
</span><span class="lines">@@ -409,6 +409,19 @@
</span><span class="cx">         sofia_glue_tech_set_local_sdp(tech_pvt, buf, SWITCH_TRUE);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+const char *sofia_glue_get_codec_string(private_object_t *tech_pvt)
+{
+        const char *codec_string = NULL;
+        
+        if (switch_channel_direction(tech_pvt-&gt;channel) == SWITCH_CALL_DIRECTION_OUTBOUND &amp;&amp; !zstr(tech_pvt-&gt;profile-&gt;outbound_codec_string)) {
+                codec_string = tech_pvt-&gt;profile-&gt;outbound_codec_string ? tech_pvt-&gt;profile-&gt;outbound_codec_string : tech_pvt-&gt;profile-&gt;inbound_codec_string;
+        } else if (!zstr(tech_pvt-&gt;profile-&gt;inbound_codec_string)) {
+                codec_string = tech_pvt-&gt;profile-&gt;inbound_codec_string ? tech_pvt-&gt;profile-&gt;inbound_codec_string : tech_pvt-&gt;profile-&gt;outbound_codec_string;
+        }
+        
+        return codec_string;
+}
+
</ins><span class="cx"> void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
</span><span class="cx"> {
</span><span class="cx">         const char *abs, *codec_string = NULL;
</span><span class="lines">@@ -426,25 +439,29 @@
</span><span class="cx"> 
</span><span class="cx">         if ((abs = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;absolute_codec_string&quot;))) {
</span><span class="cx">                 codec_string = abs;
</span><del>-        } else {
-                if (!(codec_string = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;codec_string&quot;))) {
-                        if (tech_pvt-&gt;profile-&gt;codec_string) {
-                                codec_string = tech_pvt-&gt;profile-&gt;codec_string;
-                        }
</del><ins>+                goto ready;
+        }
+
+        if (!(codec_string = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;codec_string&quot;))) {
+                codec_string = sofia_glue_get_codec_string(tech_pvt);
+                if (codec_string &amp;&amp; *codec_string == '=') {
+                        codec_string++;
+                        goto ready;
</ins><span class="cx">                 }
</span><ins>+        }
</ins><span class="cx"> 
</span><del>-                if ((ocodec = switch_channel_get_variable(tech_pvt-&gt;channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
-                        if (!codec_string || sofia_test_pflag(tech_pvt-&gt;profile, PFLAG_DISABLE_TRANSCODING)) {
</del><ins>+        if ((ocodec = switch_channel_get_variable(tech_pvt-&gt;channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
+                if (!codec_string || sofia_test_pflag(tech_pvt-&gt;profile, PFLAG_DISABLE_TRANSCODING)) {
+                        codec_string = ocodec;
+                } else {
+                        if (!(codec_string = switch_core_session_sprintf(tech_pvt-&gt;session, &quot;%s,%s&quot;, ocodec, codec_string))) {
</ins><span class="cx">                                 codec_string = ocodec;
</span><del>-                        } else {
-                                if (!(codec_string = switch_core_session_sprintf(tech_pvt-&gt;session, &quot;%s,%s&quot;, ocodec, codec_string))) {
-                                        codec_string = ocodec;
-                                }
</del><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+        
+ ready:
</ins><span class="cx"> 
</span><del>-
</del><span class="cx">         if (codec_string) {
</span><span class="cx">                 char *tmp_codec_string;
</span><span class="cx">                 if ((tmp_codec_string = switch_core_session_strdup(tech_pvt-&gt;session, codec_string))) {
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>