コード例 #1
0
ファイル: audiofiles.php プロジェクト: Gameonn/OpenVBX
 function replay_recording_twiml()
 {
     validate_rest_request();
     $response = new TwimlResponse();
     if ($this->input->get_post('RecordingUrl')) {
         // Stuff this in our session.  We'll come get it later when it's time to save!
         $recording = $this->input->get_post('RecordingUrl') . '.mp3';
         $this->session->set_userdata('current-recording', $recording);
     }
     $response->pause(array('length' => 1));
     $response->say('Recorded the following: ', $this->say_params);
     $gather = $response->gather(array('numDigits' => 1, 'method' => 'POST', 'action' => site_url('audiofiles/accept_or_reject_recording_twiml')));
     $gather->play($this->session->userdata('current-recording'));
     $gather->say('If you like this message, press 1. ... To record a different message, press 2.', $this->say_params);
     // If they don't enter anything at the prompt, do the replay again.
     $response->redirect(site_url('audiofiles/replay_recording_twiml'));
     return $response->respond();
 }