add intercept_unanswered_only var akin to intercept_unbridged_only

This commit is contained in:
Anthony Minessale 2010-11-15 13:51:27 -06:00
parent 3acc5fdb64
commit 68f18efe37
1 changed files with 7 additions and 0 deletions

View File

@ -1546,6 +1546,13 @@ SWITCH_DECLARE(void) switch_ivr_intercept_session(switch_core_session_t *session
}
}
if ((var = switch_channel_get_variable(channel, "intercept_unanswered_only")) && switch_true(var)) {
if ((switch_channel_test_flag(rchannel, CF_ANSWERED))) {
switch_core_session_rwunlock(rsession);
return;
}
}
switch_channel_pre_answer(channel);
if (!zstr(buuid)) {