/*
 * @Author: zc
 * @description 话务管理 - 分机管理
 */
/**
 * @description 分机列表
 * @param {object} params
 * @return {*}
 */
import request from '@/utils/request';
/**
 * @description 强制下线
 * @param {object} params
 * @params hasListen 是否包含监听分机 true排除 false包含
 * @return {*}
 */
export const extensionList = (params?: object) => {
	return request({
		url: `/api/v1/IPPbx/query-telstate`,
		method: 'get',
		params,
	});
};
/**
 * @description 强制下线
 * @param {object} params
 * @return {*}
 */
export const forceLogout = (params?: object) => {
	return request({
		url: `/api/v1/IPPbx/off-duty-manage`,
		method: 'get',
		params,
	});
}
/**
 * @description 获取分机列表
 * @param {object} params
 * @return {*}
 */
export const getExtensionList = (params?: object) => {
	return request({
		url: `/api/v1/Call/tels-paged`,
		method: 'get',
		params,
	});
}
/**
 * @description 强制下线 自贡
 * @param {string} telNo
 * @return {*}
 */
export const forceLogoutSelf = (telNo?: string) => {
	return request({
		url: `/api/v1/Call/signout/${telNo}`,
		method: 'post',
	});
}