我已经从我的前端代码Angular发送参数,像这样,
var params = {"PhoneNumber": Ph};
Twilio.Device.connect(params, {"Record": true, "IfMachine": 'Continue'});
现在,我如何通过机器或人的状态得到呼叫的响应我需要得到呼叫的响应?
答案 0 :(得分:0)
泰米尔语,我写了一篇文章,解释了我们建议您如何使用<Gather>
以及PHP中的示例进行此操作:
<?php
# Include Twilio PHP helper library.
require "/path/to/twilio-php/Services/Twilio.php";
# Create response object.
$response = new Services_Twilio_Twiml();
$response->say("Hello, press any key to hear a top secret message.");
$gather = $response->gather(array(
'action' => "YOUR_TWIML_BIN"
));
$response->say("You did not reveal yourself to be human. Goodbye!");
print $response;
?>