日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

freeswitch ws php,针对FreeSwitch的呼叫中心接口

發(fā)布時間:2024/3/13 php 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 freeswitch ws php,针对FreeSwitch的呼叫中心接口 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

針對FreeSwitch的呼叫中心接口

tags:FSGUI FreeSwitch 接口 呼叫中心接口 創(chuàng)建時間:2018-12-21 11:37:35

座席登且獲取相關(guān)信息

__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"

送的認證模塊數(shù)據(jù): '{"Agent":"8000","Password":"1234","Extension":"1001"}'

那么就會源源不斷地從遠程服務器獲得數(shù)據(jù)

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 獲取一個系統(tǒng)生成的uuid:

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

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

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

3. 設(shè)置分機忙閑

//idle or busy

//idle意為設(shè)置為閑

//busy意為設(shè)置為忙

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. 設(shè)置分機上線下線

//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. 設(shè)置分機呼叫狀態(tài)

//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. 查詢分機狀態(tài)

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 發(fā)起一個呼叫

//Job_uuid 源主叫uuid get_uuid獲得

Callername sip里的name

Callernum aleg 號碼

Calleenum bleg 號碼

A_gatewayname 如果a是外線,則要指定a的出局網(wǎng)關(guān)

B_gatewayname 如果b是外線,則要指定b的出局網(wǎng)關(guān)

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的出局網(wǎng)關(guān)

B_gatewayname 如果b是外線,則要指定b的出局網(wǎng)關(guān)

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,在這里以字符串發(fā)送

先呼內(nèi)線再呼外線

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

先呼外線再呼內(nèi)線

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 發(fā)起時由調(diào)用方指定呼叫事件和cdr的post URL

Job_uuid 源主叫uuid get_uuid獲得

Callername sip里的name

Callernum aleg 號碼

Calleenum bleg 號碼

A_gatewayname 如果a是外線,則要指定a的出局網(wǎng)關(guān)

B_gatewayname 如果b是外線,則要指定b的出局網(wǎng)關(guān)

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,在這里以字符串發(fā)送

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中配的網(wǎng)關(guān)組呼叫

從配的GatewayGroupId中的網(wǎng)關(guān)中隨機獲取一個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 呼叫外線后轉(zhuǎn)內(nèi)部座席組或ivr等

這里是通過我們的應用來實現(xiàn),把平臺呼出外線反作為外線呼入來處理,從而可以更方便地進行功能擴展

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 呼出后轉(zhuǎn)系統(tǒng)路由

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. 轉(zhuǎn)給外呼機器人接口

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. 呼叫后轉(zhuǎn)給自動回應

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. 呼叫后轉(zhuǎn)放音

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. 呼叫后轉(zhuǎn)給自動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 按號碼監(jiān)聽

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

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

EvdedPhone 被監(jiān)聽的號碼

EvdPhone 由哪個號碼監(jiān)聽

EvdGateway 如果是外線號碼進行監(jiān)聽,則需要指定網(wǎng)關(guān)

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"

為了減少代碼量,所以使用了和監(jiān)聽一樣的名稱

EvdedPhone 邀請加入多方通話的的號碼

EvdPhone 邀請加入的多方通話里有哪個號碼在通話

EvdGateway 如果是外線號碼,則需要指定網(wǎng)關(guān)

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"

為了減少代碼量,所以使用了和監(jiān)聽一樣的名稱

EvdedPhone 被監(jiān)聽的的號碼

EvdPhone 監(jiān)聽的號碼

EvdGateway 如果是外線號碼,則需要指定網(wǎng)關(guān)

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 不間斷循環(huán)

```

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 中止相關(guān)操作

正常返回值:”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 發(fā)送dtmf

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

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

```

PhoneNumber 準備發(fā)送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 發(fā)送傳真

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

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

```

PhoneNumber 目標號碼

GatewayName gw名稱,如果為空,則只是發(fā)到內(nèi)線的

FaxFile 傳真文件名,是轉(zhuǎn)成的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 轉(zhuǎn)接

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

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

為了減少代碼量,所以使用了和監(jiān)聽一樣的名稱

EvdedPhone 正在通話的號碼

EvdPhone 要轉(zhuǎn)出的號碼

EvdGateway 如果是外線號碼,則需要指定網(wǎng)關(guān)

```

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進行放音

```

參數(shù): 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

```

參數(shù): 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 //創(chuàng)建一個3000名稱的會議室,主持人號碼是1002,不經(jīng)過落地網(wǎng)關(guān)

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 //增加一個成員并呼叫

//由系統(tǒng)呼叫號碼為1002的號碼,不經(jīng)過落地網(wǎng)關(guān),IsMute為默認是禁止發(fā)方與否

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 //檢查錄音狀態(tài)

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 //發(fā)送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 //調(diào)整某個會議成員的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 // "切換會議人員狀態(tài)" //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 //允許發(fā)言 //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 //設(shè)置會議呼入時的口令 //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 //播放相關(guān)文件給會議 //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 //設(shè)置一些會議參數(shù)

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群:

總結(jié)

以上是生活随笔為你收集整理的freeswitch ws php,针对FreeSwitch的呼叫中心接口的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。