<!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][14482] </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=14482">14482</a></dd>
<dt>Author</dt> <dd>mrene</dd>
<dt>Date</dt> <dd>2009-08-10 19:54:39 -0500 (Mon, 10 Aug 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre><a href="http://jira.freeswitch.org/browse/MODSOFIA-20">MODSOFIA-20</a> with changes</pre>
<h3>Modified Paths</h3>
<ul>
<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="freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (14481 => 14482)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-08-11 00:49:26 UTC (rev 14481)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-08-11 00:54:39 UTC (rev 14482)
</span><span class="lines">@@ -356,27 +356,7 @@
</span><span class="cx">
</span><span class="cx">         if (tech_pvt->nh && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
</span><span class="cx">                 char reason[128] = "";
</span><del>-                switch_stream_handle_t stream = { 0 };
-                switch_event_header_t *hi;
-                char *bye_headers = NULL;
-
-                SWITCH_STANDARD_STREAM(stream);
-                if ((hi = switch_channel_variable_first(channel))) {
-                        for (; hi; hi = hi->next) {
-                                const char *name = (char *) hi->name;
-                                char *value = (char *) hi->value;
-                                
-                                if (!strncasecmp(name, SOFIA_SIP_BYE_HEADER_PREFIX, strlen(SOFIA_SIP_BYE_HEADER_PREFIX))) {
-                                        const char *hname = name + strlen(SOFIA_SIP_BYE_HEADER_PREFIX);
-                                        stream.write_function(&stream, "%s: %s\r\n", hname, value);
-                                }
-                        }
-                        switch_channel_variable_last(channel);
-                }
-
-                if (stream.data) {
-                        bye_headers = stream.data;
-                }
</del><ins>+                char *bye_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_BYE_HEADER_PREFIX);
</ins><span class="cx">                 
</span><span class="cx">                 if (cause > 0 && cause < 128) {
</span><span class="cx">                         switch_snprintf(reason, sizeof(reason), "Q.850;cause=%d;text=\"%s\"", cause, switch_channel_cause2str(cause));
</span><span class="lines">@@ -428,7 +408,7 @@
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
</span><del>-                switch_safe_free(stream.data);
</del><ins>+                switch_safe_free(bye_headers);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         sofia_clear_flag(tech_pvt, TFLAG_IO);
</span><span class="lines">@@ -490,13 +470,17 @@
</span><span class="cx">                 if (sofia_test_pflag(tech_pvt->profile, PFLAG_3PCC_PROXY) && sofia_test_flag(tech_pvt, TFLAG_3PCC)) {
</span><span class="cx">                         /* Send the 200 OK */
</span><span class="cx">                         if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
</span><ins>+                                char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
</ins><span class="cx">                                 nua_respond(tech_pvt->nh, SIP_200_OK,
</span><span class="cx">                                                         SIPTAG_CONTACT_STR(tech_pvt->profile->url),
</span><span class="cx">                                                         SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
</span><span class="cx">                                                         SOATAG_REUSE_REJECTED(1),
</span><del>-                                                        SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
</del><ins>+                                                        SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1),
+                                                        TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
+                                                        TAG_END());
</ins><span class="cx">
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "3PCC-PROXY, Sent a 200 OK, waiting for ACK\n");
</span><ins>+                                switch_safe_free(extra_headers);
</ins><span class="cx">                         }
</span><span class="cx">
</span><span class="cx">                         /* Unlock the session signal to allow the ack to make it in */
</span><span class="lines">@@ -570,6 +554,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
</span><ins>+                char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
</ins><span class="cx">                 nua_respond(tech_pvt->nh, SIP_200_OK,
</span><span class="cx">                                         NUTAG_AUTOANSWER(0),
</span><span class="cx">                                         TAG_IF(sticky, NUTAG_PROXY(tech_pvt->record_route)),
</span><span class="lines">@@ -578,7 +563,10 @@
</span><span class="cx">                                         SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
</span><span class="cx">                                         SIPTAG_CALL_INFO_STR(switch_channel_get_variable(tech_pvt->channel, SOFIA_SIP_HEADER_PREFIX "call_info")),
</span><span class="cx">                                         SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str),
</span><del>-                                        SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1), TAG_END());
</del><ins>+                                        SOATAG_REUSE_REJECTED(1), SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"), NUTAG_INCLUDE_EXTRA_SDP(1),
+                                        TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
+                                        TAG_END());
+                switch_safe_free(extra_headers);
</ins><span class="cx">                 sofia_set_flag_locked(tech_pvt, TFLAG_ANS);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1443,9 +1431,13 @@
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_RINGING:
</span><span class="cx">                 if (!switch_channel_test_flag(channel, CF_RING_READY) && !sofia_test_flag(tech_pvt, TFLAG_BYE) &&
</span><span class="cx">                         !switch_channel_test_flag(channel, CF_EARLY_MEDIA) && !switch_channel_test_flag(channel, CF_ANSWERED)) {
</span><ins>+                        char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
</ins><span class="cx">                         nua_respond(tech_pvt->nh, SIP_180_RINGING,
</span><span class="cx">                                                 SIPTAG_CONTACT_STR(tech_pvt->reply_contact),
</span><del>-                                                SIPTAG_HEADER_STR(generate_pai_str(session)), TAG_END());
</del><ins>+                                                SIPTAG_HEADER_STR(generate_pai_str(session)),
+                                                TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
+                                                TAG_END());
+                        switch_safe_free(extra_headers);
</ins><span class="cx">                         switch_channel_mark_ring_ready(channel);
</span><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="lines">@@ -1517,6 +1509,7 @@
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 if (!sofia_test_flag(tech_pvt, TFLAG_BYE)) {
</span><ins>+                                        char *extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
</ins><span class="cx">                                         nua_respond(tech_pvt->nh,
</span><span class="cx">                                                                 SIP_183_SESSION_PROGRESS,
</span><span class="cx">                                                                 NUTAG_AUTOANSWER(0),
</span><span class="lines">@@ -1526,7 +1519,10 @@
</span><span class="cx">                                                                 SOATAG_REUSE_REJECTED(1),
</span><span class="cx">                                                                 SOATAG_ORDERED_USER(1),
</span><span class="cx">                                                                 SOATAG_ADDRESS(tech_pvt->adv_sdp_audio_ip),
</span><del>-                                                                SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"), TAG_END());
</del><ins>+                                                                SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), SOATAG_AUDIO_AUX("cn telephone-event"),
+                                                                TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)),
+                                                                TAG_END());
+                                        switch_safe_free(extra_headers);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</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 (14481 => 14482)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-08-11 00:49:26 UTC (rev 14481)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-08-11 00:54:39 UTC (rev 14482)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> #define SOFIA_CHAT_PROTO "sip"
</span><span class="cx"> #define SOFIA_SIP_HEADER_PREFIX "sip_h_"
</span><span class="cx"> #define SOFIA_SIP_BYE_HEADER_PREFIX "sip_bye_h_"
</span><ins>+#define SOFIA_SIP_PROGRESS_HEADER_PREFIX "sip_ph_"
</ins><span class="cx"> #define SOFIA_SIP_HEADER_PREFIX_T "~sip_h_"
</span><span class="cx"> #define SOFIA_DEFAULT_PORT "5060"
</span><span class="cx"> #define SOFIA_DEFAULT_TLS_PORT "5061"
</span><span class="lines">@@ -901,3 +902,5 @@
</span><span class="cx"> void sofia_glue_get_addr(msg_t *msg, char *buf, size_t buflen, int *port);
</span><span class="cx"> sofia_destination_t* sofia_glue_get_destination(char *data);
</span><span class="cx"> void sofia_glue_free_destination(sofia_destination_t *dst);
</span><ins>+char *sofia_glue_get_extra_headers(switch_channel_t *channel, const char *prefix);
+void sofia_glue_set_extra_headers(switch_channel_t *channel, sip_t const *sip, const char *prefix);
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (14481 => 14482)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-08-11 00:49:26 UTC (rev 14481)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-08-11 00:54:39 UTC (rev 14482)
</span><span class="lines">@@ -281,6 +281,7 @@
</span><span class="cx">         const char *tmp;
</span><span class="cx">         switch_channel_t *channel;
</span><span class="cx">         private_object_t *tech_pvt;
</span><ins>+        char *extra_headers;
</ins><span class="cx"> #ifdef MANUAL_BYE
</span><span class="cx">         int cause;
</span><span class="cx">         char st[80] = "";
</span><span class="lines">@@ -319,8 +320,15 @@
</span><span class="cx">
</span><span class="cx">         switch_snprintf(st, sizeof(st), "%d", cause);
</span><span class="cx">         switch_channel_set_variable(channel, "sip_term_cause", st);
</span><ins>+        
+        extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_BYE_HEADER_PREFIX);
+        sofia_glue_set_extra_headers(channel, sip, SOFIA_SIP_BYE_HEADER_PREFIX);
+        
</ins><span class="cx">         switch_channel_hangup(channel, cause);
</span><del>-        nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua), TAG_END());
</del><ins>+        nua_respond(nh, SIP_200_OK, NUTAG_WITH_THIS(nua),
+                TAG_IF(!switch_strlen_zero(extra_headers), SIPTAG_HEADER_STR(extra_headers)), TAG_END());
+                
+        switch_safe_free(extra_headers);
</ins><span class="cx">
</span><span class="cx">         if (sofia_private) {
</span><span class="cx"> sofia_private->destroy_me = 1;
</span><span class="lines">@@ -2938,6 +2946,8 @@
</span><span class="cx">                         } else if (sip->sip_server && sip->sip_server->g_string) {
</span><span class="cx">                                 switch_channel_set_variable(channel, "sip_user_agent", sip->sip_server->g_string);
</span><span class="cx">                         }
</span><ins>+
+                        sofia_glue_set_extra_headers(channel, sip, SOFIA_SIP_PROGRESS_HEADER_PREFIX);
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if (switch_channel_test_flag(channel, CF_PROXY_MODE) || switch_channel_test_flag(channel, CF_PROXY_MEDIA)) {
</span><span class="lines">@@ -3843,6 +3853,7 @@
</span><span class="cx">                                 if (phrase) {
</span><span class="cx">                                         switch_channel_set_variable_partner(channel, "sip_hangup_phrase", phrase);
</span><span class="cx">                                 }
</span><ins>+                                sofia_glue_set_extra_headers(channel, sip, SOFIA_SIP_BYE_HEADER_PREFIX);
</ins><span class="cx">                         }
</span><span class="cx">                         switch_snprintf(st, sizeof(st), "%d", cause);
</span><span class="cx">                         switch_channel_set_variable(channel, "sip_term_cause", st);
</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 (14481 => 14482)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-08-11 00:49:26 UTC (rev 14481)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-08-11 00:54:39 UTC (rev 14482)
</span><span class="lines">@@ -1302,7 +1302,55 @@
</span><span class="cx">         switch_mutex_unlock(tech_pvt->sofia_mutex);        
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+char* sofia_glue_get_extra_headers(switch_channel_t *channel, const char *prefix)
+{
+        char *extra_headers = NULL;
+        switch_stream_handle_t stream = { 0 };
+ switch_event_header_t *hi = NULL;
</ins><span class="cx">
</span><ins>+ SWITCH_STANDARD_STREAM(stream);
+ if ((hi = switch_channel_variable_first(channel))) {
+ for (; hi; hi = hi->next) {
+ const char *name = (char *) hi->name;
+ char *value = (char *) hi->value;
+
+ if (!strncasecmp(name, prefix, strlen(prefix))) {
+ const char *hname = name + strlen(prefix);
+ stream.write_function(&stream, "%s: %s\r\n", hname, value);
+ }
+ }
+ switch_channel_variable_last(channel);
+ }
+
+ if (!switch_strlen_zero((char*)stream.data)) {
+ extra_headers = stream.data;
+ } else {
+                switch_safe_free(stream.data);
+        }
+
+        return extra_headers;
+}
+
+void sofia_glue_set_extra_headers(switch_channel_t *channel, sip_t const *sip, const char *prefix)
+{
+        sip_unknown_t *un;
+        char name[512] = "";
+        
+        if (!sip || !channel) {
+                return;
+        }
+
+        for (un = sip->sip_unknown; un; un = un->un_next) {
+                if (!strncasecmp(un->un_name, "X-", 2) || !strncasecmp(un->un_name, "P-", 2)) {
+                        if (!switch_strlen_zero(un->un_value)) {
+                                switch_snprintf(name, sizeof(name), "%s%s", prefix, un->un_name);
+                                switch_channel_set_variable(channel, name, un->un_value);
+                        }
+                }
+        }
+}
+
+
</ins><span class="cx"> switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">         char *alert_info = NULL;
</span><span class="lines">@@ -1314,8 +1362,6 @@
</span><span class="cx">         const char *cid_name, *cid_num;
</span><span class="cx">         char *e_dest = NULL;
</span><span class="cx">         const char *holdstr = "";
</span><del>-        switch_stream_handle_t stream = { 0 };
-        switch_event_header_t *hi;
</del><span class="cx">         char *extra_headers = NULL;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><span class="cx">         uint32_t session_timeout = 0;
</span><span class="lines">@@ -1639,24 +1685,8 @@
</span><span class="cx">                 switch_channel_set_variable(channel, "sofia_profile_name", tech_pvt->profile->name);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        SWITCH_STANDARD_STREAM(stream);
-        if ((hi = switch_channel_variable_first(channel))) {
-                for (; hi; hi = hi->next) {
-                        const char *name = (char *) hi->name;
-                        char *value = (char *) hi->value;
</del><ins>+        extra_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_HEADER_PREFIX);
</ins><span class="cx">
</span><del>-                        if (!strncasecmp(name, SOFIA_SIP_HEADER_PREFIX, strlen(SOFIA_SIP_HEADER_PREFIX))) {
-                                const char *hname = name + strlen(SOFIA_SIP_HEADER_PREFIX);
-                                stream.write_function(&stream, "%s: %s\r\n", hname, value);
-                        }
-                }
-                switch_channel_variable_last(channel);
-        }
-
-        if (stream.data) {
-                extra_headers = stream.data;
-        }
-
</del><span class="cx">         session_timeout = tech_pvt->profile->session_timeout;
</span><span class="cx">         if ((val = switch_channel_get_variable(channel, SOFIA_SESSION_TIMEOUT))) {
</span><span class="cx">                 int v_session_timeout = atoi(val);
</span><span class="lines">@@ -1715,8 +1745,8 @@
</span><span class="cx">                          SOATAG_RTP_SORT(SOA_RTP_SORT_REMOTE),
</span><span class="cx">                          SOATAG_RTP_SELECT(SOA_RTP_SELECT_ALL), TAG_IF(rep, SIPTAG_REPLACES_STR(rep)), SOATAG_HOLD(holdstr), TAG_END());
</span><span class="cx">
</span><del>-        switch_safe_free(stream.data);
</del><span class="cx">         sofia_glue_free_destination(dst);
</span><ins>+        switch_safe_free(extra_headers);
</ins><span class="cx">         tech_pvt->redirected = NULL;
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>