python/lua/java等语言通过ESL执行freeswit的APP
Song •
1870 次浏览 •
0个评论 •
2018年11月09日
python/lua/java等语言通过ESL执行freeswit的APP
一、为什么要通过ESL执行freeswit的APP
因为有时候在ESL链接的过程中需要操作一些APP的功能,而不是API的功能,使用不能使用api()
来执行。
二、使用什么方式执行APP
1、execute
python可以使用如下方法实现:
connect.execute(handle, "start_dtmf", uuid);
其他语言可以参考
esl_execute(&handle, "start_dtmf","" , uuid);
例子,我要实现ESL执行内置脚本的detect_speech
:
#!/usr/bin/python
# -*- coding:utf8 -*-
from ESL import *
connect = ESLconnection("127.0.0.1", "0", "0")
if connect.connected:
e = connect.recvEvent()
if e:
uuid = e.getHeader('Channel-Call-UUID')
connect.execute("detect_speech","stop",uuid)
2、excuteAsync
方法与excute
一样,不过他是异步执行。
用户评论
当前暂无评价,快来发表您的观点吧...
更多相关好文
当前暂无更多相关好文推荐...
-
微信公众号文章/菜单添加小程序时路径如何获取? 2021-12-22
-
如何轻松获取微信小程序路径path? 2021-12-22
-
cannot import name 'CUDA_HOME' from 'mmcv.utils' 2021-12-05
-
vgg的loss一轮达到ln(1/n)阈值,如何解决 2021-11-21
-
如何下载使用utils库 2021-10-27
热门文章
-
微信公众号文章/菜单添加小程序时路径如何获取? 2021-12-22
-
如何轻松获取微信小程序路径path? 2021-12-22
-
python/MySQL分页查询方法与性能优化 2021-06-23
-
mitmproxy & python 忽略所有的https/ssl请求 2021-04-19
-
如何使用邮件/邮箱推广微信公众号/小程序? 2021-01-28
栏目最新文章
公告提示
- pytorch中文文档
- pytorch官方文档
提交评论