public VmMenu(VmEslRequestController controller) { super(controller.getLocalization()); m_speakCanceled = true; m_operatorOn0 = true; ApplicationConfiguraton config = controller.getVoicemailConfiguration(); setInvalidMax(config.getInvalidResponseCount()); setTimeoutMax(config.getNoInputCount()); setInitialTimeout(config.getInitialTimeout()); setInterDigitTimeout(config.getInterDigitTimeout()); setExtraDigitTimeout(config.getExtraDigitTimeout()); setErrorPl(controller.getPromptList("invalid_try_again")); m_controller = controller; }
/** * Handle the cases of failure, "0" for operator, and "*" for canceled * * @param choice * @return choice, or null if handled already */ private IvrChoice checkChoice(IvrChoice choice) { switch (choice.getIvrChoiceReason()) { case FAILURE: case TIMEOUT: m_controller.failure(); return null; case CANCELED: if (m_speakCanceled) { // "Canceled." m_loc.play("canceled", ""); } break; case SUCCESS: if (m_operatorOn0) { // "0" means transfer to operator if (choice.getDigits().equals("0")) { m_controller.transferToOperator(); return null; } } } return choice; }