调用时如何将动态 TwiML 传递给 Twilio API?
$client = new Services_Twilio($sid, $token);
因此,不要传递 URL 来获取 TwiML:
$call = $client->account->calls->create("+14158675309", "+14155551212", "http://demo.twilio.com/docs/voice.xml", array());
我可以动态生成 TwiML 并将其传递给 API 吗?
$twiml = new Services_Twilio_Twiml();
$twiml->say( 'Hello Mark');
$call = $client->account->calls->create("+14158675309", "+14155551212", $twiml);