コード例 #1
0
ファイル: RbrServer.cs プロジェクト: cuongdodinh/timok.rbr
        public RbrServer(string pFilePath)
        {
            rbrProcessFilePath = pFilePath;
            currentNode        = new CurrentNode();

            TimokLogger.Instance.LogRbr(LogSeverity.Status, "===============================================================================");
            TimokLogger.Instance.LogRbr(LogSeverity.Status, RBR_SERVER_CTOR_LABEL, string.Format("Version: {0}", Assembly.GetExecutingAssembly().GetName().Version));
            TimokLogger.Instance.LogRbr(LogSeverity.Status, RBR_SERVER_CTOR_LABEL, string.Format("LogSeverity Level: {0}", TimokLogger.Instance.LogSeverity));

            //-- add and set email logger
            var _folder   = Configuration.Instance.Folders.EmailFolder;
            var _server   = string.Format("{0}@{1}", Configuration.Instance.Main.HostName, Configuration.Instance.Main.HostIP);
            var _s        = Configuration.Instance.Email.SupportEmailServer;
            var _from     = Configuration.Instance.Email.SupportFrom;
            var _password = Configuration.Instance.Email.SupportEmailPassword;
            var _to       = Configuration.Instance.Email.SupportTo;

            //TODO: srdjan
            //TimokLogger.Instance.AddEmailLogger(_folder, _server, _s, _from, _password, _to, Email.SetForSending);

            try {
                houskeeper     = new Houskeeper();
                callStatistics = new CallStatistics();

                var _udpCommandFactory = new UdpCommandFactory(callStatistics);
                udpServer = new UdpServer(Configuration.Instance.Main.UdpServerIp, Configuration.Instance.Main.UdpServerRbrPort, _udpCommandFactory, TimokLogger.Instance.LogRbr);

                TimokLogger.Instance.LogRbr(LogSeverity.Status, "===============================================================================");
            }
            catch (Exception _ex) {
                TimokLogger.Instance.LogRbr(LogSeverity.Critical, RBR_SERVER_CTOR_LABEL, string.Format("Exception:\r\n{0}", _ex));
                throw;
            }
        }
コード例 #2
0
        protected ScriptBase(ScriptInfo pScript, ISession pSession, CallStatistics pCallStatistics)
        {
            Script         = pScript;
            session        = pSession;
            callStatistics = pCallStatistics;

            account         = new Account();
            promptManager   = new PromptManager(Script);
            callState       = CallState.Initializing;
            cdr             = new CallRecord(session);
            outboundAttempt = 1;
        }
コード例 #3
0
 public SessionDispatcher(CallStatistics pCallStatistics)
 {
     callStatistics = pCallStatistics;
 }
コード例 #4
0
 public SessionHandlerRetail(CallStatistics pCallStatistics) : base(pCallStatistics)
 {
 }
コード例 #5
0
 public LDCallScript(ScriptInfo pScript, ISession pSession, CallStatistics pCallStatistics) : base(pScript, pSession, pCallStatistics)
 {
     Script.AuthenticationType = ScriptAuthenticationType.ANI;
 }
コード例 #6
0
 protected SessionHandlerBase(CallStatistics pCallStatistics)
 {
     callStatistics = pCallStatistics;
     routingService = new RoutingService();
 }
コード例 #7
0
 public SessionHandlerWholesale(CallStatistics pCallStatistics) : base(pCallStatistics)
 {
 }
コード例 #8
0
 public RbrDispatcher(CallStatistics pCallStatistics)
 {
     callStatistics    = pCallStatistics;
     sequenceGenerator = new SequenceGenerator(Configuration.Instance.Folders.RbrSequenceFilePath);
 }
コード例 #9
0
 public PhoneCardCallScript(ScriptInfo pScript, ISession pSession, CallStatistics pCallStatistics) : base(pScript, pSession, pCallStatistics)
 {
     Script.AuthenticationType = ScriptAuthenticationType.Card;
     Script.PinLength         += 3;      //NOTE: this is so that we pickup '#' terminator too, since standard prompt directs user to pres '#' after the PinNumber
 }
コード例 #10
0
 public UdpCommandFactory(CallStatistics pCallStatistics)
 {
     callStatistics = pCallStatistics;
     dispatcher     = new RbrDispatcher(callStatistics);
     APIName        = RbrApi.Name;
 }
コード例 #11
0
 public CallRoutingCallScript(ScriptInfo pScript, ISession pSession, CallStatistics pCallStatistics) : base(pScript, pSession, pCallStatistics)
 {
     Script.AuthenticationType = ScriptAuthenticationType.IP;
 }