我正在使用 twilio 调用用户,但在收集用户输入时遇到了问题。初始调用工作正常,但当我按 1 或 3 时,似乎没有任何反应,在 3 秒暂停后,它继续进行。
//This works fine, I can call and hear the options being read.
<?php
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Gather action="https://mydomain.com/twilio/process_response.php" method="post" numDigits="1" timeout="3">
<Say>I can hear this.</Say>
<Say>Press 1.</Say>
<Say>Press 3.</Say>
</Gather>
<Say>It looks like you didn't select an option.</Say>
</Response>
响应 - https://mydomain.com/twilio/process_response.php
<?php
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
?>
<Response>
<Say>I should hear this, but I dont...</Say>
</Response>
谢谢!
最佳答案
问题是由我用来测试的无绳电话无法识别输入引起的。更换手机“解决”了这个问题。
关于php - 无法让 twilio 收集工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5762282/