|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Vicens\Alidayu\Request; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* 多方通话接口类 |
|
7
|
|
|
* @link https://api.alidayu.com/docs/api.htm?apiId=25443 |
|
8
|
|
|
* @method $this|string callerNum(string | null $callerNum = null) |
|
9
|
|
|
* @method $this|string callerShowNum(string | null $callerShowNum = null) |
|
10
|
|
|
* @method $this|string calledNum(string | null $calledNum = null) |
|
11
|
|
|
* @method $this|string calledShowNum(string | null $calledShowNum = null) |
|
12
|
|
|
* @method $this|string extend(string | null $extend = null) |
|
13
|
|
|
* @method $this|int sessionTimeOut(int | null $sessionTimeOut = null) |
|
14
|
|
|
*/ |
|
15
|
|
|
class DoubleCall extends AbstractRequest |
|
16
|
|
|
{ |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* DoubleCall constructor. |
|
20
|
|
|
* @param string $callerNum 主叫号码 |
|
21
|
|
|
* @param string $callerShowNum 主叫号码侧的号码显示 |
|
22
|
|
|
* @param string $calledNum 被叫号码 |
|
23
|
|
|
* @param string $calledShowNum 被叫号码侧的号码显示 |
|
24
|
|
|
* @param string $extend 回传参数 |
|
25
|
|
|
* @param int $sessionTimeOut 超时时间 |
|
26
|
|
|
*/ |
|
27
|
|
|
public function __construct($callerNum, $callerShowNum, $calledNum, $calledShowNum, $extend = '', $sessionTimeOut = 120) |
|
28
|
|
|
{ |
|
29
|
|
|
$this->setParams([ |
|
30
|
|
|
'caller_num' => $callerNum, |
|
31
|
|
|
'caller_show_num' => $callerShowNum, |
|
32
|
|
|
'called_num' => $calledNum, |
|
33
|
|
|
'called_show_num' => $calledShowNum, |
|
34
|
|
|
'extend' => $extend, |
|
35
|
|
|
'session_time_out' => $sessionTimeOut |
|
36
|
|
|
]); |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
|
|
40
|
|
|
/** |
|
41
|
|
|
* 返回API名 |
|
42
|
|
|
* @return string |
|
43
|
|
|
*/ |
|
44
|
|
|
public function getMethod() |
|
45
|
|
|
{ |
|
46
|
|
|
return 'alibaba.aliqin.fc.voice.num.doublecall'; |
|
47
|
|
|
} |
|
48
|
|
|
} |
|
49
|
|
|
|