<!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][14906] </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=14906">14906</a></dd>
<dt>Author</dt> <dd>anthm</dd>
<dt>Date</dt> <dd>2009-09-17 14:05:58 -0500 (Thu, 17 Sep 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>add inline=true to actions to exec certian apps right away </pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunksrcincludeswitch_typesh">freeswitch/trunk/src/include/switch_types.h</a></li>
<li><a href="#freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc">freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c</a></li>
<li><a href="#freeswitchtrunksrcmoddialplansmod_dialplan_xmlmod_dialplan_xmlc">freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunksrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/include/switch_types.h (14905 => 14906)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/include/switch_types.h        2009-09-17 18:53:28 UTC (rev 14905)
+++ freeswitch/trunk/src/include/switch_types.h        2009-09-17 19:05:58 UTC (rev 14906)
</span><span class="lines">@@ -941,7 +941,8 @@
</span><span class="cx"> 
</span><span class="cx"> typedef enum {
</span><span class="cx">         SAF_NONE = 0,
</span><del>-        SAF_SUPPORT_NOMEDIA = (1 &lt;&lt; 0)
</del><ins>+        SAF_SUPPORT_NOMEDIA = (1 &lt;&lt; 0),
+        SAF_ROUTING_EXEC = (1 &lt;&lt; 1)
</ins><span class="cx"> } switch_application_flag_enum_t;
</span><span class="cx"> typedef uint32_t switch_application_flag_t;
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchtrunksrcmodapplicationsmod_dptoolsmod_dptoolsc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (14905 => 14906)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-09-17 18:53:28 UTC (rev 14905)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c        2009-09-17 19:05:58 UTC (rev 14906)
</span><span class="lines">@@ -2722,29 +2722,29 @@
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;transfer&quot;, &quot;Transfer a channel&quot;, TRANSFER_LONG_DESC, transfer_function, &quot;&lt;exten&gt; [&lt;dialplan&gt; &lt;context&gt;]&quot;,
</span><span class="cx">                                    SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;check_acl&quot;, &quot;Check an ip against an ACL list&quot;, &quot;Check an ip against an ACL list&quot;, check_acl_function,
</span><del>-                                   &quot;&lt;ip&gt; &lt;acl | cidr&gt; [&lt;hangup_cause&gt;]&quot;, SAF_SUPPORT_NOMEDIA);
-        SWITCH_ADD_APP(app_interface, &quot;verbose_events&quot;, &quot;Make ALL Events verbose.&quot;, &quot;Make ALL Events verbose.&quot;, verbose_events_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</del><ins>+                                   &quot;&lt;ip&gt; &lt;acl | cidr&gt; [&lt;hangup_cause&gt;]&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
+        SWITCH_ADD_APP(app_interface, &quot;verbose_events&quot;, &quot;Make ALL Events verbose.&quot;, &quot;Make ALL Events verbose.&quot;, verbose_events_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;sleep&quot;, &quot;Pause a channel&quot;, SLEEP_LONG_DESC, sleep_function, &quot;&lt;pausemilliseconds&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;delay_echo&quot;, &quot;echo audio at a specified delay&quot;, &quot;Delay n ms&quot;, delay_function, &quot;&lt;delay ms&gt;&quot;, SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;strftime&quot;, &quot;strftime&quot;, &quot;strftime&quot;, strftime_function, &quot;[&lt;epoch&gt;|]&lt;format string&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;phrase&quot;, &quot;Say a Phrase&quot;, &quot;Say a Phrase&quot;, phrase_function, &quot;&lt;macro_name&gt;,&lt;data&gt;&quot;, SAF_NONE);
</span><del>-        SWITCH_ADD_APP(app_interface, &quot;eval&quot;, &quot;Do Nothing&quot;, &quot;Do Nothing&quot;, eval_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</del><ins>+        SWITCH_ADD_APP(app_interface, &quot;eval&quot;, &quot;Do Nothing&quot;, &quot;Do Nothing&quot;, eval_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;pre_answer&quot;, &quot;Pre-Answer the call&quot;, &quot;Pre-Answer the call for a channel.&quot;, pre_answer_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;answer&quot;, &quot;Answer the call&quot;, &quot;Answer the call for a channel.&quot;, answer_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;hangup&quot;, &quot;Hangup the call&quot;, &quot;Hangup the call for a channel.&quot;, hangup_function, &quot;[&lt;cause&gt;]&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;set_name&quot;, &quot;Name the channel&quot;, &quot;Name the channel&quot;, set_name_function, &quot;&lt;name&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</span><del>-        SWITCH_ADD_APP(app_interface, &quot;presence&quot;, &quot;Send Presence&quot;, &quot;Send Presence.&quot;, presence_function, &quot;&lt;rpid&gt; &lt;status&gt; [&lt;id&gt;]&quot;, SAF_SUPPORT_NOMEDIA);
-        SWITCH_ADD_APP(app_interface, &quot;log&quot;, &quot;Logs to the logger&quot;, LOG_LONG_DESC, log_function, &quot;&lt;log_level&gt; &lt;log_string&gt;&quot;, SAF_SUPPORT_NOMEDIA);
-        SWITCH_ADD_APP(app_interface, &quot;info&quot;, &quot;Display Call Info&quot;, &quot;Display Call Info&quot;, info_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
-        SWITCH_ADD_APP(app_interface, &quot;event&quot;, &quot;Fire an event&quot;, &quot;Fire an event&quot;, event_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</del><ins>+        SWITCH_ADD_APP(app_interface, &quot;presence&quot;, &quot;Send Presence&quot;, &quot;Send Presence.&quot;, presence_function, &quot;&lt;rpid&gt; &lt;status&gt; [&lt;id&gt;]&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
+        SWITCH_ADD_APP(app_interface, &quot;log&quot;, &quot;Logs to the logger&quot;, LOG_LONG_DESC, log_function, &quot;&lt;log_level&gt; &lt;log_string&gt;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
+        SWITCH_ADD_APP(app_interface, &quot;info&quot;, &quot;Display Call Info&quot;, &quot;Display Call Info&quot;, info_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
+        SWITCH_ADD_APP(app_interface, &quot;event&quot;, &quot;Fire an event&quot;, &quot;Fire an event&quot;, event_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;sound_test&quot;, &quot;Analyze Audio&quot;, &quot;Analyze Audio&quot;, sound_test_function, &quot;&quot;, SAF_NONE);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;export&quot;, &quot;Export a channel variable across a bridge&quot;, EXPORT_LONG_DESC, export_function, &quot;&lt;varname&gt;=&lt;value&gt;&quot;,
</span><del>-                                   SAF_SUPPORT_NOMEDIA);
-        SWITCH_ADD_APP(app_interface, &quot;set&quot;, &quot;Set a channel variable&quot;, SET_LONG_DESC, set_function, &quot;&lt;varname&gt;=&lt;value&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</del><ins>+                                   SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
+        SWITCH_ADD_APP(app_interface, &quot;set&quot;, &quot;Set a channel variable&quot;, SET_LONG_DESC, set_function, &quot;&lt;varname&gt;=&lt;value&gt;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;set_global&quot;, &quot;Set a global variable&quot;, SET_GLOBAL_LONG_DESC, set_global_function, &quot;&lt;varname&gt;=&lt;value&gt;&quot;,
</span><del>-                                   SAF_SUPPORT_NOMEDIA);
</del><ins>+                                   SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;set_profile_var&quot;, &quot;Set a caller profile variable&quot;, SET_PROFILE_VAR_LONG_DESC, set_profile_var_function,
</span><del>-                                   &quot;&lt;varname&gt;=&lt;value&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</del><ins>+                                   &quot;&lt;varname&gt;=&lt;value&gt;&quot;, SAF_SUPPORT_NOMEDIA | SAF_ROUTING_EXEC);
</ins><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;unset&quot;, &quot;Unset a channel variable&quot;, UNSET_LONG_DESC, unset_function, &quot;&lt;varname&gt;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;ring_ready&quot;, &quot;Indicate Ring_Ready&quot;, &quot;Indicate Ring_Ready on a channel.&quot;, ring_ready_function, &quot;&quot;, SAF_SUPPORT_NOMEDIA);
</span><span class="cx">         SWITCH_ADD_APP(app_interface, &quot;remove_bugs&quot;, &quot;Remove media bugs&quot;, &quot;Remove all media bugs from a channel.&quot;, remove_bugs_function, &quot;&quot;, SAF_NONE);
</span></span></pre></div>
<a id="freeswitchtrunksrcmoddialplansmod_dialplan_xmlmod_dialplan_xmlc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (14905 => 14906)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c        2009-09-17 18:53:28 UTC (rev 14905)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c        2009-09-17 19:05:58 UTC (rev 14906)
</span><span class="lines">@@ -45,6 +45,40 @@
</span><span class="cx"> } break_t;
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+static switch_status_t exec_app(switch_core_session_t *session, const char *app, const char *arg)
+{
+        switch_application_interface_t *application_interface;
+        switch_status_t status = SWITCH_STATUS_SUCCESS;
+        switch_channel_t *channel = switch_core_session_get_channel(session);
+
+        switch_assert(channel);
+
+        if ((application_interface = switch_loadable_module_get_application_interface(app)) == 0) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;Invalid Application %s\n&quot;, app);
+                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                return SWITCH_STATUS_FALSE;
+        }
+
+        if (!application_interface-&gt;application_function) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;No Function for %s\n&quot;, app);
+                switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
+                switch_goto_status(SWITCH_STATUS_FALSE, done);
+        }
+
+        if (!switch_test_flag(application_interface, SAF_ROUTING_EXEC)) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, &quot;This application cannot be executed inline\n&quot;);
+                switch_goto_status(SWITCH_STATUS_FALSE, done);
+        }
+
+        switch_core_session_exec(session, application_interface, arg);
+
+done:
+        
+        UNPROTECT_INTERFACE(application_interface);
+        
+        return status;
+}
+
</ins><span class="cx"> static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t xexten, switch_caller_extension_t **extension)
</span><span class="cx"> {
</span><span class="cx">         switch_xml_t xcond, xaction, xexpression;
</span><span class="lines">@@ -95,63 +129,63 @@
</span><span class="cx">                         int test = tm.tm_year + 1900;
</span><span class="cx">                         time_match = switch_number_cmp(xyear, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: year[%d] =~ %s %s\n&quot;, test, xyear, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: year[%d] =~ %s (%s)\n&quot;, test, xyear, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xyday) {
</span><span class="cx">                         int test = tm.tm_yday + 1;
</span><span class="cx">                         time_match = switch_number_cmp(xyday, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: day of year[%d] =~ %s %s\n&quot;, test, xyday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: day of year[%d] =~ %s (%s)\n&quot;, test, xyday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xmon) {
</span><span class="cx">                         int test = tm.tm_mon + 1;
</span><span class="cx">                         time_match = switch_number_cmp(xmon, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: month[%d] =~ %s %s\n&quot;, test, xmon, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: month[%d] =~ %s (%s)\n&quot;, test, xmon, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xmday) {
</span><span class="cx">                         int test = tm.tm_mday;
</span><span class="cx">                         time_match = switch_number_cmp(xmday, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: day of month[%d] =~ %s %s\n&quot;, test, xmday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: day of month[%d] =~ %s (%s)\n&quot;, test, xmday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xweek) {
</span><span class="cx">                         int test = (int) (tm.tm_yday + 1 / 7);
</span><span class="cx">                         time_match = switch_number_cmp(xweek, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: week of year[%d] =~ %s %s\n&quot;, test, xweek, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: week of year[%d] =~ %s (%s)\n&quot;, test, xweek, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xwday) {
</span><span class="cx">                         int test = tm.tm_wday + 1;
</span><span class="cx">                         time_match = switch_number_cmp(xwday, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: day of week[%d] =~ %s %s\n&quot;, test, xwday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: day of week[%d] =~ %s (%s)\n&quot;, test, xwday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xhour) {
</span><span class="cx">                         int test = tm.tm_hour;
</span><span class="cx">                         time_match = switch_number_cmp(xhour, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: hour[%d] =~ %s %s\n&quot;, test, xhour, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: hour[%d] =~ %s (%s)\n&quot;, test, xhour, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xminute) {
</span><span class="cx">                         int test = tm.tm_min;
</span><span class="cx">                         time_match = switch_number_cmp(xminute, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: minute[%d] =~ %s %s\n&quot;, test, xminute, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: minute[%d] =~ %s (%s)\n&quot;, test, xminute, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (time_match &amp;&amp; xminday) {
</span><span class="cx">                         int test = (tm.tm_hour * 60) + (tm.tm_min + 1);
</span><span class="cx">                         time_match = switch_number_cmp(xminday, test);
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                          &quot;Dialplan: minute of day[%d] =~ %s %s\n&quot;, test, xminday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</del><ins>+                                                          &quot;Dialplan: minute of day[%d] =~ %s (%s)\n&quot;, test, xminday, time_match ? &quot;PASS&quot; : &quot;FAIL&quot;);
</ins><span class="cx">                 }
</span><span class="cx">                 
</span><span class="cx">                 field = (char *) switch_xml_attr(xcond, &quot;field&quot;);
</span><span class="lines">@@ -227,12 +261,14 @@
</span><span class="cx"> 
</span><span class="cx">                 if (anti_action) {
</span><span class="cx">                         for (xaction = switch_xml_child(xcond, &quot;anti-action&quot;); xaction; xaction = xaction-&gt;next) {
</span><del>-                                char *application = (char *) switch_xml_attr_soft(xaction, &quot;application&quot;);
-                                char *data = (char *) switch_xml_attr_soft(xaction, &quot;data&quot;);
</del><ins>+                                const char *application = switch_xml_attr_soft(xaction, &quot;application&quot;);
+                                const char *data = switch_xml_attr_soft(xaction, &quot;data&quot;);
+                                const char *inline_ = switch_xml_attr_soft(xaction, &quot;inline&quot;);
+                                int xinline = switch_true(inline_);                                
</ins><span class="cx"> 
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG,
</span><del>-                                                &quot;Dialplan: %s ANTI-Action %s(%s)\n&quot;,
-                                                switch_channel_get_name(channel), application, data);
</del><ins>+                                                                  &quot;Dialplan: %s ANTI-Action %s(%s) %s\n&quot;,
+                                                                  switch_channel_get_name(channel), application, data, xinline ? &quot;INLINE&quot; : &quot;&quot;);
</ins><span class="cx"> 
</span><span class="cx">                                 if (!*extension) {
</span><span class="cx">                                         if ((*extension = switch_caller_extension_new(session, exten_name, caller_profile-&gt;destination_number)) == 0) {
</span><span class="lines">@@ -242,7 +278,11 @@
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><del>-                                switch_caller_extension_add_application(session, *extension, application, data);
</del><ins>+                                if (xinline) {
+                                        exec_app(session, application, data);
+                                } else {
+                                        switch_caller_extension_add_application(session, *extension, application, data);
+                                }
</ins><span class="cx">                                 proceed = 1;
</span><span class="cx">                         }
</span><span class="cx">                 } else {
</span><span class="lines">@@ -252,6 +292,8 @@
</span><span class="cx">                                 char *substituted = NULL;
</span><span class="cx">                                 uint32_t len = 0;
</span><span class="cx">                                 char *app_data = NULL;
</span><ins>+                                const char *inline_ = switch_xml_attr_soft(xaction, &quot;inline&quot;);
+                                int xinline = switch_true(inline_);
</ins><span class="cx"> 
</span><span class="cx">                                 if (!switch_strlen_zero(xaction-&gt;txt)) {
</span><span class="cx">                                         data = xaction-&gt;txt;
</span><span class="lines">@@ -282,16 +324,24 @@
</span><span class="cx">                                 }
</span><span class="cx"> 
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG_CLEAN(session), SWITCH_LOG_DEBUG, 
</span><del>-                                                &quot;Dialplan: %s Action %s(%s)\n&quot;, 
-                                                switch_channel_get_name(channel), application, app_data);
</del><ins>+                                                                  &quot;Dialplan: %s Action %s(%s) %s\n&quot;, 
+                                                                  switch_channel_get_name(channel), application, app_data, xinline ? &quot;INLINE&quot; : &quot;&quot;);
</ins><span class="cx"> 
</span><del>-                                switch_caller_extension_add_application(session, *extension, application, app_data);
</del><ins>+
+                                if (xinline) {
+                                        exec_app(session, application, app_data);
+                                } else {
+                                        switch_caller_extension_add_application(session, *extension, application, app_data);
+                                }
+
</ins><span class="cx">                                 switch_safe_free(substituted);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 switch_regex_safe_free(re);
</span><span class="cx"> 
</span><del>-                if (do_break_i == BREAK_ON_TRUE || do_break_i == BREAK_ALWAYS) {
</del><ins>+                if (((anti_action == SWITCH_FALSE &amp;&amp; do_break_i == BREAK_ON_TRUE) || 
+                         (anti_action == SWITCH_TRUE &amp;&amp; do_break_i == BREAK_ON_FALSE))  ||
+                        do_break_i == BREAK_ALWAYS) {
</ins><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>

</body>
</html>