Skip to content

Commit f455dfc

Browse files
committed
[voicecall]1803平台新增设置自动挂断功能接口
1 parent 95c1252 commit f455dfc

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,69 @@ This function hangs up a call.
13291329

13301330

13311331

1332+
##### Set the automatic call hangup function
1333+
1334+
> **voiceCall.setAutoCancel(enable)**
1335+
1336+
Set the automatic call hangup function(Only supported on 1803s platform)。
1337+
1338+
* Parameter
1339+
1340+
| Parameter | Type | Description |
1341+
| --------- | ------ | ------------------------------------------------------------ |
1342+
| enable | int | Enable or disable the automatic call hangup function. 1: on, 0: off |
1343+
1344+
* Return Value
1345+
1346+
Returns 0 on success, -1 otherwise.
1347+
1348+
* Example
1349+
1350+
```python
1351+
#Using the cell phone call UE, It does not automatically hang up by default
1352+
>>> voiceCall.getAutoCancelStatus()
1353+
0
1354+
1355+
#Set the automatic hang up function, call the UE with the mobile phone, the default automatic hang up
1356+
>>> voiceCall.setAutoCancel(1)
1357+
0
1358+
>>> voiceCall.getAutoCancelStatus()
1359+
1
1360+
```
1361+
1362+
1363+
1364+
##### To obtain the status is enable or not of automatic call hangup
1365+
1366+
> **voiceCall.getAutoCancelStatus()**
1367+
1368+
To obtain the status is enable or not of automatic call hangup(Only supported on 1803s platform)。
1369+
1370+
* Parameter
1371+
1372+
none
1373+
1374+
* Return Value
1375+
1376+
0:It does not automatically hang up by default
1377+
1:default automatic hang up
1378+
1379+
* Example
1380+
1381+
```python
1382+
#Using the cell phone call UE, It does not automatically hang up by default
1383+
>>> voiceCall.getAutoCancelStatus()
1384+
0
1385+
1386+
#Set the automatic hang up function, call the UE with the mobile phone, the default automatic hang up
1387+
>>> voiceCall.setAutoCancel(1)
1388+
0
1389+
>>> voiceCall.getAutoCancelStatus()
1390+
1
1391+
```
1392+
1393+
1394+
13321395
##### Set DTMF
13331396

13341397
> **voiceCall.startDtmf(dtmf, duration)**

zh-cn/api/QuecPythonClasslib.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,69 @@ sim.setCallback(cb)
13601360

13611361

13621362

1363+
##### 设置来电自动挂断
1364+
1365+
> **voiceCall.setAutoCancel(enable)**
1366+
1367+
设置来电自动挂断(仅1803S平台支持该接口)。
1368+
1369+
* 参数
1370+
1371+
| 参数 | 参数类型 | 参数说明 |
1372+
| ----------- | -------- | ------------------------------------------------------------ |
1373+
| enable | int | 开启或者关闭来电自动挂断功能,1:开启,0:关闭 |
1374+
1375+
* 返回值
1376+
1377+
成功返回整型0,失败返回整型-1
1378+
1379+
* 示例
1380+
1381+
```python
1382+
#手机呼叫模块,默认不会自动挂断
1383+
>>> voiceCall.getAutoCancelStatus()
1384+
0
1385+
1386+
#设置自动挂断功能,手机呼叫模块,默认自动挂断
1387+
>>> voiceCall.setAutoCancel(1)
1388+
0
1389+
>>> voiceCall.getAutoCancelStatus()
1390+
1
1391+
```
1392+
1393+
1394+
1395+
##### 获取来电自动挂断使能状态
1396+
1397+
> **voiceCall.getAutoCancelStatus()**
1398+
1399+
获取来电自动挂断使能状态(仅1803S平台支持该接口)。
1400+
1401+
* 参数
1402+
1403+
1404+
1405+
* 返回值
1406+
1407+
0:默认不会自动挂断
1408+
1:默认自动挂断
1409+
1410+
* 示例
1411+
1412+
```python
1413+
#手机呼叫模块,默认不会自动挂断
1414+
>>> voiceCall.getAutoCancelStatus()
1415+
0
1416+
1417+
#设置自动挂断功能,手机呼叫模块,默认自动挂断
1418+
>>> voiceCall.setAutoCancel(1)
1419+
0
1420+
>>> voiceCall.getAutoCancelStatus()
1421+
1
1422+
```
1423+
1424+
1425+
13631426
##### 设置DTMF音
13641427

13651428
> **voiceCall.startDtmf(dtmf, duration)**

0 commit comments

Comments
 (0)