php - 无法让 twilio 收集工作

标签 php twilio

我正在使用 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/

相关文章:

php - 正则表达式从输入字符串中获取一些值

php - 如何在 php 中更改单元测试日期函数的当前时间

jquery - 如何使用jquery ajax从node.js文件中检索数据

Asterisk 和 Twilio 的弹性 SIP 中继(入站故障排除)

node.js - Twilio 实时录制

php - 将单元素数组的数组转换为一维数组

php - 在 mysqli_connect 上指定套接字选项

php - require_once :failed to open stream: no such file or directory

python - AttributeError,Heroku 的gunicorn 错误

javascript - twilio 中的 statusCallback 未触发