Freeswitch API调用方式

news2024/9/29 1:41:55

1.API调用方式

可以复制下面内容成.bat文件直接在windows下运行,修改成对应的ip加端口。

@echo off
SETLOCAL
:_starting
cls
set input=

echo  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@    
echo  @   1 add agent 21009      @@   11 uuid_check  21009   @@   21 list users          @@   31 check modules       @@   41 add agent 21010     @
echo  @   2 register DN1000      @@   12 show channels as xml@@   22 make a call         @@   32 sched_transfer      @@   42 register DN1003     @
echo  @   3 login agent 21009    @@   13 show channels as json@   23 fifo operation      @@   33 uuid_setvar         @@   43 login agent 21010   @
echo  @   4 queue_support monitor@@   14 uuid_kill           @@   24 show calls          @@   34 uuid_getvar         @@   44 other               @
echo  @   5 ready agent 21009    @@   15 notReady agent 21009@@   25 show outbounding    @@   35 answer a dn         @@   45 ready agent 21010   @
echo  @   6 logout agent 21009   @@   16 global_getvar       @@   26 myprofile           @@   36 21009LogoutFromTier @@   46 logout agent 21010  @
echo  @   7 tier support         @@   17 extension list      @@   27 gateway list        @@   37 tier list json_api  @@   47 other               @
echo  @   8 agent list           @@   18 del agent 1000      @@   28 lua_helloworld      @@   38 agent list json_api @@   48 other               @
echo  @   9 queue list           @@   19 shutdown FS         @@   29 fs status           @@   39 memberList json_api @@   49 DN status               @
echo  @   0 quit                 @@   20 other               @@   30 show Dialplan       @@   40 hold a dn           @@   50 eavesdrop uuid      @
echo  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@echo off 
set /p input=Press:
if "%input%" == "0"     goto :EOFd
if /I "%input%" == "1"  goto _cmd1
if /I "%input%" == "2"  goto _cmd2
if /I "%input%" == "3"  goto _cmd3
if /I "%input%" == "4"  goto _cmd4
if /I "%input%" == "5"  goto _cmd5
if /I "%input%" == "6"  goto _cmd6
if /I "%input%" == "7"  goto _cmd7
if /I "%input%" == "8"  goto _cmd8
if /I "%input%" == "9"  goto _cmd9
if /I "%input%" == "11" goto _cmd11
if /I "%input%" == "12" goto _cmd12
if /I "%input%" == "13" goto _cmd13
if /I "%input%" == "14" goto _cmd14
if /I "%input%" == "15" goto _cmd15
if /I "%input%" == "16" goto _cmd16
if /I "%input%" == "17" goto _cmd17
if /I "%input%" == "18" goto _cmd18
if /I "%input%" == "19" goto _cmd19
if /I "%input%" == "20" goto _cmd20
if /I "%input%" == "21" goto _cmd21
if /I "%input%" == "22" goto _cmd22
if /I "%input%" == "24" goto _cmd24
if /I "%input%" == "25" goto _cmd25
if /I "%input%" == "26" goto _cmd26
if /I "%input%" == "27" goto _cmd27
if /I "%input%" == "28" goto _cmd28
if /I "%input%" == "29" goto _cmd29
if /I "%input%" == "30" goto _cmd30
if /I "%input%" == "31" goto _cmd31
if /I "%input%" == "32" goto _cmd32
if /I "%input%" == "33" goto _cmd33
if /I "%input%" == "34" goto _cmd34
if /I "%input%" == "35" goto _cmd35
if /I "%input%" == "36" goto _cmd36
if /I "%input%" == "37" goto _cmd37
if /I "%input%" == "38" goto _cmd38
if /I "%input%" == "39" goto _cmd39
if /I "%input%" == "40" goto _cmd40
if /I "%input%" == "41" goto _cmd41
if /I "%input%" == "42" goto _cmd42
if /I "%input%" == "43" goto _cmd43
if /I "%input%" == "45" goto _cmd45
if /I "%input%" == "46" goto _cmd46
if /I "%input%" == "49" goto _cmd49
if /I "%input%" == "50" goto _cmd50

