Download the PHP package call-center/php-sdk without Composer
On this page you can find all versions of the php package call-center/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download call-center/php-sdk
More information about call-center/php-sdk
Files in call-center/php-sdk
Download call-center/php-sdk
More information about call-center/php-sdk
Files in call-center/php-sdk
Vendor call-center
Package php-sdk
Short Description PHP SDK for Call Center API - 用于对接呼叫中心系统的PHP开发包
License MIT
Package php-sdk
Short Description PHP SDK for Call Center API - 用于对接呼叫中心系统的PHP开发包
License MIT
Please rate this library. Is it a good library?
Informations about the package php-sdk
呼叫中心 PHP SDK
用于对接呼叫中心系统的PHP开发包,支持Composer安装。
功能特性
- ✅ Token生成和管理
- ✅ 创建外呼任务
- ✅ 获取任务列表
- ✅ 取消任务
- ✅ 查询任务状态
- ✅ 获取通话记录
- ✅ 完善的异常处理
- ✅ 符合PSR-4自动加载规范
安装
通过Composer安装
手动安装
- 下载SDK源码
- 在项目中使用Composer加载:
然后运行:
快速开始
1. 初始化SDK
2. 生成Token
3. 创建外呼任务
4. 获取任务列表
5. 查询任务状态
6. 取消任务
7. 获取通话记录
完整示例
API文档
TokenService
generate(string $appKey, string $appSecret, int $expiresIn = 3600): array
生成访问Token。
参数:
$appKey: 应用密钥$appSecret: 应用机密$expiresIn: Token过期时间(秒),默认3600
返回:
TaskService
create(array $taskData): array
创建外呼任务。
参数:
$taskData: 任务数据数组(详见快速开始部分)
返回:
list(int $page = 1, int $pageSize = 20): array
获取任务列表。
返回:
getStatus(string $taskId): array
查询任务状态。
返回:
cancel(string $taskId): array
取消任务。
getRecords(string $taskId, int $page = 1, int $pageSize = 20): array
获取通话记录。
返回:
异常处理
SDK提供了两种异常类型:
CallCenter\SDK\Exception\ApiException: API业务异常CallCenter\SDK\Exception\NetworkException: 网络异常
高级用法
自定义HTTP选项
设置请求超时
直接使用HTTP客户端
系统要求
- PHP >= 7.2
- ext-json
- ext-curl
许可证
MIT License
支持
如有问题或建议,请联系:[email protected]
All versions of php-sdk with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.2
ext-json Version *
ext-curl Version *
ext-json Version *
ext-curl Version *
The package call-center/php-sdk contains the following files
Loading the files please wait ...