예제 #1
0
 /**
  * generateTwiML - Generates TwiML with passed text and music from url
  * 
  * @param  string $text          - call message text 
  * @param  string|null $musicUrl - music url 
  * @return string                - generated XML
  * 
  */
 public function generateTwiML($text, $musicUrl = null, $musicOptions = array())
 {
     $response = new Services_Twilio_Twiml();
     $response->say($text);
     if (!empty($musicUrl)) {
         $response->play($musicUrl, $musicOptions);
     }
     return $response->__toString();
 }