FreeSWITCH调用接口 监听 多方通话 强转 抢接等,FreeSWITCH电话会议(动态库和restful接口)

Stella981
• 阅读 1187

#更多参考: http://freeswitch.net.cn/86.html

中间件下载地址,含windows,linux

旧版本下载地址:

http://121.40.240.104:8090/

最新版本统一存于:

https://github.com/nwaycn/FSGui

新增接口: 1. 查询分机状态 curl -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUxNzMyNzUsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTE2OTY3NX0.bcg0zDwqwyczAFzdgzlW3eTwIkE1crHXgr97HJd8Bo8" http://192.168.1.115:8082/api/extension_info/1002

2. 设置分机忙闲
//idle or busy
curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"idle" }'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_seatstatus

2. 设置分机上线下线
//up or down
curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"up" }'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_seatstate

3. 设置分机呼叫状态
//ring,talking,ivr,ready
curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"ring" }'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_callstate

动态链接库

    //////////////////////////////////////////////////////////////////////////
    //call back
    //////////////////////////////////////////////////////////////////////////
    
    
    typedef void (__stdcall *CallBackEvent)(EVENT_NAME evt_name, const char* caller_number, const char* dest_number,
                                            const char* gateway_name, const char* origination_name,CALL_DIRECTION call_direction );
    
    typedef void (__stdcall  *CallBackCdr)(const char* caller_number, const char* dest_number, const char* gateway_name, const char* origination_name,
                                           CALL_DIRECTION call_directon, int start_time, int answer_time, int hangup_time);
    //////////////////////////////////////////////////////////////////////////
    //the service
    //////////////////////////////////////////////////////////////////////////
    int start_nway_inbound_server();
    int stop_nway_inbound_server();
    //////////////////////////////////////////////////////////////////////////
    //third interface
    //////////////////////////////////////////////////////////////////////////
    
    //pHandle句柄,uuid
    bool nway_hangup(const char* phone_number);
    
    //呼叫保持 
    bool nway_hold(const char* phone_number);
    
    //解除呼叫保持
    bool nway_unhold(const char* phone_number);
    
    //呼叫a和b
    //内部号码呼叫
    //job_uuid:  uuid
    //callername: 透给b的名称
    //callernum:  a路的号码
    //calleenum:  b路的号码
    bool nway_originate(   const char* callername, const char* callernum, const char* calleenum);
    
    
    //呼叫a和b
    //外部号码呼叫
    //job_uuid:  uuid
    //callername: 透给b的名称
    //callernum:  a路的号码
    //calleenum:  b路的号码
    //a_gatewayname: a leg gateway
    //b_gatewayname: b leg gateway
    //a_effective_caller_id_num: a leg effective number
    //b_effective_caller_id_num: b leg effective number
    //a_external: a leg is call to external
    //b_external: b leg is call to external
    bool nway_originate(  const char* callername, const char* callernum, const char* calleenum, 
                        const char* a_gatewayname,const char* b_gatewayname,const char* a_effective_caller_id_num,const char* b_effective_caller_id_num ,bool a_external, bool b_external);
    
    //bridge 两个channels
    //a_leg_uuid: aleg uuid
    //b_leg_uuid: b leg uuid
    bool nway_bridge( const char* a_number, const char* b_number);
    
    //park a leg
    bool nway_park(const char* phone_number);
    
    //intercept a leg
    //拦截某一个呼叫并转给某个号码
    //number: 要转给的号码
    //uuid:   要拦截的uuid
    bool nway_intercept(const char* number);
    
    //answer a leg 
    bool nway_answer(const char* phone_number);
    
    bool nway_preanswer(const char* phone_number);
    
    //eavesdrop a uuid
    //监听一个通话
    //uuid: 要监听的uuid
    //number: 监听者号码
    //gateway_name: 如果是如用手机监听,需要指定gateway,如果长度低于2,则认为是内线
    bool nway_eavesdrop( const char* other_number, const char* number,const char* gateway_name);
    
    //耳语,即与uuid说话,但是另一个uuid的通话是听不到的
    //uuid: 要监听的uuid
    //number: 监听者号码
    //gateway_name: 如果是如用手机监听,需要指定gateway,如果长度低于2,则认为是内线
    bool nway_whisper( const char* other_number, const char* number,const char* gateway_name);
    
    //三方通话
    //uuid: 要通话的两路中任意一路的uuid
    // number: 要呼叫的号码
    //gatway_name: 要呼叫的时候gateway name
    bool nway_threeway(  const char* other_number, const char* number,const char* gateway_name );
    
    //把当前通话转给第三方
    // uuid: 另一个通话的uuid
    //number: 转出去的号码
    //gatewayname : gateway name
    bool nway_transfer(  const char* other_number, const char* number,const char* gateway_name );
    
    //播放语音文件
    //uuid
    //filename: 文件的物理位置 
    //loopplay: 循环播放
    bool nway_playback( const char* phone_number, const char* filename, bool loopplay);
    
    //终止当前操作
    //uuid
    bool nway_break( const char* phone_number);
    
    //对某个通道进行录音
    //uuid
    //path: 录音文件路径
    //flag: 录音参考:[start|stop|mask|unmask]
    //limit: 录音最大的秒数
    bool nway_record(  const char* phone_number, const char* path, const char* flag, int limit);
    
    //发送dtmf给对应的channel
    //uuid :
    //dtmf: 
    bool nway_send_dtmf(  const char* phone_number, const char* dtmf);
    
    //执行系统命令
    bool nway_system( const char* command);
    
    //////////////////////////////////////////////////////////////////////////
    //***********************************************************************
    //conference
    //////////////////////////////////////////////////////////////////////////
    //创建一个会议室
    //conference_name: 会议名称
    //number: 主席的号码
    //gateway_name:如果是外线,则需要指定gateway
    bool nway_create_conference( const char* conference_name, const char* number,const char* gateway_name);
    
    //呼叫一个号码并加入到会议室中
    bool nway_add_conference(  const char* conference_name, const char* number, const char* gateway_name, bool is_mute);
    
    //踢掉某个会议中所有的人
    bool nway_kick_all_conference(  const char* conference_name);

