Esempio n. 1
0
File: Reader.php Progetto: cwcw/cms
 /**
  * Play the no input prompt
  *
  * @return boolean
  */
 protected function _playNoInputPrompt()
 {
     $noInputPromptPlaylist = $this->_options[self::OPT_NO_INPUT_PROMPT_PLAYLIST];
     $this->_mediaPlayer->reset();
     $this->_mediaPlayer->addEventListener(Streamwide_Engine_Events_Event::FINISHED, array('callback' => array($this, 'onNoInputPromptFinished'), 'options' => array('autoRemove' => 'before')));
     $this->_mediaPlayer->setPlaylist($noInputPromptPlaylist);
     $playing = $this->_mediaPlayer->play();
     if (!$playing) {
         $this->_mediaPlayer->flushEventListeners();
     }
     return $playing;
 }
Esempio n. 2
0
File: Menu.php Progetto: cwcw/cms
 /**
  * Decrement the counter and give the user another try
  *
  * @param boolean $decrement
  * @return boolean
  */
 protected function _retry($decrement = true)
 {
     if (true === $decrement) {
         $this->_counter->decrement();
     }
     if ($this->_counter->hasMoreTries()) {
         $this->_timer->reset();
         $this->_dtmfHandler->reset();
         $this->_mediaPlayer->reset();
         $this->dispatchErrorEvent(self::BAD_TRY_ERR_CODE);
         return $this->enter();
     } else {
         $this->dispatchErrorEvent(self::NO_TRIES_LEFT_ERR_CODE);
         return false;
     }
 }
Esempio n. 3
0
File: Sender.php Progetto: cwcw/cms
 /**
  * Play the fax tone for an hour
  *
  * @return void
  */
 protected function _playFaxTone()
 {
     $playlist = array(new Streamwide_Engine_Media_Fax_Tone(null, null, self::FAX_TONE_DURATION));
     $this->_mediaPlayer->reset();
     $this->_mediaPlayer->setMediaServerCallLeg($this->_msCallLeg);
     $this->_mediaPlayer->setPlaylist($playlist);
     $this->_mediaPlayer->play();
 }