<!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][15142] </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=15142">15142</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-10-12 17:23:55 -0500 (Mon, 12 Oct 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>refactor some of the message parsing code to use fifo to reduce threading contention</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_coreh">freeswitch/trunk/src/include/switch_core.h</a></li>
<li><a href="#freeswitchtrunksrcincludeswitch_ivrh">freeswitch/trunk/src/include/switch_ivr.h</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_conferencemod_conferencec">freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_alsamod_alsac">freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_dingalingmod_dingalingc">freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_iaxmod_iaxc">freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_portaudiomod_portaudioc">freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_channelc">freeswitch/trunk/src/switch_channel.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_sessionc">freeswitch/trunk/src/switch_core_session.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_core_state_machinec">freeswitch/trunk/src/switch_core_state_machine.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivrc">freeswitch/trunk/src/switch_ivr.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_ivr_asyncc">freeswitch/trunk/src/switch_ivr_async.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>
<li><a href="#freeswitchtrunksrcswitch_ivr_play_sayc">freeswitch/trunk/src/switch_ivr_play_say.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeswitch_coreh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_core.h (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_core.h        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/include/switch_core.h        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -59,6 +59,7 @@
</span><span class="cx">         struct switch_app_log *next;
</span><span class="cx"> };
</span><span class="cx">
</span><ins>+#define MESSAGE_STRING_ARG_MAX 10
</ins><span class="cx"> /*! \brief A message object designed to allow unlike technologies to exchange data */
</span><span class="cx"> struct switch_core_session_message {
</span><span class="cx">         /*! uuid of the sender (for replies) */
</span><span class="lines">@@ -92,7 +93,7 @@
</span><span class="cx">         const char *_file;
</span><span class="cx">         const char *_func;
</span><span class="cx">         int _line;
</span><del>-        const char *string_array_arg[10];
</del><ins>+        const char *string_array_arg[MESSAGE_STRING_ARG_MAX];
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /*! \brief A generic object to pass as a thread's session object to allow mutiple arguements and a pool */
</span><span class="lines">@@ -634,6 +635,7 @@
</span><span class="cx"> /*!
</span><span class="cx"> \brief Signal a session's state machine thread that a state change has occured
</span><span class="cx"> */
</span><ins>+SWITCH_DECLARE(void) switch_core_session_wake_session_thread(_In_ switch_core_session_t *session);
</ins><span class="cx"> SWITCH_DECLARE(void) switch_core_session_signal_state_change(_In_ switch_core_session_t *session);
</span><span class="cx">
</span><span class="cx"> /*!
</span><span class="lines">@@ -653,6 +655,10 @@
</span><span class="cx"> SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_locate(const char *uuid_str, const char *file, const char *func, int line);
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#ifdef SWITCH_DEBUG_RWLOCKS
+SWITCH_DECLARE(switch_core_session_t *) switch_core_session_perform_force_locate(const char *uuid_str, const char *file, const char *func, int line);
+#endif
+
</ins><span class="cx"> /*!
</span><span class="cx"> \brief Locate a session based on it's uuid
</span><span class="cx"> \param uuid_str the unique id of the session you want to find
</span><span class="lines">@@ -737,6 +743,8 @@
</span><span class="cx"> */
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_core_session_queue_message(_In_ switch_core_session_t *session, _In_ switch_core_session_message_t *message);
</span><span class="cx">
</span><ins>+SWITCH_DECLARE(void) switch_core_session_free_message(switch_core_session_message_t **message);
+
</ins><span class="cx"> /*!
</span><span class="cx"> \brief pass an indication message on a session
</span><span class="cx"> \param session the session to pass the message across
</span></span></pre></div>
<a id="freeswitchtrunksrcincludeswitch_ivrh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_ivr.h (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_ivr.h        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/include/switch_ivr.h        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx"> */
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_events(switch_core_session_t *session);
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_parse_next_event(switch_core_session_t *session);
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_messages(switch_core_session_t *session);
</ins><span class="cx">
</span><span class="cx"> /*!
</span><span class="cx"> \brief Wait for time to pass for a specified number of milliseconds
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_conferencemod_conferencec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -2359,6 +2359,8 @@
</span><span class="cx">                         switch_channel_clear_app_flag(channel, CF_APP_TAGGED);
</span><span class="cx">                         switch_set_flag_locked(member, MFLAG_FLUSH_BUFFER);
</span><span class="cx">                         switch_core_session_set_read_codec(member->session, &member->read_codec);
</span><ins>+                } else {
+                        switch_ivr_parse_all_messages(member->session);
</ins><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 if (use_timer) {
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_alsamod_alsac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -243,7 +243,6 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                switch_core_session_queue_indication(session, SWITCH_MESSAGE_INDICATE_RINGING);
</del><span class="cx">                 switch_channel_mark_ring_ready(channel);
</span><span class="cx">
</span><span class="cx">                 while (switch_channel_get_state(channel) == CS_INIT && !switch_test_flag(tech_pvt, TFLAG_ANSWER)) {
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_dingalingmod_dingalingc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -1090,7 +1090,6 @@
</span><span class="cx">         started = switch_micro_time_now();
</span><span class="cx">
</span><span class="cx">         /* jingle has no ringing indication so we will just pretend that we got one */
</span><del>-        switch_core_session_queue_indication(session, SWITCH_MESSAGE_INDICATE_RINGING);
</del><span class="cx">         switch_channel_mark_ring_ready(channel);
</span><span class="cx">
</span><span class="cx">         if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_iaxmod_iaxc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -1032,7 +1032,6 @@
</span><span class="cx">                                 break;
</span><span class="cx">                         case IAX_EVENT_RINGA:
</span><span class="cx">                                 if (channel) {
</span><del>-                                        switch_core_session_queue_indication(tech_pvt->session, SWITCH_MESSAGE_INDICATE_RINGING);
</del><span class="cx">                                         switch_channel_mark_ring_ready(channel);
</span><span class="cx">                                 }
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_CHANNEL_LOG(channel), SWITCH_LOG_NOTICE, "Ringing heard.\n");
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_portaudiomod_portaudioc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -248,7 +248,6 @@
</span><span class="cx">                         switch_mutex_unlock(globals.pvt_lock);
</span><span class="cx">                         switch_yield(1000000);
</span><span class="cx">                 } else {
</span><del>-                        switch_core_session_queue_indication(session, SWITCH_MESSAGE_INDICATE_RINGING);
</del><span class="cx">                         switch_channel_mark_ring_ready(channel);
</span><span class="cx">                 }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -401,13 +401,14 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (session_b = switch_core_session_locate(uuid))) {
</span><del>-                switch_core_session_message_t msg = { 0 };
</del><ins>+                switch_core_session_message_t *msg;
</ins><span class="cx">                 
</span><del>-                msg.message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
-                msg.string_array_arg[0] = name;
-                msg.string_array_arg[1] = number;
-                msg.from = __FILE__;
-                switch_core_session_receive_message(session_b, &msg);
</del><ins>+                msg = switch_core_session_alloc(session_b, sizeof(*msg));
+                msg->message_id = SWITCH_MESSAGE_INDICATE_DISPLAY;
+                msg->string_array_arg[0] = switch_core_session_strdup(session_b, name);
+                msg->string_array_arg[1] = switch_core_session_strdup(session_b, number);
+                msg->from = __FILE__;
+                switch_core_session_queue_message(session_b, msg);
</ins><span class="cx">                 switch_core_session_rwunlock(session_b);
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -3275,7 +3276,7 @@
</span><span class="cx">
</span><span class="cx">                         if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
</span><span class="cx">                                 const char *r_sdp = NULL;
</span><del>-                                switch_core_session_message_t msg = { 0 };
</del><ins>+                                switch_core_session_message_t *msg;
</ins><span class="cx">
</span><span class="cx">                                 if (sip->sip_payload && sip->sip_payload->pl_data &&
</span><span class="cx">                                         sip->sip_content_type && sip->sip_content_type->c_subtype && switch_stristr("sdp", sip->sip_content_type->c_subtype)) {
</span><span class="lines">@@ -3286,23 +3287,17 @@
</span><span class="cx">
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Passing %d %s to other leg\n", status, phrase);
</span><span class="cx">
</span><del>-                                msg.message_id = SWITCH_MESSAGE_INDICATE_RESPOND;
-                                msg.from = __FILE__;
-                                msg.numeric_arg = status;
-                                msg.string_arg = switch_core_session_strdup(other_session, phrase);
</del><ins>+                                msg = switch_core_session_alloc(other_session, sizeof(*msg));
+                                msg->message_id = SWITCH_MESSAGE_INDICATE_RESPOND;
+                                msg->from = __FILE__;
+                                msg->numeric_arg = status;
+                                msg->string_arg = switch_core_session_strdup(other_session, phrase);
</ins><span class="cx">                                 if (r_sdp) {
</span><del>-                                        msg.pointer_arg = switch_core_session_strdup(other_session, r_sdp);
-                                        msg.pointer_arg_size = strlen(r_sdp);
</del><ins>+                                        msg->pointer_arg = switch_core_session_strdup(other_session, r_sdp);
+                                        msg->pointer_arg_size = strlen(r_sdp);
</ins><span class="cx">                                 }
</span><span class="cx">
</span><del>-                                switch_mutex_unlock(tech_pvt->sofia_mutex);
-                                status = switch_core_session_receive_message(other_session, &msg);
-                                switch_mutex_lock(tech_pvt->sofia_mutex);
-
-                                if (status != SWITCH_STATUS_SUCCESS) {
-                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Other leg is not available\n");
-                                        nua_respond(tech_pvt->nh, 403, "Hangup in progress", TAG_END());
-                                }
</del><ins>+                                switch_core_session_queue_message(other_session, msg);
</ins><span class="cx">                                 switch_core_session_rwunlock(other_session);
</span><span class="cx">                         }
</span><span class="cx">                         return;
</span><span class="lines">@@ -3550,23 +3545,6 @@
</span><span class="cx">         case nua_callstate_proceeding:
</span><span class="cx">                 if (status == 180) {
</span><span class="cx">                         switch_channel_mark_ring_ready(channel);
</span><del>-                        if (!switch_channel_test_flag(channel, CF_GEN_RINGBACK)) {
-                                if (switch_channel_test_flag(channel, CF_PROXY_MODE)) {
-                                        if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
-                                                && (other_session = switch_core_session_locate(uuid))) {
-                                                switch_core_session_message_t msg;
-                                                msg.message_id = SWITCH_MESSAGE_INDICATE_RINGING;
-                                                msg.from = __FILE__;
-                                                switch_mutex_unlock(tech_pvt->sofia_mutex);
-                                                switch_core_session_receive_message(other_session, &msg);
-                                                switch_mutex_lock(tech_pvt->sofia_mutex);
-                                                switch_core_session_rwunlock(other_session);
-                                        }
-
-                                } else {
-                                        switch_core_session_queue_indication(session, SWITCH_MESSAGE_INDICATE_RINGING);
-                                }
-                        }
</del><span class="cx">                 }
</span><span class="cx">                         
</span><span class="cx">                 if (r_sdp) {
</span><span class="lines">@@ -3582,7 +3560,7 @@
</span><span class="cx">                                                 goto done;
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><del>-                                if (!switch_channel_test_flag(channel, CF_GEN_RINGBACK) && (uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
</del><ins>+                                if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
</ins><span class="cx">                                         && (other_session = switch_core_session_locate(uuid))) {
</span><span class="cx">                                         other_channel = switch_core_session_get_channel(other_session);
</span><span class="cx">                                         if (!switch_channel_get_variable(other_channel, SWITCH_B_SDP_VARIABLE)) {
</span><span class="lines">@@ -3764,7 +3742,7 @@
</span><span class="cx">                                         
</span><span class="cx">                                         if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
</span><span class="cx">                                                 && (other_session = switch_core_session_locate(uuid))) {
</span><del>-                                                switch_core_session_message_t msg = { 0 };
</del><ins>+                                                switch_core_session_message_t *msg;
</ins><span class="cx">                                                 
</span><span class="cx">                                                 if (profile->media_options & MEDIA_OPT_MEDIA_ON_HOLD) {
</span><span class="cx">                                                         tech_pvt->hold_laps = 1;
</span><span class="lines">@@ -3807,9 +3785,10 @@
</span><span class="cx">                                                         goto done;
</span><span class="cx">                                                 }
</span><span class="cx">                                                 
</span><del>-                                                msg.message_id = SWITCH_MESSAGE_INDICATE_MEDIA_REDIRECT;
-                                                msg.from = __FILE__;
-                                                msg.string_arg = (char *) r_sdp;
</del><ins>+                                                msg = switch_core_session_alloc(other_session, sizeof(*msg));
+                                                msg->message_id = SWITCH_MESSAGE_INDICATE_MEDIA_REDIRECT;
+                                                msg->from = __FILE__;
+                                                msg->string_arg = switch_core_session_strdup(other_session, r_sdp);
</ins><span class="cx">                                                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Passing SDP to other leg.\n%s\n", r_sdp);
</span><span class="cx">                                                 
</span><span class="cx">                                                 if (sofia_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
</span><span class="lines">@@ -3822,17 +3801,12 @@
</span><span class="cx">                                                         switch_channel_presence(tech_pvt->channel, "unknown", "hold", NULL);
</span><span class="cx">                                                 }
</span><span class="cx">                                         
</span><del>-                                                switch_mutex_unlock(tech_pvt->sofia_mutex);
-                                                status = switch_core_session_receive_message(other_session, &msg);
-                                                switch_mutex_lock(tech_pvt->sofia_mutex);
</del><ins>+                                                switch_core_session_queue_message(other_session, msg);
</ins><span class="cx">
</span><del>-                                                if (status != SWITCH_STATUS_SUCCESS) {
-                                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Other leg is not available\n");
-                                                        nua_respond(tech_pvt->nh, 403, "Hangup in progress", TAG_END());
-                                                }
</del><span class="cx">                                                 switch_core_session_rwunlock(other_session);
</span><span class="cx">                                         } else {
</span><del>-                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Re-INVITE to a no-media channel that is not in a bridge.\n");
</del><ins>+                                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
+                                                                                 "Re-INVITE to a no-media channel that is not in a bridge.\n");
</ins><span class="cx">                                                 is_ok = 0;
</span><span class="cx">                                                 switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
</span><span class="cx">                                         }
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_channelc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_channel.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_channel.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_channel.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -176,7 +176,7 @@
</span><span class="cx"> SWITCH_DECLARE(void) switch_channel_audio_sync(switch_channel_t *channel)
</span><span class="cx"> {
</span><span class="cx">         if (switch_channel_media_ready(channel)) {
</span><del>-                switch_core_session_message_t msg;
</del><ins>+                switch_core_session_message_t msg = { 0 };
</ins><span class="cx">                 msg.message_id = SWITCH_MESSAGE_INDICATE_AUDIO_SYNC;
</span><span class="cx">                 msg.from = channel->name;
</span><span class="cx">                 switch_core_session_receive_message(channel->session, &msg);
</span><span class="lines">@@ -1914,7 +1914,7 @@
</span><span class="cx">
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_perform_pre_answer(switch_channel_t *channel, const char *file, const char *func, int line)
</span><span class="cx"> {
</span><del>-        switch_core_session_message_t msg;
</del><ins>+        switch_core_session_message_t msg = { 0 };
</ins><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">
</span><span class="cx">         switch_assert(channel != NULL);
</span><span class="lines">@@ -1948,7 +1948,7 @@
</span><span class="cx">
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_perform_ring_ready(switch_channel_t *channel, const char *file, const char *func, int line)
</span><span class="cx"> {
</span><del>-        switch_core_session_message_t msg;
</del><ins>+        switch_core_session_message_t msg = { 0 };
</ins><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">
</span><span class="cx">         switch_assert(channel != NULL);
</span><span class="lines">@@ -2064,7 +2064,7 @@
</span><span class="cx">
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_channel_perform_answer(switch_channel_t *channel, const char *file, const char *func, int line)
</span><span class="cx"> {
</span><del>-        switch_core_session_message_t msg;
</del><ins>+        switch_core_session_message_t msg = { 0 };
</ins><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">
</span><span class="cx">         switch_assert(channel != NULL);
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_sessionc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_session.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_session.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_core_session.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -633,6 +633,7 @@
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        switch_core_session_free_message(&message);
</ins><span class="cx">         switch_core_session_rwunlock(session);
</span><span class="cx">
</span><span class="cx">         return status;
</span><span class="lines">@@ -684,11 +685,37 @@
</span><span class="cx">                 if (switch_queue_trypush(session->message_queue, message) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">                 }
</span><ins>+
+                if (switch_channel_test_flag(session->channel, CF_PROXY_MODE)) {
+                        switch_core_session_wake_session_thread(session);
+                }
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SWITCH_DECLARE(void) switch_core_session_free_message(switch_core_session_message_t **message)
+{
+        switch_core_session_message_t *to_free = *message;
+        int i;
+        char *s;
+
+        *message = NULL;
+
+        if (switch_test_flag(to_free, SCSMF_DYNAMIC)) {
+                s = (char *)to_free->string_arg;
+                switch_safe_free(s);
+                switch_safe_free(to_free->pointer_arg);
+                
+                for (i = 0; i < MESSAGE_STRING_ARG_MAX; i++) {
+                        s = (char *)to_free->string_array_arg[i];
+                        switch_safe_free(s);
+                }
+
+                switch_safe_free(to_free);
+        }
+}
+
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_core_session_dequeue_message(switch_core_session_t *session, switch_core_session_message_t **message)
</span><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_FALSE;
</span><span class="lines">@@ -709,12 +736,8 @@
</span><span class="cx"> {
</span><span class="cx">         switch_core_session_message_t *message;
</span><span class="cx">
</span><del>-        if (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
-                if (switch_test_flag(message, SCSMF_DYNAMIC)) {
-                        switch_safe_free(message);
-                } else {
-                        message = NULL;
-                }
</del><ins>+        while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
+                switch_core_session_free_message(&message);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -907,17 +930,22 @@
</span><span class="cx">         return session->channel;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session_t *session)
</del><ins>+SWITCH_DECLARE(void) switch_core_session_wake_session_thread(switch_core_session_t *session)
</ins><span class="cx"> {
</span><del>-        switch_status_t status = SWITCH_STATUS_SUCCESS;
-        switch_io_event_hook_state_change_t *ptr;
-
</del><span class="cx">         /* If trylock fails the signal is already awake so we needn't bother */
</span><span class="cx">         if (switch_mutex_trylock(session->mutex) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_thread_cond_signal(session->cond);
</span><span class="cx">                 switch_mutex_unlock(session->mutex);
</span><span class="cx">         }
</span><ins>+}
</ins><span class="cx">
</span><ins>+SWITCH_DECLARE(void) switch_core_session_signal_state_change(switch_core_session_t *session)
+{
+        switch_status_t status = SWITCH_STATUS_SUCCESS;
+        switch_io_event_hook_state_change_t *ptr;
+
+        switch_core_session_wake_session_thread(session);
+
</ins><span class="cx">         if (session->endpoint_interface->io_routines->state_change) {
</span><span class="cx">                 status = session->endpoint_interface->io_routines->state_change(session);
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_core_state_machinec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_core_state_machine.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_core_state_machine.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_core_state_machine.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -375,7 +375,19 @@
</span><span class="cx">                                         switch_channel_hangup(session->channel, SWITCH_CAUSE_INVALID_CALL_REFERENCE);
</span><span class="cx">                                 }
</span><span class="cx">                         } else {
</span><ins>+                                switch_core_session_message_t *message;
+                                        
+                                while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
+                                        switch_core_session_receive_message(session, message);
+                                        message = NULL;
+                                }
+                                
</ins><span class="cx">                                 switch_thread_cond_wait(session->cond, session->mutex);
</span><ins>+                                
+                                while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
+                                        switch_core_session_receive_message(session, message);
+                                        message = NULL;
+                                }
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivrc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_ivr.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -220,10 +220,10 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                if (switch_core_session_private_event_count(session)) {
-                        switch_ivr_parse_all_events(session);
-                }
</del><span class="cx">
</span><ins>+                switch_ivr_parse_all_events(session);
+
+
</ins><span class="cx">                 if (args && (args->input_callback || args->buf || args->buflen)) {
</span><span class="cx">                         switch_dtmf_t dtmf;
</span><span class="cx">                         
</span><span class="lines">@@ -624,10 +624,26 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_messages(switch_core_session_t *session)
+{
+        switch_core_session_message_t *message;
+        int i = 0;
+        
+        while (switch_core_session_dequeue_message(session, &message) == SWITCH_STATUS_SUCCESS) {
+                i++;
+                switch_core_session_receive_message(session, message);
+                message = NULL;
+        }
+
+        return i ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_FALSE;
+}
+
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_ivr_parse_all_events(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">
</span><ins>+
</ins><span class="cx">         while (switch_ivr_parse_next_event(session) == SWITCH_STATUS_SUCCESS);
</span><ins>+        switch_ivr_parse_all_messages(session);
</ins><span class="cx">         switch_ivr_sleep(session, 0, SWITCH_TRUE, NULL);
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -773,10 +789,9 @@
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        if (switch_core_session_private_event_count(session)) {
-                                switch_ivr_parse_all_events(session);
-                        }
</del><ins>+                        switch_ivr_parse_all_events(session);
</ins><span class="cx">
</span><ins>+
</ins><span class="cx">                         if (switch_channel_has_dtmf(channel)) {
</span><span class="cx">                                 switch_dtmf_t dtmf = { 0 };
</span><span class="cx">                                 switch_channel_dequeue_dtmf(channel, &dtmf);
</span><span class="lines">@@ -859,10 +874,10 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (switch_core_session_private_event_count(session)) {
-                        switch_ivr_parse_all_events(session);
-                }
</del><span class="cx">
</span><ins>+                switch_ivr_parse_all_events(session);
+
+
</ins><span class="cx">                 if (switch_channel_has_dtmf(channel)) {
</span><span class="cx">                         switch_channel_dequeue_dtmf(channel, &dtmf);
</span><span class="cx">                         status = args->input_callback(session, (void *) &dtmf, SWITCH_INPUT_TYPE_DTMF, args->buf, args->buflen);
</span><span class="lines">@@ -990,10 +1005,10 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (switch_core_session_private_event_count(session)) {
-                        switch_ivr_parse_all_events(session);
-                }
</del><span class="cx">
</span><ins>+                switch_ivr_parse_all_events(session);
+
+
</ins><span class="cx">                 
</span><span class="cx">                 if (eff_timeout) {
</span><span class="cx">                         digit_elapsed = (uint32_t) ((switch_micro_time_now() - digit_started) / 1000);
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_asyncc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_async.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_async.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_ivr_async.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -100,9 +100,7 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (switch_core_session_private_event_count(session)) {
- switch_ivr_parse_all_events(session);
- }
</del><ins>+                switch_ivr_parse_all_events(session);
</ins><span class="cx">
</span><span class="cx">                 if (args && (args->input_callback || args->buf || args->buflen)) {
</span><span class="cx">                         switch_dtmf_t dtmf;
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_bridgec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_bridge.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_ivr_bridge.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -357,11 +357,7 @@
</span><span class="cx">
</span><span class="cx">                 if (switch_core_session_dequeue_message(session_b, &message) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         switch_core_session_receive_message(session_a, message);
</span><del>-                        if (switch_test_flag(message, SCSMF_DYNAMIC)) {
-                                switch_safe_free(message);
-                        } else {
-                                message = NULL;
-                        }
</del><ins>+                        message = NULL;
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 if (!ans_a && answer_limit && switch_epoch_time_now(NULL) > answer_limit) {
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_originatec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_originate.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_originate.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_ivr_originate.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -384,6 +384,9 @@
</span><span class="cx">
</span><span class="cx">                         if (!oglobals->ring_ready) {
</span><span class="cx">                                 oglobals->ring_ready = 1;
</span><ins>+                                if (caller_channel && !oglobals->ignore_ring_ready) {
+                                        switch_channel_ring_ready(caller_channel);
+                                }
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -534,13 +537,12 @@
</span><span class="cx">                                 
</span><span class="cx">                                 if (!oglobals->ring_ready && !oglobals->ignore_ring_ready) {
</span><span class="cx">                                         oglobals->ring_ready = 1;
</span><ins>+                                        
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                if (switch_core_session_private_event_count(originate_status[i].peer_session)) {
-                        switch_ivr_parse_all_events(originate_status[i].peer_session);
-                }
</del><ins>+                switch_ivr_parse_all_events(originate_status[i].peer_session);
</ins><span class="cx">
</span><span class="cx">                 state = switch_channel_get_state(originate_status[i].peer_channel);
</span><span class="cx">                 if (state >= CS_HANGUP || state == CS_RESET || switch_channel_test_flag(originate_status[i].peer_channel, CF_TRANSFER) ||
</span><span class="lines">@@ -659,7 +661,6 @@
</span><span class="cx">         switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
</span><span class="cx">         uint8_t pass = 0;
</span><span class="cx">         ringback_t ringback = { 0 };
</span><del>-        switch_core_session_message_t *message = NULL;
</del><span class="cx">         switch_frame_t *read_frame = NULL;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">         int timelimit = 60;
</span><span class="lines">@@ -848,15 +849,6 @@
</span><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-
-                if (switch_core_session_dequeue_message(peer_session, &message) == SWITCH_STATUS_SUCCESS) {
-                        if (switch_test_flag(message, SCSMF_DYNAMIC)) {
-                                switch_safe_free(message);
-                        } else {
-                                message = NULL;
-                        }
-                }
-                
</del><span class="cx">                 if (switch_channel_media_ready(caller_channel)) {
</span><span class="cx">                         status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
</span><span class="cx">                         if (!SWITCH_READ_ACCEPTABLE(status)) {
</span><span class="lines">@@ -1991,7 +1983,7 @@
</span><span class="cx">                                 
</span><span class="cx">                                 check_per_channel_timeouts(&oglobals, originate_status, and_argc, start);
</span><span class="cx">
</span><del>-                                if (oglobals.session && switch_core_session_private_event_count(oglobals.session)) {
</del><ins>+                                if (oglobals.session) {
</ins><span class="cx">                                         switch_ivr_parse_all_events(oglobals.session);
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="lines">@@ -2035,17 +2027,12 @@
</span><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 if (originate_status[0].peer_session
</span><del>-                                        && switch_core_session_dequeue_message(originate_status[0].peer_session, &message) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                                        && switch_core_session_dequeue_message(oglobals.session, &message) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                         if (oglobals.session && !ringback_data && or_argc == 1 && and_argc == 1) {        
</span><span class="cx">                                                 /* when there is only 1 channel to call and bridge and no ringback */
</span><span class="cx">                                                 switch_core_session_receive_message(oglobals.session, message);
</span><span class="cx">                                         }
</span><del>-
-                                        if (switch_test_flag(message, SCSMF_DYNAMIC)) {
-                                                switch_safe_free(message);
-                                        } else {
-                                                message = NULL;
-                                        }
</del><ins>+                                        message = NULL;
</ins><span class="cx">                                 }
</span><span class="cx">
</span><span class="cx">                                 /* read from the channel while we wait if the audio is up on it */
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_ivr_play_sayc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_ivr_play_say.c (15141 => 15142)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_ivr_play_say.c        2009-10-12 22:22:52 UTC (rev 15141)
+++ freeswitch/trunk/src/switch_ivr_play_say.c        2009-10-12 22:23:55 UTC (rev 15142)
</span><span class="lines">@@ -612,9 +612,7 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (switch_core_session_private_event_count(session)) {
-                        switch_ivr_parse_all_events(session);
-                }
</del><ins>+                switch_ivr_parse_all_events(session);
</ins><span class="cx">
</span><span class="cx">                 if (start && (switch_epoch_time_now(NULL) - start) > limit) {
</span><span class="cx">                         break;
</span><span class="lines">@@ -803,9 +801,7 @@
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (switch_core_session_private_event_count(session)) {
- switch_ivr_parse_all_events(session);
- }
</del><ins>+                switch_ivr_parse_all_events(session);
</ins><span class="cx">
</span><span class="cx">                 if (args && (args->input_callback || args->buf || args->buflen)) {
</span><span class="cx">                         /*
</span><span class="lines">@@ -1193,9 +1189,7 @@
</span><span class="cx">                                 break;
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        if (switch_core_session_private_event_count(session)) {
-                                switch_ivr_parse_all_events(session);
-                        }
</del><ins>+                        switch_ivr_parse_all_events(session);
</ins><span class="cx">
</span><span class="cx">                         if (args && (args->input_callback || args->buf || args->buflen)) {
</span><span class="cx">                                 /*
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>