:_cmd1
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20add%%2021009%%40default%%20callback" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd2
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20set%%20contact%%2021009%%40default%%20user%%2F1000" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd3
curl -s -S -G -X GET --user freeswitch:works --data "tier%%20add%%20support%%40default%%2021009%%40default%%201%%201" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd4
curl -s -S -G -X GET --user freeswitch:works --data "queue%%20list%%20members%%20support%%40default" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd5
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20set%%20status%%2021009%%40default%%20'Available'" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd6
curl -s -S -G -X GET -v --user freeswitch:works --data "agent%%20set%%20status%%2021009%%40default%%20%%27Logged%%20Out%%27" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd7
curl -s -S -G -X GET --user freeswitch:works --data "tier%%20list" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd8
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20list" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd9
curl -s -S -G -X GET --user freeswitch:works --data "queue%%20list" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd11
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20get%%20uuid%%2021009%%40default" http://192.168.5.97:8080/webapi/callcenter_config
echo.
pause
goto _starting 

:_cmd12
curl -s -S -G -X GET --user freeswitch:works --data "channels" http://192.168.5.97:8080/webapi/show
pause
goto _starting 

:_cmd13
curl -s -S -G -X GET --user freeswitch:works --data "channels%%20as%%20json" http://192.168.5.97:8080/webapi/show
pause
goto _starting 


:_cmd14
set uuid=
set /p uuid=UUID input here:
curl -s -S -G -X GET --user freeswitch:works --data "%uuid%" http://192.168.5.97:8080/webapi/uuid_kill
pause
goto _starting 

:_cmd15
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20set%%20status%%2021009%%40default%%20'On%%20Break'" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd16
curl -s -S -G -X GET --user freeswitch:works http://192.168.5.97:8080/webapi/global_getvar
pause
goto _starting 

:_cmd17
curl -s -S -G -X GET --user freeswitch:works --data "status%%20profile%%20internal%%20reg" http://192.168.5.97:8080/webapi/sofia
pause
goto _starting 

:_cmd18
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20del%%201000%%40default" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd19
curl -s -S -G -X GET --user freeswitch:works http://192.168.5.97:8080/webapi/shutdown
pause
goto _starting 

:_cmd20
curl -s -S -G -X GET --user freeswitch:works http://192.168.5.97:8080/webapi/reloadxml
pause
goto _starting 

:_cmd21
curl -s -S -G -X GET --user freeswitch:works http://192.168.5.97:8080/webapi/list_users
pause
goto _starting 

:_cmd22
set dnis=
set /p dnis=DNIS input here:
curl -s -S -G -X GET --user freeswitch:works --data "user%%2F1000%%20%dnis%" http://192.168.5.97:8080/webapi/originate
pause
goto _starting 

:_cmd23
curl -s -S -G -X GET --user freeswitch:works --data "channels" http://192.168.5.97:8080/webapi/show
pause
goto _starting 

:_cmd24
curl -s -S -G -X GET --user freeswitch:works --data "calls" http://192.168.5.97:8080/webapi/show
pause
goto _starting 

:_cmd25
curl -s -S -G -X GET --user freeswitch:works --data "channels%%20like%%20external" http://192.168.5.97:8080/webapi/show
pause
goto _starting 

:_cmd26
curl -s -S -G -X GET --user freeswitch:works --data "status%%20profile%%20internal" http://192.168.5.97:8080/webapi/sofia
pause
goto _starting 

:_cmd27
curl -s -S -G -X GET --user freeswitch:works --data "status" http://192.168.5.97:8080/webapi/sofia
pause
goto _starting 

