可以将IVR与PHP集成吗?有没有相关的教程或链接?
我想,当用户拨打某个电话号码并输入他们的预订登记号码和预订日期时,IVR应该通过自动语音响应预订订单和状态给用户。
可以用PHP (CodeIgniter)实现吗?
谢谢。
发布于 2013-01-10 23:52:53
点击这个链接,将会帮助你https://www.twilio.com/docs/tutorials/walkthrough/ivr-phone-tree/php/laravel还有codeigniter的库。
发布于 2013-01-11 00:09:54
你可以使用PHP与Tropo和任何VoiceXML兼容的交互式语音应答。这是一个tutorial for generating VoiceXML using PHP和Voxeo Prophecy IVR platform。你可以免费试用Tropo和Prophecy IVR。只有在想要将应用程序放入生产环境中时才需要付费。
发布于 2013-01-11 23:21:30
是的,这绝对是可能的。除了你的VoiceXML脚本生成的是VoiceXML而不是超文本标记语言之外,使用标准的超文本传输协议进行开发就像普通的网页开发一样。您需要编写一个初始VoiceXML文档,其中包含收集他们的注册号和预订日期的所有代码(使用标记),然后可以通过HTTP POST (使用标记)将用户输入发送到PHP脚本。PHP脚本访问POST变量,执行预订订单搜索,并将结果输出到新的VoiceXML文档中。下面是一个用PHP编写的非常精简的示例:
start.xml:
<?xml version="1.0"?>
<vxml version="2.1">
<form>
<field name="registration_number" type="digits">
<prompt>Please say or enter your booking registration number.</prompt>
</field>
<field name="date" type="date">
<prompt>Please say or enter your booking date.</prompt>
</field>
<filled>
<submit next="search.php" method="post" namelist="registration_number date"/>
</filled>
</form>
</vxml>
search.php:
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
$booking_details = lookup_booking_order($_POST['registration_number'], $_POST['date']);
?>
<vxml version="2.1">
<form>
<block>
<prompt><?=htmlspecialchars($booking_details)?></prompt>
</block>
</form>
</vxml>使用像CodeIgniter这样的MVC框架是稍微多一点的工作,它需要你将这些脚本分解成一个控制器来处理GET/POST请求和两个视图(一个用于起始页面,另一个用于搜索结果页面)。
https://stackoverflow.com/questions/14260144
复制相似问题