当前位置: 首页>>代码示例>>PHP>>正文


PHP response::addPlayAudio方法代码示例

本文整理汇总了PHP中response::addPlayAudio方法的典型用法代码示例。如果您正苦于以下问题:PHP response::addPlayAudio方法的具体用法?PHP response::addPlayAudio怎么用?PHP response::addPlayAudio使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在response的用法示例。


在下文中一共展示了response::addPlayAudio方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CollectDtmf

         $cd = new CollectDtmf();
         //initiate new collect dtmf object
         $cd->setMaxDigits(10);
         $cd->setTermChar('#');
         $cd->addPlayText("Please enter number to send message end with hash!");
         $r->addCollectDtmf($cd);
         $_SESSION['next_goto'] = 'phonemenu';
     }
 } else {
     if ($_REQUEST['event'] == 'Record' && $_SESSION['next_goto'] == 'Record_Status') {
         //recorded file will be come as  url in data param
         //print parameter data value
         $r->addPlayText('your recorded audio is ');
         $_SESSION['record_url'] = $_REQUEST['data'];
         error_log($_SESSION['record_url']);
         $r->addPlayAudio($_SESSION['record_url']);
         $r->addPlayText('Thanks you for calling, we will deliver your message');
     } else {
         if ($_REQUEST['event'] == 'Dial' && $_SESSION['next_goto'] == 'Dial1_Status') {
             //dial url will come data param  //if dial record false then data value will be -1 or null
             //dial status will come in status (answered/not_answered) param
             //print parameter data and status params value
             $_SESSION['dial_record_url'] = $_REQUEST['data'];
             $_SESSION['dial_status'] = $_REQUEST['status'];
             $_SESSION['dial_callduration'] = $_REQUEST['callduration'];
             if ($_REQUEST['status'] == 'not_answered') {
                 //if you would like dial another number, if first call not answered,
                 //
                 $r->addHangup();
             } else {
                 $r->addPlayAudio($_SESSION['record_url']);
开发者ID:vinody-babajob,项目名称:kookoo_ivr,代码行数:31,代码来源:newphoneservice.php


注:本文中的response::addPlayAudio方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。