mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 13:58:32 +00:00
Merge pull request #1043 in FS/freeswitch from ~PERRO/freeswitch:feature/FS-9325 to master
* commit 'b5266ed6b44a8219be55a3f81726dbde69e8994a': FS-9325 [mod_dptools] Priority flag for faster bind_digit_action matches
This commit is contained in:
commit
6393832c7c
5 files changed
+36
-15
No files matched your search
@@ -85,8 +85,7 @@ void conference_member_do_binding(conference_member_t *member, conference_key_ca
|
||||
}
|
||||
|
||||
binding->handler = handler;
|
||||
switch_ivr_dmachine_bind(member->dmachine, "conf", digits, 0, conference_loop_dmachine_dispatcher, binding);
|
||||
|
||||
switch_ivr_dmachine_bind(member->dmachine, "conf", digits, 0, 0, conference_loop_dmachine_dispatcher, binding);
|
||||
}
|
||||
|
||||
void conference_member_bind_controls(conference_member_t *member, const char *controls)
|
||||
|
||||
@@ -357,6 +357,7 @@ static void bind_to_session(switch_core_session_t *session,
|
||||
switch_ivr_dmachine_t *dmachine;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
const char *terminators = NULL;
|
||||
switch_byte_t is_priority = 0;
|
||||
|
||||
if (!(dmachine = switch_core_session_get_dmachine(session, target))) {
|
||||
uint32_t digit_timeout = 1500;
|
||||
@@ -383,8 +384,27 @@ static void bind_to_session(switch_core_session_t *session,
|
||||
act->value = switch_core_session_strdup(session, arg3);
|
||||
act->target = bind_target;
|
||||
act->session = session;
|
||||
switch_ivr_dmachine_bind(dmachine, act->realm, act->input, 0, digit_action_callback, act);
|
||||
|
||||
if (!strncasecmp(act->string, "exec", 4) || !strncasecmp(act->string, "api:", 4)) {
|
||||
char *flags, *e;
|
||||
char *string = switch_core_session_strdup(session, act->string);
|
||||
|
||||
string += 4;
|
||||
if (*string == '[') {
|
||||
flags = string;
|
||||
if ((e = switch_find_end_paren(flags, '[', ']'))) {
|
||||
if (e && *(e+1) == ':') {
|
||||
flags++;
|
||||
*e = '\0';
|
||||
if (strchr(flags, 'P'))
|
||||
is_priority = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch_ivr_dmachine_bind(dmachine, act->realm, act->input, is_priority, 0, digit_action_callback, act);
|
||||
|
||||
if ((terminators = switch_channel_get_variable(channel, "bda_terminators"))) {
|
||||
switch_ivr_dmachine_set_terminators(dmachine, terminators);
|
||||
}
|
||||
|
||||
@@ -563,7 +563,7 @@ static switch_status_t parse_playback(const char *tag_name, client_t *client, sw
|
||||
action_binding->error_file = (char *) error_file;
|
||||
action_binding->parent = top_action_binding;
|
||||
|
||||
switch_ivr_dmachine_bind(dmachine, action_binding->realm, action_binding->input, 0, digit_action_callback, action_binding);
|
||||
switch_ivr_dmachine_bind(dmachine, action_binding->realm, action_binding->input, 0, 0, digit_action_callback, action_binding);
|
||||
bind = bind->next;
|
||||
}
|
||||
|
||||
@@ -1067,7 +1067,7 @@ static switch_status_t parse_record(const char *tag_name, client_t *client, swit
|
||||
action_binding->error_file = (char *) error_file;
|
||||
action_binding->parent = top_action_binding;
|
||||
|
||||
switch_ivr_dmachine_bind(dmachine, action_binding->realm, action_binding->input, 0, digit_action_callback, action_binding);
|
||||
switch_ivr_dmachine_bind(dmachine, action_binding->realm, action_binding->input, 0, 0, digit_action_callback, action_binding);
|
||||
bind = bind->next;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user