:_cmd28
curl -s -S -G -X GET -v --user freeswitch:works --data "%%2Fusr%%2Flocal%%2Ffreeswitch%%2Fscripts%%2Flua_list_active_calls.lua" http://192.168.5.97:8080/webapi/lua
pause
goto _starting 

:_cmd29
curl -s -S -G -X GET --user freeswitch:works http://192.168.5.97:8080/webapi/status
pause
goto _starting 


:_cmd30
curl -s -S -G -X GET --user freeswitch:works --data "dialplan" http://192.168.5.97:8080/webapi/show
pause
goto _starting 


:_cmd31
set mod=
set /p mod=MOD input here:
curl -s -S -G -X GET --user freeswitch:works --data "modules" http://192.168.5.97:8080/webapi/show |findstr %mod%
pause
goto _starting 


:_cmd32
set uuid=
set /p uuid=UUID input here:
curl -s -S -G -X GET --user freeswitch:works --data "%%2B10%%20%uuid%%%20900699%%20XML%%20doosan_inbound_target" http://192.168.5.97:8080/webapi/sched_transfer
pause
goto _starting 


:_cmd33
set uuid=
set var_val1=
set /p uuid=UUID input here:
set /p var_val1=userdata1 is about to set:
curl -s -S -G -X GET --user freeswitch:works --data "%uuid%%%20%userdata1%%var_val1%" http://192.168.5.97:8080/webapi/uuid_setvar
pause
goto _starting 

:_cmd34
set uuid=
set var_name=
set /p uuid=UUID input here:
set /p var_name=VAR_NAME input here:
curl -s -S -G -X GET --user freeswitch:works --data "%uuid%%%20%var_name%" http://192.168.5.97:8080/webapi/uuid_getvar
echo.
pause
goto _starting 

:_cmd35
set uuid=
set /p uuid=UUID input here:
curl -s -S -G -X GET --user freeswitch:works --data "%uuid%%%20talk" http://192.168.5.97:8080/webapi/uuid_phone_event
pause
goto _starting

:_cmd36
curl -s -S -G -X GET --user freeswitch:works --data "tier%%20del%%20support%%40default%%2021009%%40default" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd37
curl -s -S -G -X GET --user freeswitch:works --data "%%7B%%22command%%22%%3A%%20%%22callcenter_config%%22%%2C%%22data%%22%%3A%%20%%7B%%22arguments%%22%%3A%%22tier%%20list%%22%%7D%%7D" http://192.168.5.97:8080/webapi/json
pause
goto _starting 

:_cmd38
curl -s -S -G -X GET --user freeswitch:works --data "%%7B%%22command%%22%%3A%%20%%22callcenter_config%%22%%2C%%20%%22format%%22%%3A%%20%%22pretty%%22%%2C%%20%%22data%%22%%3A%%20%%7B%%22arguments%%22%%3A%%22agent%%20list%%22%%7D%%7D" http://192.168.5.97:8080/webapi/json
pause
goto _starting 

:_cmd39
curl -s -S -G -X GET --user freeswitch:works --data "%%7B%%22command%%22%%3A%%20%%22callcenter_config%%22%%2C%%22data%%22%%3A%%20%%7B%%22arguments%%22%%3A%%22member%%20list%%22%%7D%%7D" http://192.168.5.97:8080/webapi/json
pause
goto _starting 

:_cmd40
set uuid=
set /p uuid=UUID input here:
curl -s -S -G -X GET --user freeswitch:works --data "toggle%%20%uuid%" http://192.168.5.97:8080/webapi/uuid_hold 
pause
goto _starting 

:_cmd41
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20add%%2021010%%40default%%20callback" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd42
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20set%%20contact%%2021010%%40default%%20user%%2F1003" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 


:_cmd43
curl -s -S -G -X GET --user freeswitch:works --data "tier%%20add%%20zhuangzaiji%%40default%%2021010%%40default%%201%%201" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 


:_cmd45
curl -s -S -G -X GET --user freeswitch:works --data "agent%%20set%%20status%%2021010%%40default%%20'Available'" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 