restful接口

token 认证:

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

获取一个系统生成的uuid:

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUxNzMyNzUsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTE2OTY3NX0.bcg0zDwqwyczAFzdgzlW3eTwIkE1crHXgr97HJd8Bo8" http://192.168.1.115:8082/api/get_uuid

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

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUxNzMyNzUsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTE2OTY3NX0.bcg0zDwqwyczAFzdgzlW3eTwIkE1crHXgr97HJd8Bo8" http://192.168.1.115:8082/api/get_phone_uuid/1002

挂断一个正通话中电话

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyMDU3OTYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTIwMjE5Nn0.WvLVi8D90LavD_BlQENMudGpMMDRF21bwJqnF90H_HM" http://192.168.1.115:8082/api/hangup/1002

hold一个通话

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjMzNzIsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI1OTc3Mn0.f0C4IudCmjZdo1XpRztVhlhPzObWgzxHuzd6ydYVFL8" http://192.168.1.115:8082/api/hold/1002

unhold一个通话

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjMzNzIsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI1OTc3Mn0.f0C4IudCmjZdo1XpRztVhlhPzObWgzxuzd6ydYVFL8" http://192.168.1.115:8082/api/unhold/1002

发起一个呼叫

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 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjQ4NjcsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2MTI2N30.FNK8c2CyAfFbHJey7irXJb7C5TtrsRqEDXQJlWZxxzU" http://192.168.1.115:8082/api/originate

按uuid桥接两个通话通道

curl -H "Content-Type: application/json" -d '{"A_uuid":"aleguuid","B_uuid":"bleguuid"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjQ4NjcsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2MTI2N30.FNK8c2CyAfFbHJey7irXJb7C5TtrsRqEDXQJlWZxxzU" http://192.168.1.115:8082/api/bridge

按号码桥接两个通话通道

