add terminators to dmachine and a way to use them in dp_tools and httapi

This commit is contained in:
Anthony Minessale committed 2013-01-21 15:36:35 -06:00
1 parent 75dfa6516b
commit dd8784a9e0
4 files changed
+49 -2

No files matched your search

@@ -336,6 +336,7 @@ static void bind_to_session(switch_core_session_t *session,
struct action_binding *act;
switch_ivr_dmachine_t *dmachine;
switch_channel_t *channel = switch_core_session_get_channel(session);
const char *terminators = NULL;
if (!(dmachine = switch_core_session_get_dmachine(session, target))) {
uint32_t digit_timeout = 1500;
@@ -363,6 +364,10 @@ static void bind_to_session(switch_core_session_t *session,
act->target = bind_target;
act->session = session;
switch_ivr_dmachine_bind(dmachine, act->realm, act->input, 0, digit_action_callback, act);
if ((terminators = switch_channel_get_variable(channel, "bda_terminators"))) {
switch_ivr_dmachine_set_terminators(dmachine, terminators);
}
}
#define BIND_DIGIT_ACTION_USAGE "<realm>,<digits|~regex>,<string>[,<value>][,<dtmf target leg>][,<event target leg>]"