:_cmd46
curl -s -S -G -X GET --user freeswitch:works --data "tier%%20del%%20zhuangzaiji%%40default%%2021010%%40default" http://192.168.5.97:8080/webapi/callcenter_config
pause
goto _starting 

:_cmd49
set userid=
set /p userid=USERID input here:
curl -s -S -G -X GET --user freeswitch:works --data "group%%20default%%20user%%20%userid%" http://192.168.5.97:8080/webapi/list_users
pause
goto _starting 

:_cmd50
set uuid=
set /p uuid=UUID input here:
curl -s -S -G -X GET --user freeswitch:works --data "user%%2F1001%%40192.168.5.97%%20%%26eavesdrop(%uuid%)" http://192.168.5.97:8080/webapi/originate
pause
goto _starting 


goto :EOF

2.执行命令 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1181333.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

JAVA中类和对象的认识

1、面向对象的初步认知 1.1 什么是面向对象 Java是一门纯面向对象的语言(Object Oriented Program,简称OOP),在面向对象的世界里,一切皆为对象。面 向对象是解决问题的一种思想,主要依靠对象之间的交互完成一件事情。用面向对象的…

LabVIEW示波器连续触发编程

LabVIEW示波器连续触发编程 niScopeEX Fetch Forever范例利用了如何设置硬件和驱动的优点来进行连续采集。 当NI-SCOPE设备被设置为采集预触发扫描,设备上的板载内存被用作一个环形缓冲。这样,无论触发何时到来,设备都可以追踪和检索所有要求…

Ubuntu开机无法进入系统,文件根系统目录空间不足导致?

前言: 自己电脑上装的是Win11和Ubuntu20双系统,平时就是切换着用。 偶然有次,Ubuntu提示文件根系统目录空间不足,自己没在意。 结果下次开机进入Ubuntu时候,芭比Q了。。进不了系统 这样的事情发生很多次了,…

密度聚类与层次聚类

