Ejemplo n.º 1
0
        private JObject CompleteTransfer(HttpContext context)
        {
            JObject responseJObj          = new JObject();
            JObject checkCompleteTransfer = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Conference conferenceObject = new Press3.BusinessRulesLayer.Conference(MyConfig.MyConnectionString);
                checkCompleteTransfer = conferenceObject.CheckCompleteTransfer(context);
                if (Convert.ToBoolean(Convert.ToString(checkCompleteTransfer.SelectToken("Success"))) == true)
                {
                    responseJObj = conferenceObject.CompleteTransfer(context);
                    Logger.Debug("Response Object in Conference[CompleteTransfer] Is:" + responseJObj);
                }
                else
                {
                    return(checkCompleteTransfer);
                }


                // responseJObj = conferenceObject.CompleteTransfer(context);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in Conference[CompleteTransfer]" + ex.ToString());
            }
            return(responseJObj);
        }
Ejemplo n.º 2
0
        private JObject HoldUnHoldCaller(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Conference conferenceObject = new Press3.BusinessRulesLayer.Conference(MyConfig.MyConnectionString);
                responseJObj = conferenceObject.ChangeConferenceRoom(context);
                Logger.Debug("Response Object in Conference[HoldUnHoldCaller] Is: " + responseJObj);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in conference[HoldUnHoldCaller]" + ex.ToString());
            }
            return(responseJObj);
        }
Ejemplo n.º 3
0
        private JObject EndConference(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Conference callsObject = new Press3.BusinessRulesLayer.Conference(MyConfig.MyConnectionString);
                responseJObj = callsObject.EndConference(agentId, accountId, Convert.ToInt32(context.Request["CallId"]), 2);
                Logger.Debug("Response Object in Conference[EndConference] With Mode:2 CallId:" + Convert.ToInt32(context.Request["CallId"]) + ",Is:" + responseJObj);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in conference[EndConference]" + ex.ToString());
            }
            return(responseJObj);
        }
Ejemplo n.º 4
0
        private JObject StartConference(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Conference callsObject = new Press3.BusinessRulesLayer.Conference(MyConfig.MyConnectionString);
                responseJObj = callsObject.StartConference(Convert.ToInt32(context.Request["Mode"]), agentId, accountId, Convert.ToInt32(context.Request["CallId"]), Convert.ToInt32(context.Request["ToAgentId"]));
                Logger.Debug("Response Object in Conference[StartConference] with Mode:" + Convert.ToInt32(context.Request["Mode"]) + ",AgentID:" + agentId + ",AccountId:" + accountId + ",CallID:" + Convert.ToInt32(context.Request["CallId"]) + ",ToAgentId:" + Convert.ToInt32(context.Request["ToAgentId"]) + "-->Is:" + responseJObj);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in conference[StartConference]" + ex.ToString());
            }
            return(responseJObj);
        }
Ejemplo n.º 5
0
        private JObject HangUp(HttpContext context)
        {
            JObject responseJObj = new JObject();

            try
            {
                Press3.BusinessRulesLayer.Conference callsObject = new Press3.BusinessRulesLayer.Conference(MyConfig.MyConnectionString);
                responseJObj = callsObject.HangUp(context);
                Logger.Debug("Response Object in Conference[HangUp]" + responseJObj);
            }
            catch (Exception ex)
            {
                Logger.Error("Exception in conference[HangUp]" + ex.ToString());
            }
            return(responseJObj);
        }