Diff
Modified: freeswitch/trunk/src/include/switch_types.h (14968 => 14969)
--- freeswitch/trunk/src/include/switch_types.h 2009-09-24 21:07:47 UTC (rev 14968)
+++ freeswitch/trunk/src/include/switch_types.h 2009-09-24 22:21:44 UTC (rev 14969)
@@ -194,7 +194,8 @@
SBF_EXEC_BLEG = (1 << 3),
SBF_EXEC_OPPOSITE = (1 << 4),
SBF_EXEC_SAME = (1 << 5),
- SBF_ONCE = (1 << 6)
+ SBF_ONCE = (1 << 6),
+ SBF_EXEC_INLINE = (1 << 7)
} switch_bind_flag_enum_t;
typedef uint32_t switch_bind_flag_t;
@@ -318,7 +319,8 @@
SMF_FORCE = (1 << 3),
SMF_LOOP = (1 << 4),
SMF_HOLD_BLEG = (1 << 5),
- SMF_IMMEDIATE = (1 << 6)
+ SMF_IMMEDIATE = (1 << 6),
+ SMF_EXEC_INLINE = (1 << 7)
} switch_media_flag_enum_t;
typedef uint32_t switch_media_flag_t;
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (14968 => 14969)
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c 2009-09-24 21:07:47 UTC (rev 14968)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c 2009-09-24 22:21:44 UTC (rev 14969)
@@ -198,7 +198,7 @@
}
-#define BIND_SYNTAX "<key> [a|b|ab] [a|b|o|s|1] <app>"
+#define BIND_SYNTAX "<key> [a|b|ab] [a|b|o|s|i|1] <app>"
SWITCH_STANDARD_APP(dtmf_bind_function)
{
char *argv[4] = { 0 };
@@ -242,6 +242,10 @@
}
}
+ if (strchr(argv[2], 'i')) {
+ bind_flags |= SBF_EXEC_INLINE;
+ }
+
if (strchr(argv[2], 'o')) {
if ((bind_flags & SBF_EXEC_BLEG) || (bind_flags & SBF_EXEC_ALEG) || (bind_flags & SBF_EXEC_SAME)) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot bind execute to multiple legs\n");
Modified: freeswitch/trunk/src/switch_ivr_async.c (14968 => 14969)
--- freeswitch/trunk/src/switch_ivr_async.c 2009-09-24 21:07:47 UTC (rev 14968)
+++ freeswitch/trunk/src/switch_ivr_async.c 2009-09-24 22:21:44 UTC (rev 14969)
@@ -2031,6 +2031,8 @@
} else {
flags |= SMF_ECHO_ALEG;
}
+ } else if ((md->sr[direction].map[dval].bind_flags & SBF_EXEC_INLINE)) {
+ flags |= SMF_EXEC_INLINE;
} else if ((md->sr[direction].map[dval].bind_flags & SBF_EXEC_ALEG)) {
flags |= SMF_ECHO_ALEG;
} else if ((md->sr[direction].map[dval].bind_flags & SBF_EXEC_BLEG)) {
@@ -2684,7 +2686,11 @@
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hold-bleg", "true");
}
- switch_core_session_queue_private_event(other_session, &event);
+ if ((flags & SMF_EXEC_INLINE)) {
+ switch_core_session_execute_application(other_session, app, path);
+ } else {
+ switch_core_session_queue_private_event(other_session, &event);
+ }
}
switch_core_session_rwunlock(other_session);