mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-09 09:17:34 +00:00
up
This commit is contained in:
parent
f87dd96375
commit
f6f1230259
@ -358,7 +358,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_ping(switch_ivr_dmachine_t *
|
|||||||
{
|
{
|
||||||
switch_bool_t is_timeout = switch_ivr_dmachine_check_timeout(dmachine);
|
switch_bool_t is_timeout = switch_ivr_dmachine_check_timeout(dmachine);
|
||||||
dm_match_t is_match = switch_ivr_dmachine_check_match(dmachine, is_timeout);
|
dm_match_t is_match = switch_ivr_dmachine_check_match(dmachine, is_timeout);
|
||||||
switch_status_t r;
|
switch_status_t r, s;
|
||||||
int clear = 0;
|
int clear = 0;
|
||||||
|
|
||||||
if (zstr(dmachine->digits) && !is_timeout) {
|
if (zstr(dmachine->digits) && !is_timeout) {
|
||||||
@ -381,17 +381,37 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_ping(switch_ivr_dmachine_t *
|
|||||||
dmachine->match.type = DM_MATCH_POSITIVE;
|
dmachine->match.type = DM_MATCH_POSITIVE;
|
||||||
|
|
||||||
if (dmachine->last_matching_binding->callback) {
|
if (dmachine->last_matching_binding->callback) {
|
||||||
if (dmachine->last_matching_binding->callback(&dmachine->match) == SWITCH_STATUS_CONTINUE) {
|
s = dmachine->last_matching_binding->callback(&dmachine->match);
|
||||||
|
|
||||||
|
switch(s) {
|
||||||
|
case SWITCH_STATUS_CONTINUE:
|
||||||
r = SWITCH_STATUS_SUCCESS;
|
r = SWITCH_STATUS_SUCCESS;
|
||||||
|
break;
|
||||||
|
case SWITCH_STATUS_SUCCESS:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
r = SWITCH_STATUS_NOTFOUND;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dmachine->match_callback) {
|
if (dmachine->match_callback) {
|
||||||
dmachine->match.user_data = dmachine->user_data;
|
dmachine->match.user_data = dmachine->user_data;
|
||||||
if (dmachine->match_callback(&dmachine->match) == SWITCH_STATUS_CONTINUE) {
|
s = dmachine->match_callback(&dmachine->match);
|
||||||
|
|
||||||
|
switch(s) {
|
||||||
|
case SWITCH_STATUS_CONTINUE:
|
||||||
r = SWITCH_STATUS_SUCCESS;
|
r = SWITCH_STATUS_SUCCESS;
|
||||||
|
break;
|
||||||
|
case SWITCH_STATUS_SUCCESS:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
r = SWITCH_STATUS_NOTFOUND;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear++;
|
clear++;
|
||||||
} else if (is_timeout) {
|
} else if (is_timeout) {
|
||||||
r = SWITCH_STATUS_TIMEOUT;
|
r = SWITCH_STATUS_TIMEOUT;
|
||||||
@ -409,9 +429,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_dmachine_ping(switch_ivr_dmachine_t *
|
|||||||
|
|
||||||
if (dmachine->nonmatch_callback) {
|
if (dmachine->nonmatch_callback) {
|
||||||
dmachine->match.user_data = dmachine->user_data;
|
dmachine->match.user_data = dmachine->user_data;
|
||||||
if (dmachine->nonmatch_callback(&dmachine->match) == SWITCH_STATUS_CONTINUE) {
|
s = dmachine->nonmatch_callback(&dmachine->match);
|
||||||
|
|
||||||
|
switch(s) {
|
||||||
|
case SWITCH_STATUS_CONTINUE:
|
||||||
r = SWITCH_STATUS_SUCCESS;
|
r = SWITCH_STATUS_SUCCESS;
|
||||||
|
break;
|
||||||
|
case SWITCH_STATUS_SUCCESS:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
r = SWITCH_STATUS_NOTFOUND;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clear++;
|
clear++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user