FreeSWITCH中文网,电话机器人开发网 ,微信订阅号:

FreeSWITCH及VOIP,Openser,电话机器人等产品中文技术资讯、交流、沟通、培训、咨询、服务一体化网络。QQ群:293697898

针对FreeSwitch的呼叫中心接口


tags:FSGUI FreeSwitch 接口 呼叫中心接口 创建时间:2018-12-21 11:37:35

座席登且获取相关信息

__author__ = 'lihao,18621575908'

#https://github.com/websocket-client/websocket-client
import websocket
try:
    import thread
except ImportError:  # TODO use Threading instead of _thread in python3
    import _thread as thread
import time
import sys
import json

def on_message(ws, message):
    print(message)


def on_error(ws, error):
    print(error)


def on_close(ws):
    print("### closed ###")


def on_open(ws):
    def run(*args):

        s = '{"Agent":"8000","Password":"1234","Extension":"1001"}'

        ws.send(s)
        time.sleep(1)
     thread.start_new_thread(run, ())
if __name__ == "__main__":
    websocket.enableTrace(True)
    if len(sys.argv) < 2:
        host = "ws://139.196.40.50:8084/fsgui"
    else:
        host = sys.argv[1]
    ws = websocket.WebSocketApp(host,
                                on_message=on_message,
                                on_error=on_error,
                                on_close=on_close)
    ws.on_open = on_open
    ws.run_forever()



##除登录认证或单独说明外,其它的接口均为控制,则回应值
###正常的为:"code": "0", "msg": "successed", "sessionid": uuid
###不正常的为: "code": "1", "msg": "failed", "sessionid": uuid
###属于没注册的或token失效则为: "Not Authorized"

附加接口,坐席登录后获得事件或cdr

websocket地址: host = "ws://139.196.40.50:8084/fsgui"

送的认证模块数据: '{"Agent":"8000","Password":"1234","Extension":"1001"}'

那么就会源源不断地从远程服务器获得数据

1 token 认证:

返回值: "token":"token code"

非正常返回值: "Not Authorized"

   curl -d '{"username": "admin", "password": "admin"}' -H "Content-Type:application/json" http://192.168.1.115:8082/api/login

2 获取一个系统生成的uuid:

正常返回值:”result":"success","uuid":uuid

不正常返回值:”result":"failed"

  curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/get_uuid

3. 设置分机忙闲

//idle or busy //idle意为设置为闲 //busy意为设置为忙 curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"idle" }' -H "Authorization:Nway token " http://192.168.1.115:8085/api/extension_seatstatus

4. 设置分机上线下线

//up or down //up为上线 //down为下线 curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"up" }' -H "Authorization:Nway token " http://192.168.1.115:8085/api/extension_seatstate

5. 设置分机呼叫状态

//ring,talking,ivr,ready //ring 振铃中 //talking通话中 //ivr 语音导航中 //ready 准备就绪,可以通话

  curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"ring" }'  -H "Authorization:Nway token " http://192.168.1.115:8085/api/extension_callstate

6. 查询分机状态

 curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/extension_info/1002

7 获取一个正在通话中的电话的uuid:

正常返回值:”result":"success","uuid":uuid

不正常返回值:”result":"failed"

   curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/get_phone_uuid/1002

8 挂断一个正通话中电话

正常返回值:”result":"success","info":hangupcause

不正常返回值:”result":"failed"

  curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/hangup/1002

9 hold一个通话

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

   curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/hold/1002

10 unhold一个通话

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

  curl  -H "Authorization:Nway token  " http://192.168.1.115:8085/api/unhold/1002

11 发起一个呼叫

//Job_uuid 源主叫uuid get_uuid获得 Callername sip里的name Callernum aleg 号码 Calleenum bleg 号码 A_gatewayname 如果a是外线,则要指定a的出局网关 B_gatewayname 如果b是外线,则要指定b的出局网关 A_effective_caller_id_num a到b显示的号码 B_effective_caller_id_num b到a在a上显示的号码 A_external false,true,标记a是不是外线 B_external false,true,标记b是不是外线

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

   curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"1002","Callernum":"1002","Calleenum":"1000","A_gatewayname":"","B_gatewayname":"","A_effective_caller_id_num":"1002","B_effective_caller_id_num":"1000","A_external":"false","B_external":"false"}'  -H "Authorization:Nway token " http://192.168.1.115:8085/api/originate

