virgo/voice-notify
Composer 安装命令:
composer require virgo/voice-notify
包简介
README 文档
README
语音通知
$config = [
'JuMei' => [ //聚美
'appId' => 'appId',
'appSecret' => 'appSecret',
'templateId' => 'templateId',
'notifyUrl' => 'notifyUrl',
],
];
$voiceNotify = new \VoiceNotify\VoiceNotify($config);
if (1) { //发起
/**
* @var \VoiceNotify\Http\JuMeiResponse $response
*/
$response = $voiceNotify->send('182********',[
'templateId' => 'dddssdff', //不填默认为配置中的templateId
'param' => 'aaa,bbb,ccc', //非必填
'playTimes' => '1', //可选默认 为配置中的playTimes
'notifyUrl' => '', //可选默认 为配置中的notifyUrl
'notifyData' => '' //可选默认 为配置中的notifyData
], 'JuMei');
var_dump($response->getCode(), $response->getBody(), $response->getMessage(), $response->getError());
var_dump($response->isSuccess(),$response->getCallId(), $response->getTaskNo());
}
if (1) { //回调验证
$notify = json_decode('{"callId":"YYTZ90224*************","callDesc":"110","callStatus":"1","callStatusText":"失败"}', true);
$response = $voiceNotify->notify('JuMei', $notify);
/**
* @var \VoiceNotify\Notify\JuMeiNoNotify $response
*/
var_dump($response->getCallId(), $response->getCallStatus(), $response->getCallStatusText());r_dump($response->getCallId(), $response->getCallStatus(), $response->getCallStatusText());
}
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2021-10-25