curl -H "Content-Type: application/json"  -d '{"A_phone":"1002","B_phone":"1003"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjA0NTQsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI1Njg1NH0.BbixrdNhbnaR265dWsoekrhomfglJLJVTF0n1mYrwyI" http://192.168.1.115:8082/api/bridge_phone

park一个通话

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjQ4NjcsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2MTI2N30.FNK8c2CyAfFbHJey7irXJb7C5TtrsRqEDXQJlWZxxzU" http://192.168.1.115:8082/api/park/1002

抢接一个来电

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/intercept/1002

由平台应答

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/answer/1002

按号码监听

curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/eavesdrop

多方通话

curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzE0MTQsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzgxNH0.sDzTstNN3Urd2uNZf82qpg0CvaEFHeDuczOi-NTNI3U" http://192.168.1.115:8082/api/threeway

耳语

curl -H "Content-Type: application/json" -d '{"EvdedPhone":"1002","EvdPhone":"1003","EvdGateway":""}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHiOjE0NjUyNzE0MTQsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzgxNH0.sDzTstNN3Urd2uNZf82qpg0CvaEFHeDuczOi-NTNI3U" http://192.168.1.115:8082/api/whisper

preanswer

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzE3MTAsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2ODExMH0.ElXZwvGwU0VB9Mf1ZN6KRcjEbJXg9QEE3oYEpbjy3s" http://192.168.1.115:8082/api/preanswer/1002

给已answer的通道放音

curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","FilePath":"D:\nwaytest.wav","Loopplay":"true"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6kpXVCJ9.eyJleHAiOjE0NjUyNzE3MTAsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2ODExMH0.ElXZwvGwU0VB9Mf1ZN6KRcjEbJXg9QEEN3oYEpbjy3s" http://192.168.1.115:8082/api/playback

中止相关操作

curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzI3MzYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2OTEzNn0.ztfc77equjck1NkMUAM-Qe-anwv0fYSBRTTIyL88PLg" http://192.168.1.115:8082/api/break/1002

录音

curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","Filepath":"nwaytestr.wav","Flag":"start","Limit":"0"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzE3MTAsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2ODExMH0.ElXZwvGwU0VB9Mf1ZN6KRcjEbJXg9QEEN3oYEpbjy3s" http://192.168.1.115:8082/api/record

发送dtmf

curl -H "Content-Type: application/json" -d '{"PhoneNumber":"1002","Dtmf":"18621575908"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzE3MTAsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2ODExMH0.ElXZwvGwU0VB9Mf1ZN6KRcjEbJXg9QEEN3oYEpbjy3s" http://192.168.1.115:8082/api/senddtmf

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

#会议相关

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

    //  conference

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

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

     "/conference_create"

//增加一个成员并呼叫

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

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

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

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

//踢掉所有与会成员

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_kick_all/3000
    
     "/conference_kick_all/:conference"

//会议自动增益

    //param on/off
    //level a number

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

//检查录音状态

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_chkrecord/3000
    
     "/conference_chkrecord"

//禁听
//memberid是用getmemberid获得 //Flag <member_id>|all|last|non_moderator

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

//发送dtmf到会议成员 //Flag <member_id>|all|last|non_moderator

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

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

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

//进入会议时的语音 //flag on|off|none|file //Filename Flag为file时有效 curl -H "Content-Type: application/json" -d '{"ConferenceName":"3000","Flag":"3","Filename":""}' -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/conference_enter_sound

   "/conference_enter_sound"

//退出会议的语音

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

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

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

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

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

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

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

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

    curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_list/pretty
   
   "/conference_list/:flag"  

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

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_lock/3000
     
    "/conference_lock/:conference"  

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

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_unlock/3000
    
    "/conference_unlock/:conference"         
    //////////////////////////////////////////

//禁言 //Flag <member_id>|all|last|non_moderator

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

//允许发言 //Flag <member_id>|all|last|non_moderator

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

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

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

//会议暂停录音 //Flag

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

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

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

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

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

//会议录音 //Flag

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

//会议录音控制

// 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 eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/conference_recording                                                      
     "/conference_recording" 

//恢复会议录音 //Flag

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

//设置一些会议参数

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

