文档章节

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

上海李浩
 上海李浩
发布于 2016/09/24 22:42
字数 2736
阅读 923
收藏 1

#更多参考: 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 <string>]

    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 <file-path>|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 <file-path>

	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 <file-path>

	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=<volume>,full-screen=true,png_ms=100}]<file-path> [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 <file-path>

	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"  

//会议录音控制

// <confname> recording start <file-path>

// <confname> recording check

// <confname> recording stop <file-path>|all

// <confname> recording pause <file-path>

// <confname> recording resume <file-path>

	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 <file-path>

	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

本文转载自:http://freeswitch.net.cn/86.html

上海李浩

上海李浩

粉丝 5
博文 16
码字总数 12703
作品 1
上海
后端工程师
私信 提问
freeswitch实战经验1:服务器向成员主动发起会议邀请

接触过freeswitch的童鞋们都知道,freeswitch自动会议室功能,比如大家都拨3000这个号码,就可以进行电话会议功能了。但是,现在有这么一个场景:现在某个主持人想开电话会议,想直接由frees...

BLUE-魏晓峰
2013/06/17
0
0
FreeSWITCH 与 Asterisk(译)

Anthony Minssale/文 Seven/译 VoIP通信,与传统的电话技术相比,不仅仅在于绝对的资费优势,更重要的是很容易地通过开发相应的软件,使其与企业的业务逻辑紧密集成。Asterisk作为开源VoIP软...

mickelfeng
2013/03/06
0
0
FreeSWITCH 1.2.14 发布,电话软交换机

FreeSWITCH 1.2.14 发布,这是一个维护版本,修复了很多 bug。 下载地址:http://files.freeswitch.org/freeswitch-1.2.14.tar.bz2 FreeSWITCH 是一个电话的软交换解决方案,包括一个软电话和...

oschina
2013/10/17
2.3K
0
freeswitch websocket webrtc

Install the Certificate into FreeSWITCH Replace sipjs.com with the domain name that you used to generate the certificate. cd /etc/letsencrypt/live/sipjs.com echo '' >> /usr/loca......

明月惊鹊
2018/11/16
0
0
OSC第52期高手问答 ----- 解读FreeSWITCH

OSCHINA 本期高手问答(7月28日-8月3日)我们请来了 @SevenDu (杜金房)为大家解答关于FreeSWITCH方面的问题。 @SevenDu 杜金房:FreeSWITCH中文站(www.freeswitch.org.cn)创始人,FreeSWI...

阿娇OSC
2014/07/28
10.2K
69

没有更多内容

加载失败,请刷新页面

加载更多

C# 视频多人脸识别的实现过程

整个项目是用虹软技术完成开发 上一篇内容的调整,提交到git了,https://github.com/catzhou2002/ArcFaceDemo 基本思路如下: 一、识别线程 1.获取当前图片 2.识别当前图片的人脸位置,并将结...

是哇兴哥棒棒哒
3分钟前
0
0
Spring Cloud Eureka 你还在让它裸奔吗??

前些天栈长在微信公众号Java技术栈分享了 Spring Cloud Eureka 最新版 实现注册中心的实战教程:Spring Cloud Eureka 注册中心集群搭建,Greenwich 最新版!,成功进入 Eureka 控制台页面。 ...

Java技术栈
19分钟前
1
0
linux gyp ERR! stack Error: EACCES: permission denied, mkdir ‘xxx’

在使用linux npm install的出现这个错误了,百度了下,没有权限加个参数即可 npm install --unsafe-perm

朝如青丝暮成雪
20分钟前
0
0
使用kubeadm 搭建K8s集群

1. 参考官网 https://kubernetes.io/docs/setup/independent/install-kubeadm/

whhbb
48分钟前
2
0
Dubbo 3.0 !提升不止一点点!

Dubbo 自 2011 年 10 月 27 日开源后,已被许多非阿里系的公司使用,其中既有当当网、网易考拉等互联网公司,也不乏中国人寿、青岛海尔等大型传统企业。 自去年 12 月开始,Dubbo 3.0 便已正...

编程SHA
49分钟前
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部