【发布时间】:2017-09-10 14:55:52
【问题描述】:
我正在尝试使用 Twilio Rest Api 拨出/拨出德国的电话。 此外,我想使用 Twilio 提供的 MachineDetection 功能 (https://www.twilio.com/docs/api/rest/answering-machine-detection) 我就是这样尝试的,但它不起作用。
...
try {
// Initiate a new outbound call
$call = $client->account->calls->create(
$toNumber, // Number to call.
$fromNumber, // Twilio Number
// URL Twilio will request when the call is answered.
array(
"url" => "http://pseudourl.com/manageCall.php",
"MachineDetection" => "Enable"
)
);
echo "Started call: " . $call->sid;
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
...
在 manageCall.php 文件中,我希望得到以下内容,但我没有。
if (isset($_REQUEST['AnsweredBy']) && $_REQUEST['AnsweredBy'] == "human") {
...
}
谁能帮我看看如何正确使用该功能?
【问题讨论】:
标签: php rest api twilio phone-call