定制 dialonce/sdk 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dialonce/sdk

Composer 安装命令:

composer require dialonce/sdk

包简介

The Dial Once PHP SDK

README 文档

README

Circle CI Coverage Sqale

This git repository contains the Dial Once PHP SDK composer package.

Installation

composer require dialonce/sdk

Usage

IVR

For all of the IVR exposed method usage, you will need to instanciate an Application object using your api key and secret:

<?php
$application = new DialOnce\Application('API_KEY', 'API_SECRET');

The code above will generate a token by calling our API. If your script is not persistant in memory or if you don't have APC, you may want to use a previously fetched token directly:

<?php
$application = new DialOnce\Application('API_TOKEN');

Log a call step to Dial Once

To allow us to gather analytics, and provide you some important KPI info, we need to get some call steps from your IVR:

<?php

$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);

$ivr->log('call-start');
$ivr->log('call-end');
$ivr->log('call-error');
//etc.

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +)

Check if a caller is eligible to use the Dial Once service

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
if ( $ivr->isEligible() ) {

}

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +)

The user requested the Dial Once service

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
$ivr->serviceRequest();

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +)

Check if the caller uses a mobile phone

<?php
$ivr = new DialOnce\IVR($application, $callerNumber, $calledNumber);
if ($ivr->isMobile()) {

}

$application: a DialOnce\Application object instance
$callerNumber: a string, the caller phone number (inter. format with leading +)
$calledNumber: a string, the IVR phone number that the user called (inter. format with leading +)

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 9
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固