perform default/timeout action when sending is complete
This commit is contained in:
parent
6cae175d72
commit
7d414983c9
|
@ -1587,6 +1587,7 @@ void EndpointAppPBX::_action_goto_menu(int mode)
|
||||||
/* if the 'menu' was selected, we will flush all digits */
|
/* if the 'menu' was selected, we will flush all digits */
|
||||||
if (mode) {
|
if (mode) {
|
||||||
e_dialinginfo.id[0] = 0;
|
e_dialinginfo.id[0] = 0;
|
||||||
|
e_dialinginfo.sending_complete = 0;
|
||||||
e_extdialing = e_dialinginfo.id;
|
e_extdialing = e_dialinginfo.id;
|
||||||
} else {
|
} else {
|
||||||
/* remove digits that are required to match the rule */
|
/* remove digits that are required to match the rule */
|
||||||
|
|
5
route.c
5
route.c
|
@ -2392,7 +2392,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
|
||||||
/* we must have greater or equal length to values */
|
/* we must have greater or equal length to values */
|
||||||
if ((unsigned long)strlen(string) < comp_len) {
|
if ((unsigned long)strlen(string) < comp_len) {
|
||||||
/* special case for unfinished dialing */
|
/* special case for unfinished dialing */
|
||||||
if (cond->match == MATCH_DIALING) {
|
if (cond->match == MATCH_DIALING && !e_dialinginfo.sending_complete) {
|
||||||
couldbetrue = 1; /* could match */
|
couldbetrue = 1; /* could match */
|
||||||
comp_len = strlen(string);
|
comp_len = strlen(string);
|
||||||
} else {
|
} else {
|
||||||
|
@ -2466,7 +2466,8 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset)
|
||||||
|
|
||||||
cond = cond->next;
|
cond = cond->next;
|
||||||
}
|
}
|
||||||
if (timeout>now_ll && match==1) { /* the matching rule with timeout in the future */
|
/* if sending complete, we use future match now, since waiting does not make sense anymore */
|
||||||
|
if (timeout>now_ll && match==1 && !e_dialinginfo.sending_complete) { /* the matching rule with timeout in the future */
|
||||||
if (match_timeout == 0 || timeout < match_timeout) { /* first timeout or lower */
|
if (match_timeout == 0 || timeout < match_timeout) { /* first timeout or lower */
|
||||||
/* set timeout in the furture */
|
/* set timeout in the furture */
|
||||||
match_timeout = timeout;
|
match_timeout = timeout;
|
||||||
|
|
Loading…
Reference in New Issue