当前位置: 首页 > news >正文

FreeSWITCH JSON API

仅举几例:

fs_cli -x ' json {"command" : "status", "data" : ""}'

fs_cli -x 'json {"command" : "sofia.status", "data" : ""}'

fs_cli -x 'json {"command" : "sofia.status", "data" : {"profile": "internal"}}'

lua 怎么搞:

-- 有 session 可以这样写
local data = {
    profile = "internal",
}

local cmd = {
    command = "sofia.status", 
    data = data,
}

local json = freeswitch.JSON()
r = session:executeJSAPI(cmd)
session:consoleLog("ERR", json:encode(r))
 

-- 没有 session
local data = {
    profile = "internal",
}

local cmd = {
    command = "sofia.status", 
    data = data,
}

local json = freeswitch.JSON()
r = json:execute(cmd)
freeswitch.consoleLog("ERR", json:encode(r))
 

参考链接:

https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Modules/mod_commands_1966741/

http://www.lryc.cn/news/468551.html

相关文章:

  • 学习docker第三弹------Docker镜像以及推送拉取镜像到阿里云公有仓库和私有仓库
  • 一文掌握Kubernates核心组件,构建智能容器管理集群
  • 正则表达式快速入门
  • 【小程序】-基础语法(二)
  • js 填充数组
  • AI创作3款软件分享,助力内容创作者高效产出优质作品
  • A survey of loss functions for semantic segmentation——论文笔记
  • docker部署es与kibana Mac
  • redis的渐进式哈希?说一下细节?------面试题分享
  • javaWeb项目-springboot+vue-车辆管理系统功能介绍
  • redis和memcached的区别
  • 构建安全基石:网络安全等级保护定级指南
  • PyQt 入门教程(3)基础知识 | 3.1、使用QtDesigner创建.ui文件
  • 解锁金融大门,你的基从备考秘籍全揭秘!
  • 详解Linux系统中的设备驱动程序.ko文件
  • MG协议转换器:高效连接,智控未来
  • pycharm设置自动格式化代码
  • AI应用程序低代码构建平台Langflow
  • QT-使用QSS美化UI界面
  • 【程序员笔记】-- 常用开发工具汇总
  • 基于SSM考研助手系统的设计
  • 【MacOS】RocketMQ 搭建Java客户端
  • 前端学习---(5)js基础--3
  • Spring Boot 3.3.4 升级导致 Logback 之前回滚策略配置不兼容问题解决
  • 如何开发属于自己的Hoobuy跨境独立站
  • java智能物流管理系统源码(springboot)
  • 全新语音图像数据集,以高质量训练数据加速提升模型性能
  • 基于Springboot在线视频网站的设计与实现
  • vue富文本使用editor
  • Spring Boot植物健康系统:绿色科技的创新引擎