11b 呼叫两个通道且放音,originate_playring

这个接口可以替代原上一个接口originage,即我们不指定播放的ring_id即可

Job_uuid 源主叫uuid get_uuid获得 Callername sip里的name Callernum aleg 号码 Calleenum bleg 号码 A_gatewayname 如果a是外线,则要指定a的出局网关 B_gatewayname 如果b是外线,则要指定b的出局网关 A_effective_caller_id_num a到b显示的号码 B_effective_caller_id_num b到a在a上显示的号码 A_external false,true,标记a是不是外线 B_external false,true,标记b是不是外线 Ring_id , 上传后的彩铃id,在这里以字符串发送

先呼内线再呼外线

curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"1001","Callernum":"1001","Calleenum":"018621575908","A_gatewayname":"nwaycall","B_gatewayname":"nwaycall","A_effective_caller_id_num":"18621575908","B_effective_caller_id_num":"13671947488","A_external":"false","B_external":"true","Ring_id":"35"}' -H "Authorization:Nway token" http://127.0.0.1:8085/api/originate_playring

先呼外线再呼内线

curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"18621575908","Callernum":"018621575908","Calleenum":"1001","A_gatewayname":"nwaycall","B_gatewayname":"nwaycall", "A_effective_caller_id_num":"18621575908", "B_effective_caller_id_num":"13671947488","A_external":"true","B_external":"false","Ring_id":"35"}' -H "Authorization:Nway token" http://127.0.0.1:8085/api/originate_playring 两线均为外线

curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"18621575908","Callernum":"018621575908","Calleenum":"013671947488","A_gatewayname":"nwaycall","B_gatewayname":"nwaycall","A_effective_caller_id_num":"18621575908","B_effective_caller_id_num":"13671947488","A_external":"true","B_external":"true","Ring_id":"35"}' -H "Authorization:Nway token" http://127.0.0.1:8085/api/originate_playring

11c 发起时由调用方指定呼叫事件和cdr的post URL

Job_uuid 源主叫uuid get_uuid获得 Callername sip里的name Callernum aleg 号码 Calleenum bleg 号码 A_gatewayname 如果a是外线,则要指定a的出局网关 B_gatewayname 如果b是外线,则要指定b的出局网关 A_effective_caller_id_num a到b显示的号码 B_effective_caller_id_num b到a在a上显示的号码 A_external false,true,标记a是不是外线 B_external false,true,标记b是不是外线 Ring_id , 上传后的彩铃id,在这里以字符串发送 Cdr_url , 当遇到有cdr时,应post到的地址 Event_url , 当有消息事件时,应post到的地址 返回值: 成功: w.WriteJson(map[string]string{"code": "1", "msg": "BackMsg_19", "sessionid": myOri.Job_uuid}) 失败: w.WriteJson(map[string]string{"code": "2", "msg": "BackMsg_20", "sessionid": myOri.Job_uuid}) curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"1002","Callernum":"1002", "Calleenum":"1000","A_gatewayname":"","B_gatewayname":"","A_effective_caller_id_num":"1002", "B_effective_caller_id_num":"1000","A_external":"false","B_external":"false","Ring_id":"35", "Cdr_url":"http://123.1.2.2/cdr/","Event_url":"http://123.1.2.2/event/"}' -H "Authorization:Nway token" http://192.168.1.115:8085/api/originate_yn

11d 采用fsgui中配的网关组呼叫

从配的GatewayGroupId中的网关中随机获取一个gateway,然后进行a路和b路的呼叫,其它值同11c curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"1002","Callernum":"1002", "Calleenum":"1000","A_effective_caller_id_num":"1002","GatewayGroupId":"1", "B_effective_caller_id_num":"1000","A_external":"false","B_external":"false","Ring_id":"35", "Cdr_url":"http://123.1.2.2/cdr/","Event_url":"http://123.1.2.2/event/"}' -H "Authorization:Nway token" http://192.168.1.115:8085/api/originate_ext