大家好,我是带我去滑雪! 密度聚类(Density-based Clustering)和层次聚类(Hierarchical Clustering)是两种不同的聚类方法,用于将数据集中的数据点分组成簇。 目录 一、密度聚类 (…

高频时序数据仓库-在线课堂二

详细了解天软高频时序数据仓库的构架及性能后,本周天软在线课堂将带来高频时序数据仓库的应用展示。扫描图片二维码可报名参会。

MATLAB|热力日历图

目录 日历图介绍: 热力日历图的特点: 应用场景: 绘图工具箱 属性 (Properties) 构造函数 (Constructor) 公共方法 (Methods) 私有方法 (Private Methods) 使用方法 日历图介绍: 热力日历图是一种数据可视化形式&#xf…

Pioneer电源维修PM36218B-10P-1-8PH-J

开关电源出现不启振的时候,我们通常需要查看开关频率是否正确、保护电路是否断路、电压反馈电路、电流反馈电路又没问题,开关管是否击穿等。 pioneer电源维修时,PWM模块为UC3843,检测未发现其他异常,在R(220K)上并接一…

美妆行业如何通过自媒体提升品牌曝光

自媒体的出现使美妆行业的推广方式产生了变化,自媒体平台的用户年轻化、用户基数大、消费力较强,能够接受新鲜事物,为美妆品牌带来广阔的市场和消费人群。 因此自媒体平台的内容运营十分重要,今天媒介盒子就来和大家聊聊&#xf…

VBA技术资料MF80:选择文件及文件夹

我给VBA的定义:VBA是个人小型自动化处理的有效工具。利用好了,可以大大提高自己的工作效率,而且可以提高数据的准确度。我的教程一共九套,分为初级、中级、高级三大部分。是对VBA的系统讲解,从简单的入门,到…

ARPG----C++学习记录03 Section7位置,偏移,函数

Pawn 新建一个Pawn的c类Bird,并且新建一个蓝图 添加一个Capsule(胶囊) 不知道要加啥头文件,去网站找https://docs.unrealengine.com/5.3/en-US/API/Runtime/Engine/Components/UCapsuleComponent/SetCapsuleSize/ 包含文件名字的头…

【vue3/高德地图】实现地图打点/自定义点位图标/地理围栏实现

<template><div class"app-container"><div id"container"></div></div> </template><script setup> import AMapLoader from amap/amap-jsapi-loader; /*在Vue3中使用时,需要引入Vue3中的shallowRef方法(使用s…

Microsoft Edge浏览器不兼容解决办法

找到 Edge 的安装位置&#xff0c;一般在 C:\Program Files (x86)Microsoft Edge\Application\ 这个目录&#xff0c;把 edge.exe 或msedge.exe 修改为 chrome.exe 再重启电脑。

DocTemplateTool - 可根据模板生成word或pdf文件的工具

你是否经常遇到这样的场景&#xff1a;产品运营有着大量的报告需求&#xff0c;或者给客户领导展现每周的运营报告&#xff1f;这些文档类的任务可以交给运营同事&#xff0c;他们负责文档排版和样式&#xff0c;你作为开发人员你只需要提供数据源&#xff0c;和一个映射表&…

C++ -std 编译标准

概述 任何一门编程语言都有相关的组织和团体在不停的维护和更新。原因很简单&#xff0c;时代在发展&#xff0c;编程语言如果停滞不前&#xff0c;最终就会被淘汰。 以 C 语言为例&#xff0c;发展至今该编程语言已经迭代了诸多个版本&#xff0c;例如 C89 &#xff08;偶尔…

十大字体设计网站年终盘点:顶级设计师独家推荐

即时设计 首款国产的专业 UI 设计工具即时设计&#xff0c;官方字体库内置几十种字体任你选择&#xff0c;例如阿里巴巴惠普体、思源宋体、思源黑体、优设标题黑等&#xff0c;一键点击使用无需下载安装。还能够根据设计内容进行字体粗细调节&#xff0c;从纤细到特粗&#xf…

基准测试详解

&#x1f4e2;专注于分享软件测试干货内容&#xff0c;欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; 如有错误敬请指正&#xff01;&#x1f4e2;交流讨论&#xff1a;欢迎加入我们一起学习&#xff01;&#x1f4e2;资源分享&#xff1a;耗时200小时精选的「软件测试」资…

柱状图:带误差棒

误差棒可以表示样本标准差&#xff0c;也可以表示样本标准误。 导入库&#xff1a; import pandas as pd 自定义用来绘制带误差棒&#xff08;样本标准差或样本标准误&#xff09;的柱状图&#xff1a; def col(y, x, face, df, errprbarstd) : print(ggplot(df.groupby([x…

el-checkbox-group的全选与反选

需求如下&#xff1a; 思路&#xff1a;在点击全部时按钮组双向绑定赋值全部值&#xff0c;点击按钮组内按钮计算选中按钮数量与按钮组数量对比&#xff0c;判定是否选中全部 代码如下&#xff1a; <template><div><el-checkbox-button v-model"checkall…

视频去水印怎么去?3个简单的去水印方法分享

当我们需要视频去水印怎么去时&#xff0c;了解如何有效地去除视频水印变得至关重要,在日常使用视频资源的过程中&#xff0c;我们可能会遇到一些带有品牌标志或文字水印的视频&#xff0c;这些水印可能会影响视频的观赏体验&#xff0c;特别是当我们需要将视频用于学习、研究或…

viple入门(五)

&#xff08;1&#xff09;自定义活动 自定义活动&#xff0c;用来创建新的组件、服务、函数或者其他代码模块&#xff0c;使用最多的是创建函数。 函数是对一个功能的封装&#xff0c;在调用的时候执行&#xff0c;没有调用的时候则不执行。函数可能有参数&#xff0c;可能没…