//停止播放一些语音 //Flag [current|all] [<member_id>]

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

//切换禁言 //Flag <member_id>|all|last|non_moderator

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

//解除禁听 //Flag <member_id>|all|last|non_moderator

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

//移除会议口令

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_nopin/3000        
    
    "/conference_nopin/:conference" 

//暂停播放

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_pause_play/3000                         
     
     "/conference_pause_play/:conference"     

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

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conferences                  

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

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/conference_members/3000                      

座席分机状态相关


//查询所有分机状态

     curl  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNjkyMDMsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NTYwM30.ER1yOKxhBwVqY9IS18DOOZox15eOVUJR7bJF1mjtsfM" http://192.168.1.115:8082/api/extension_info/1002                  

//设置座席用户的分机的上线下线 up,down

     curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"up" }'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_seatstate    

//设置座席用户的分机的置闲置忙 idle,busy

     curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"idle" }'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_seatstatus    

//设置座席用户的分机的呼叫状态 ring,talking,ivr,ready

     curl -H "Content-Type: application/json" -d '{"Extension":"1002","Value":"ready"}'  -H "Authorization:Nway eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NjUyNzA4MjYsImlkIjoiYWRtaW4iLCJvcmlnX2lhdCI6MTQ2NTI2NzIyNn0.cSUqEoc5hmZ747y6LP6llmfChoOahXN0BOwi-rxDmq8" http://192.168.1.115:8082/api/extension_callstate
点赞
收藏
评论区
推荐文章
Stella981 Stella981
3年前
Linux和Windows环境下安装Nginx
Nginx的安装windows环境下安装Nginx安装Nginx的下载地址如下:http://nginx.org/en/download.html(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fngi
Stella981 Stella981
3年前
FreeSWITCH 学习笔记(一)
【1】FreeSWITCH学习笔记1、Windows安装包下载地址:http://files.freeswitch.org/windows/installer/2、源码下载地址:http://files.freeswitch.org/freeswitch1.2.10.tar.gz3、FreeSWITCH后台模式启动命令:freesw
Stella981 Stella981
3年前
Python 环境搭建
pythonbug集目录\toc\00python模块下载地址pyhton模块下载地址(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fwww.lfd.uci.edu%2F%7Egohlke%2Fpythonlibs%2F)01pythonpip
Wesley13 Wesley13
3年前
VS2017 配置ImageMagick
以下配置仅供参考,我配置完了怎样都用不了...直接下载源码使用VS进行编译。源码下载地址:http://imagemagick.org/script/installsource.phpwindows(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fimagemagick
Stella981 Stella981
3年前
Nginx 学习笔记(1)
Nginx官网:http://nginx.org/(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fnginx.org%2F)支持平台:Linux  Windows 软件下载:http://nginx.org/en/download
Stella981 Stella981
3年前
FreeSWITCH最简易教程
QQ群:FreeSWITCHKamailioOpenSIPS,293697898原文发于:http://freeswitch.net.cn/58.html(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Ffreeswitch.net.cn%2F58.html)第一步,安装wi
Stella981 Stella981
3年前
Git
 SourceTree 下载地址:http://www.sourcetreeapp.com/download/(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fwww.sourcetreeapp.com%2Fdownload%2F) GitHub 下载地址:https
Wesley13 Wesley13
3年前
GIT学习笔记一(GIT公钥私钥生成和配置)
1.准备工作GIT下载地址:http://www.gitscm.com/download/(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fwww.gitscm.com%2Fdownload%2F)GIT安装:此处省略一万字。。。。GITOSC地址:http://gi
Stella981 Stella981
3年前
CentOS 下 Redis 安装图解
下载redis.tar下载tar地址为:http://redis.io/download(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fredis.io%2Fdownload)!image(http://static.oschina.net/up
Wesley13 Wesley13
3年前
MAVEN学习使用总结
maven下载和环境搭建首先安装和配置JDK相关的环境变量下载maven下载地址:http://maven.apache.org/(https://www.oschina.net/action/GoToLink?urlhttp%3A%2F%2Fmaven.apache.org%2F)下载之后解压