Пример #1
0
        public string InBoundCallBack(string sConnString, string conferenceUUID, int conferenceSize, string callUUID, string fromNumber, string toNumber, string eventName, string callStatus, string requestUUID, int grpCallMemberId, string action, string digits, Int64 startTime, Int64 endTime, string endReason)
        {
            Logger.TraceLog("end reason bll " + endReason);
            Logger.TraceLog(conferenceUUID + "-conferenceUUID " + callUUID + "fromNumber" + fromNumber + "toNumber" + toNumber + "event" + eventName + "callStatus" + callStatus + "digits" + digits + "requestUUID" + requestUUID + "grpCallMemberId" + grpCallMemberId);
            DataSet responseDataSet = new DataSet();
            GrpInboundCallEntity GrpInboundCallEntityObj = new GrpInboundCallEntity(sConnString);

            responseDataSet = GrpInboundCallEntityObj.InBoundCallBack(conferenceUUID, conferenceSize, callUUID, fromNumber, toNumber, eventName, callStatus, requestUUID, grpCallMemberId, action, digits, startTime, endTime, endReason);
            PublishMessageToWebSocket(responseDataSet, fromNumber, toNumber, callStatus, action);
            if (responseDataSet.Tables.Count > 1)
            {
                JObject privateResponse = new JObject();
                if (responseDataSet.Tables[1].Rows.Count > 0)
                {
                    Logger.TraceLog("Private Membs" + responseDataSet.Tables[1].Rows.Count);
                    V_1_4.GroupCall_V140 grpCallObj = new V_1_4.GroupCall_V140();
                    for (int row = 0; row < responseDataSet.Tables[1].Rows.Count; row++)
                    {
                        Logger.TraceLog("Inbound Private Mems Count" + responseDataSet.Tables[1].Rows.Count);
                        privateResponse = grpCallObj.PrivatePublicApi(Convert.ToString(responseDataSet.Tables[1].Rows[row]["Conferenceroom"]), Convert.ToString(responseDataSet.Tables[1].Rows[row]["member_id"]), false, Convert.ToString(responseDataSet.Tables[1].Rows[row]["HttpUrl"]), Convert.ToBoolean(responseDataSet.Tables[1].Rows[row]["Mute"]));
                    }
                }
            }
            return("");
        }
Пример #2
0
        private DataSet GetInterConnectMembersData(out int DurationLimit)
        {
            int     timeLimit = 0;
            DataSet interConnectMembersData = new DataSet();

            try
            {
                GrpInboundCallEntity GrpInboundCallEntityObj = new GrpInboundCallEntity(this.ConnString);
                interConnectMembersData = GrpInboundCallEntityObj.GetInterConnectMembersDataEntity(this.BatchId, this.ConferenceId, this.IsAll, this.MobileNumber, this.NodeSlno, this.NodeGatewayId, out timeLimit);
                if (interConnectMembersData.Tables.Count > 0)
                {
                    this.ConferenceRoom = interConnectMembersData.Tables[1].Rows[0]["conf_room"].ToString();
                    this.ConferenceId   = Convert.ToInt32(interConnectMembersData.Tables[1].Rows[0]["id"]);
                    this.WelcomeClip    = interConnectMembersData.Tables[1].Rows[0]["welcome_clip"].ToString();
                    this.WaitClip       = interConnectMembersData.Tables[1].Rows[0]["wait_clip"].ToString();
                    //this.IsMute = Convert.ToBoolean(interConnectMembersData.Tables[2].Rows[0]["mute"]);
                    this.IsMute = false;
                    //if (interConnectMembersData.Tables[2].Rows[0]["end_conf_onexit"] != System.DBNull.Value)
                    //{
                    //    this.EndConferenceOnExit = Convert.ToBoolean(interConnectMembersData.Tables[2].Rows[0]["end_conf_onexit"]);
                    //}
                    //else
                    //{
                    //    this.EndConferenceOnExit = false;
                    //}
                }
            }
            catch (Exception ex)
            {
                Logger.ExceptionLog(" grpInboundCallBusiness GetInterConnectMembersData() :  " + ex.ToString());
                throw ex;
            }
            DurationLimit = timeLimit;
            return(interConnectMembersData);
        }