11e 呼叫外线后转内部座席组或ivr等

这里是通过我们的应用来实现,把平台呼出外线反作为外线呼入来处理,从而可以更方便地进行功能扩展 curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callername":"1002","Callernum":"1002", "GroupNum":"8000","A_gatewayname":"nway", "A_effective_caller_id_num":"1002"," "B_effective_caller_id_num":"1000","A_external":"false", "Ring_id":"35"}' -H "Authorization:Nway token" http://192.168.1.115:8085/api/originate_to_group

11f 呼出后转系统路由

curl -H "Content-Type: application/json" -d '{"Job_uuid":"1234","Callernum":"1002", "Calleenum":"1000","A_gatewayname":"","A_effective_caller_id_num":"1002", "B_effective_caller_id_num":"1000","A_external":"false"}' -H "Authorization:Nway token" http://192.168.1.115:8085/api/to_dialplan

11g. 转给外呼机器人接口

curl -H "Content-Type: application/json" -d '{"Job_uuid":"feew32223dd3e32re32e32", "Callernum":"18621575908", "Calleenum":"999888", "A_gatewayname":"nway1", "A_effective_caller_id_num":"021168686868", "A_external":"true", "Cdr_url":"http://127.0.0.1:8085/fs/cdr", "Event_url":"http://127.0.0.1:8085/fs/callstate", "Record_file":"mytest.wav"}' -H "Authorization:Nway TOKEN" http://127.0.0.1:8085/api/originate_i

11h. 呼叫给电话机器人时,进行回铃检测

curl -H "Content-Type: application/json" -d '{"Job_uuid":"feew32223dd3e32re32e32", "Callernum":"18621575908", "Calleenum":"999888", "A_gatewayname":"nway1", "A_effective_caller_id_num":"021168686868", "A_external":"true", "Cdr_url":"http://127.0.0.1:8085/fs/cdr", "Event_url":"http://127.0.0.1:8085/fs/callstate", "Record_file":"mytest.wav"}' -H "Authorization:Nway TOKEN" http://127.0.0.1:8085/api/originate_i_da

11i. 呼叫后转给自动回应

curl -H "Content-Type: application/json" -d '{"Job_uuid":"feew32223dd3e32re32e32", "Callernum":"18621575908", "A_gatewayname":"nway1", "A_effective_caller_id_num":"021168686868", "A_external":"true"}' -H "Authorization:Nway TOKEN" http://127.0.0.1:8085/api/originate_echo

11j. 呼叫后转放音

curl -H "Content-Type: application/json" -d '{"Job_uuid":"feew32223dd3e32re32e32", "Callernum":"18621575908", "A_gatewayname":"nway1", "A_effective_caller_id_num":"021168686868", "A_external":"true","Filename":"/hold.wav"}' -H "Authorization:Nway TOKEN" http://127.0.0.1:8085/api/originate_playback

11k. 呼叫后转给自动park

curl -H "Content-Type: application/json" -d '{"Job_uuid":"feew32223dd3e32re32e32", "Callernum":"18621575908", "A_gatewayname":"nway1", "A_effective_caller_id_num":"021168686868", "A_external":"true"}' -H "Authorization:Nway TOKEN" http://127.0.0.1:8085/api/originate_park

12 按uuid桥接两个通话通道

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

A_uuid A的uuid B_uuid B的uuid curl -H "Content-Type: application/json" -d '{"A_uuid":"aleguuid","B_uuid":"bleguuid"}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/bridge

13 按号码桥接两个通话通道

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

``` 同上,把uuid直接使用号码

``` curl -H "Content-Type: application/json" -d '{"A_phone":"1002","B_phone":"1003"}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/bridge_phone

14 park一个通话

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

挂起一个号码 curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/park/1002

15 抢接一个来电

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

把最后一个来电抢接过来 curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/intercept/1002

16 由平台应答

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

    curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/answer/1002

17 按号码监听

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

