Ejemplo n.º 1
0
        /// <summary>
        /// 监听呼叫
        /// </summary>
        /// <param name="masProtocol"></param>
        /// <returns></returns>
        public static RpcResponse monitorCall(MasProtocol masProtocol)
        {
            MonitorCallRequest request = masProtocol.Deserialize <MonitorCallRequest>();

            if (request == null)
            {
                return(null);
            }
            MonitorCallResponse response = BroadCastControllerProxy.broadCastControllerProxy.monitorCall(request);

            return(RpcResponse.Response <MonitorCallResponse>(response));
        }
        /// <summary>
        /// 监听呼叫
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public MonitorCallResponse monitorCall(MonitorCallRequest request)
        {
            var responseStr = HttpClientHelper.Post(Webapi + "/api/REST-API/monitorCall.do?accessToken=" + Token, JSONHelper.ToJSONString(request));

            return(JSONHelper.ParseJSONString <MonitorCallResponse>(responseStr));
        }