/** * Disarm the internal timer * * @return boolean */ protected function _disarmTimer() { if ($this->_timer->isArmed()) { return $this->_timer->disarm(); } return true; }
/** * Handles a key press * * @param string|null $promptType * @return void */ protected function _handleKeyPress($promptType = null) { if (null === $promptType) { if ($this->_timer->isArmed()) { $this->_timer->disarm(); } } else { switch ($promptType) { case self::PROMPT_NO_KEY: case self::PROMPT_WRONG_KEY: $this->_mediaPlayer->stop(); break; case self::PROMPT_INVITE: if ($this->_shouldStopPromptingOnDtmf()) { $this->_mediaPlayer->stop(); } break; } } }