Пример #3
0
        private string InBoundCallDial(Int64 conferenceId, string fromNumber, string toNumber, string callUUID, int mode)
        {
            Logger.TraceLog("Insert data started");
            Logger.TraceLog("Insert data started fromNumber " + fromNumber);
            DataSet InBoundCallData = new DataSet();
            string  responseXml     = "";
            Int16   retVal          = 0;
            long    durationLimit   = 0;
            string  retMsg          = "";
            Boolean isModetator     = false;

            GT.DataAccessLayer.GrpInboundCallEntity inBoundObj = new GrpInboundCallEntity(this.ConnString);
            InBoundCallData = inBoundObj.ConnectInBoundToGroupCall(conferenceId, fromNumber, toNumber, callUUID, mode, out retVal, out retMsg, out durationLimit);
            Logger.TraceLog("retval " + retVal.ToString());

            if (retVal == 1)
            {
                this.ConferenceRoom = InBoundCallData.Tables[0].Rows[0]["ConfRoom"].ToString();
                isModetator         = Convert.ToBoolean(InBoundCallData.Tables[0].Rows[0]["Ismoderator"]);
                if (isModetator == false)
                {
                    if (Convert.ToInt16(InBoundCallData.Tables[0].Rows[0]["OnCallInProgressCount"]) == 1 || Convert.ToInt16(InBoundCallData.Tables[0].Rows[0]["IsModeratorPresent"]) == 0)
                    {
                        this.WaitClip = ConfigurationManager.AppSettings["GrpTalkVoiceClipsUrl"].ToString() + "WaitClipForHost.mp3";
                    }
                    if (Convert.ToBoolean(InBoundCallData.Tables[0].Rows[0]["Ismute"]) == true)
                    {
                        responseXml = "<Response><Play>" + this.WelcomeClip + "</Play><Conference callbackUrl='" + this.PostJoinCallBackUrl + "'  muted='true' timeLimitForce='" + durationLimit + "' timeLimit='" + durationLimit + "'  digitsMatch='0'  waitSound ='" + this.WaitClip + "'  >" + this.ConferenceRoom + "</Conference></Response>";
                    }
                    else
                    {
                        responseXml = "<Response><Play>" + this.WelcomeClip + "</Play><Conference callbackUrl='" + this.PostJoinCallBackUrl + "'  muted='false' timeLimitForce='" + durationLimit + "' timeLimit='" + durationLimit + "' digitsMatch='0'  waitSound ='" + this.WaitClip + "'  >" + this.ConferenceRoom + "</Conference></Response>";
                    }
                }
                else if (isModetator == true)
                {
                    if (Convert.ToInt16(InBoundCallData.Tables[0].Rows[0]["OnCallInProgressCount"]) == 0)
                    {
                        this.WaitClip = ConfigurationManager.AppSettings["GrpTalkVoiceClipsUrl"].ToString() + "WaitClipForMembers.mp3";
                    }
                    //responseXml = "<Response><Play>" + this.WelcomeClip + "</Play><Conference callbackUrl='" + this.PostJoinCallBackUrl + "' endConferenceOnExit='true' digitsMatch='0'  waitSound ='" + this.WaitClip + "'  >" + this.ConferenceRoom + "</Conference></Response>";
                    responseXml = "<Response><Play>" + this.WelcomeClip + "</Play><Conference callbackUrl='" + this.PostJoinCallBackUrl + "' timeLimitForce='" + durationLimit + "' timeLimit='" + durationLimit + "'  digitsMatch='0'  waitSound ='" + this.WaitClip + "'  >" + this.ConferenceRoom + "</Conference></Response>";
                }
                else
                {
                    responseXml = "<Response><Play>" + this.WelcomeClip + "</Play><Conference callbackUrl='" + this.PostJoinCallBackUrl + "' digitsMatch='0'  waitSound ='" + this.WaitClip + "'  >" + this.ConferenceRoom + "</Conference></Response>";
                }
            }
            else
            {
                responseXml = "<Response><Speak>No Group Call Found</Speak></Response>";
            }
            return(responseXml);
        }
Пример #4
0
        private DataSet GetInterConnectCallssData(int slNo)
        {
            DataSet interConnectCallsData = new DataSet();

            try
            {
                GrpInboundCallEntity GrpInboundCallEntityObj = new GrpInboundCallEntity(this.ConnString);
                interConnectCallsData = GrpInboundCallEntityObj.GetInterConnectCallssDataEntity(slNo);
                return(interConnectCallsData);
            }
            catch (Exception ex)
            {
                Logger.ExceptionLog(" grpInboundCallBusiness GetInterConnectCallssData() :  " + ex.ToString());
                return(interConnectCallsData);
            }
        }
Пример #5
0
        private int CheckIsInterConnectCall(string fromNumber, string toNumber)
        {
            int gatewayId = 0;

            try
            {
                GrpInboundCallEntity GrpInboundCallEntityObj = new GrpInboundCallEntity(this.ConnString);
                gatewayId = GrpInboundCallEntityObj.CheckIsInterConnectCallEntity(this.FromNumber, this.ToNumber);
                return(gatewayId);
            }
            catch (Exception ex)
            {
                Logger.ExceptionLog(" grpInboundCallBusiness CheckIsInterConnectCall() :  " + ex.ToString());
                return(0);
            }
        }
Пример #6
0
        private DataSet NewInboundCall(out string dbMessage)
        {
            Logger.TraceLog("NewInboundCall BLL");
            DataSet newInboundCall = null;
            string  retMessege;

            try
            {
                GrpInboundCallEntity GrpInboundCallEntityObj = new GrpInboundCallEntity(this.ConnString);
                newInboundCall = GrpInboundCallEntityObj.NewInboundCallEntity(this.Event, this.ToNumber, this.FromNumber, this.CallUuid, this.CallStatus, this.Digits, out retMessege);
                dbMessage      = retMessege;
            }
            catch (Exception ex)
            {
                Logger.ExceptionLog(" grpInboundCallBusiness NewInboundCall() :  " + ex.ToString());
                dbMessage = "exception";
            }
            return(newInboundCall);
        }