EvdedPhone 被监听的号码 EvdPhone 由哪个号码监听 EvdGateway 如果是外线号码进行监听,则需要指定网关 curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/eavesdrop

18 多方通话

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

为了减少代码量,所以使用了和监听一样的名称 EvdedPhone 邀请加入多方通话的的号码 EvdPhone 邀请加入的多方通话里有哪个号码在通话 EvdGateway 如果是外线号码,则需要指定网关 curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/threeway

19 耳语

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

为了减少代码量,所以使用了和监听一样的名称 EvdedPhone 被监听的的号码 EvdPhone 监听的号码 EvdGateway 如果是外线号码,则需要指定网关 curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/whisper

20 preanswer

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

               curl  -H "Authorization:Nway token. . " http://192.168.1.115:8085/api/preanswer/1002

21 给已answer的通道放音

```

PhoneNumber 准备放音的号码 FilePath 语音文件路径 Loopplay 不间断循环 ``` curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","FilePath":"D:\nwaytest.wav","Loopplay":"true"}' -H "Authorization:Nway . . " http://192.168.1.115:8085/api/playback

22 中止相关操作

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

           curl  -H "Authorization:Nway token " http://192.168.1.115:8085/api/break/1002

23 录音

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

PhoneNumber 准备录音的号码 FilePath 语音文件路径 Flag 开始就录制 Limit 0即通话哪怕是一秒也录制,如果是5,则如果通话低于5就不保存 curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","Filepath":"nwaytestr.wav","Flag":"start","Limit":"0"}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/record

24 发送dtmf

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

``` PhoneNumber 准备发送dtmf的号码 Dtmf dtmf

``` curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","Dtmf":"18621575908"}' -H "Authorization:Nway token " http://192.168.1.115:8085/api/senddtmf

25 发送传真

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

``` PhoneNumber 目标号码 GatewayName gw名称,如果为空,则只是发到内线的 FaxFile 传真文件名,是转成的tiff文件

```

      curl -H "Content-Type: application/json" -d '{"PhoneNumber":"02112345678","GatewayName":"fax","FaxFile","/tmp/av.tiff" }'  -H "Authorization:Nway token " http://192.168.1.115:8085/api/send_fax

26 转接

正常返回值:”result":"success","info":returnstr

不正常返回值:”result":"failed"

为了减少代码量,所以使用了和监听一样的名称 EvdedPhone 正在通话的号码 EvdPhone 要转出的号码 EvdGateway 如果是外线号码,则需要指定网关 ``` curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}' -H "Authorization:Nway token" http://192.168.1.115:8085/api/transfer

```

27 按uuid进行放音

``` 参数: Uuid, FilePath, Loopplay, Channel string

Channel both,aleg,bleg

curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","FilePath":"D:\nwaytest.wav","Loopplay":"true","Channle":"aleg"}' -H "Authorization:Nway . . " http://192.168.1.115:8085/api/uuid_playback ```

28 按uuid打断

curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/uuid_break/uuid

29 按 uuid 挂断

curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/uuid_hangup/uuid

30 按uuid park

curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/uuid_park/uuid

31 按uuid hold

curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/uuid_hold/uuid

32 按 uuid answer

curl -H "Authorization:Nway token " http://192.168.1.115:8085/api/uuid_answer/uuid

33 按uuid transfer

``` 参数: EvdedUuid, EvdPhone, EvdGateway string

curl -H "Content-Type: application/json" -d '{"EvdedUuid":"uuid","EvdPhone":"1102","EvdGateway ":"nway1"}' -H "Authorization:Nway . . " http://192.168.1.115:8085/api/uuid_transfer ```

这里的会议以3000为主,主被叫号码1002,1003,1000,1004/

1 //创建一个3000名称的会议室,主持人号码是1002,不经过落地网关

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","PhoneNumber":"1002","GatewayName":""}'  -H "Authorization:Nway token" http://192.168.1.115:8082/api/conference_create

 "/conference_create"

2 //增加一个成员并呼叫

//由系统呼叫号码为1002的号码,不经过落地网关,IsMute为默认是禁止发方与否

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","PhoneNumber":"1002","GatewayName":"","IsMute":"false"}'  -H "Authorization:Nway token" http://192.168.1.115:8082/api/conference_add

 "/conference_add"

