XCC API

会议

会议使用 XSwitch 原生会议实现。必须将会议锁定到同一台 XSwitch。


获取运行中的会议详情

  • commandconferenceInfo
  • data:数据
    • conferenceName:必填,会议室名称
    • showMembers:可选,布尔值,是否显示会议室成员,默认为否。

示例:

{
	"jsonrpc":"2.0",
	"id":"conference-request-1",
	"method":"XNode.NativeJSAPI",
	"params":{
		"ctrl_uuid":"54d0d141-a748-406a-8a63-992f195789cc",
		"data": {
			"command":"conferenceInfo",
			"data":{
				"conferenceName":"3000",
				"showMembers":true
			}
		}
	}
}

{
	"jsonrpc":	"2.0",
	"id":	"conference",
	"result":	{
		"code":	200,
		"message":	"OK",
		"node_uuid":	"xcc-node-1",
		"data":	{
			"conference":	{
				"conference_name":	"3000",
				"member_count":	1,
				"ghost_count":	0,
				"rate":	8000,
				"run_time":	381,
				"conference_uuid":	"41d33e47-881e-483f-bef9-8174a8516f2e",
				"canvas_count":	0,
				"max_bw_in":	0,
				"force_bw_in":	0,
				"video_floor_packets":	0,
				"locked":	false,
				"destruct":	false,
				"wait_mod":	false,
				"audio_always":	false,
				"running":	true,
				"answered":	true,
				"enforce_min":	true,
				"bridge_to":	false,
				"dynamic":	true,
				"exit_sound":	true,
				"enter_sound":	true,
				"recording":	false,
				"video_bridge":	false,
				"video_floor_only":	false,
				"video_rfc4579":	false,
				"variables":	{
				},
				"members":	[{
						"type":	"caller",
						"id":	2,
						"flags":	{
							"can_hear":	true,
							"can_see":	true,
							"can_speak":	true,
							"hold":	false,
							"mute_detect":	false,
							"talking":	true,
							"has_video":	false,
							"video_bridge":	false,
							"has_floor":	true,
							"is_moderator":	false,
							"end_conference":	false
						},
						"uuid":	"a3c2df89-b6c9-4fb3-a0a4-c1934b21f5a9",
						"caller_id_name":	"Seven Du",
						"caller_id_number":	"1001",
						"join_time":	381,
						"last_talking":	0,
						"energy":	100,
						"volume_in":	0,
						"volume_out":	0,
						"output-volume":	0,
						"input-volume":	0
					}]
			}
		}
	}
}

执行会议控制

可以使用NativeAPI控制会议,如:

{
  "jsonrpc": "2.0",
  "id": "...",
  "method": "XNode.NativeAPI",
  "params": {
    "ctrl_uuid": "ctrl_uuid ... ",
    "cmd": "conference",
    "args": "list"
  }
}

常用的命令有:(以下假定会议名称为3000

  • list:列出该节点上所有会议
  • json_list:同上,返回 JSON 字符串
  • xml_list:同上,返回 XML 字符串
  • 3000 list:仅列出名称为 3000 的会议
  • 3000 mute 1:对member_id1的成员静音
  • 3000 unmute 1:对member_id1的成员取消静音
  • 3000 mute all:将所有人静音
  • 3000 mute uuid=5bb13395-acc8-4dbc-9e90-2c6de0a27f98:将 Channel UUID 对应的成员静音
  • 更多命令可以在命令行上输入conference查看帮助

监听会议事件

可以监听原生的CUSTOM conference::maintenance事件。

XSwitch集群