3 //获得一个会议中某号码的memberid

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","CallerNumber":"1002"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_memberid

"/conference_memberid"

4 //踢掉所有与会成员

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_kick_all/3000

 "/conference_kick_all/:conference"

5 //会议自动增益

//param on/off
//level a number

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","param":"on","level":"4"}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_agc

 "/conference_agc"

6 //检查录音状态

 curl  -H "Authorization:Nway token. . " http://192.168.1.115:8082/api/conference_chkrecord/3000

 "/conference_chkrecord"

7 //禁听

//memberid是用getmemberid获得 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_deaf

"/conference_deaf"

8 //发送dtmf到会议成员 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":"", "Dtmf":"520"}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_dtmf

"/conference_dtmf"

9 //调整某个会议成员的energy //Flag |all|last|non_moderator //Newval

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":"", "Newval":"520"}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_energy

"/conference_energy"

10 //进入会议时的语音 //flag on|off|none|file //Filename Flag为file时有效

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"3","Filename":""}' -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_enter_sound

"/conference_enter_sound"

11 //退出会议的语音

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"3","Filename":""}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_exit_sound

 "/conference_exit_sound"

12 // "切换会议人员状态" //Flag member_id|all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_floor

 "/conference_floor"

13 //挂断某个member,但不播放退出音

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}'  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_hup

"/conference_hup"

14 //挂断某个member,播放退出音

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}' -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_kick

"/conference_kick"

15 //列出会议 //Flag [pretty|summary|count|delim ]

curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_list/pretty

"/conference_list/:flag"

16 //锁定某个会议,不允许新的人员进入

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_lock/3000

"/conference_lock/:conference"

17 //解锁某个会议,允许新的会议人员进入

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_unlock/3000

"/conference_unlock/:conference"         
//////////////////////////////////////////

18 //禁言 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":"","Quiet":"quiet"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_mute

"/conference_mute"

19 //允许发言 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":"","Quiet":"quiet"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_unmute                        
 "/conference_unmute"

20 //移除当前会议的录音 //Flag |all

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"all"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_norecord                                             
 "/conference_norecord"

21 //会议暂停录音 //Flag

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"all"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_pause                                                   
 "/conference_pause"

22 //设置会议呼入时的口令 //Flag

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"all"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_pin                                                                               
 "/conference_pin"

23 //播放相关文件给会议 //Flag [{vol=,full-screen=true,png_ms=100}] [async| [nomux]]

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"all"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_play                                                                                                             
 "/conference_play"

24 //会议录音 //Flag

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"all"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_record                                                                                                                                        
 "/conference_record"

25 //会议录音控制

// recording start

// recording check

// recording stop |all

// recording pause

// recording resume

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"start","Filename":"/home/recording/abc.wav"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_recording                                                   
 "/conference_recording"

26 //恢复会议录音

//Flag

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"/home/recording/abc.wav"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_resume                                                                                                                                                           
 "/conference_resume"


 "/conference_say"

27 //设置一些会议参数

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Param":"Value","Filename":"/home/recording/abc.wav"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_set                                                                           
 "/conference_set"

28 //停止播放一些语音 //Flag [current|all] []

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_stop                            
 "/conference_stop"

29 //切换禁言 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":"","Quiet":"quiet"}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_tmute                                    
 "/conference_tmute"

30 //解除禁听 //Flag |all|last|non_moderator

curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Member_id":"3","Flag":""}'  -H "Authorization:Nway token  " http://192.168.1.115:8082/api/conference_undeaf                                                             
 "/conference_undeaf"                     
//////////////////////////////////////////

31 //移除会议口令

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_nopin/3000

"/conference_nopin/:conference"

32 //暂停播放

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_pause_play/3000

 "/conference_pause_play/:conference"

33 //查询所有正在进行中的会议

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conferences

34//查询某个会议中的成员列表

 curl  -H "Authorization:Nway token " http://192.168.1.115:8082/api/conference_members/3000


上海老李,QQ:1354608370,FreeSWITCH QQ群: