Exemple #1
0
        private void InitializePSDKProtocolAndAppBlocks()
        {
            MessageBox.Show("sip");
            try
            {
                #region ADDP settings
                PropertyConfiguration config = new PropertyConfiguration();
                config.UseAddp           = true;
                config.AddpServerTimeout = 30;
                config.AddpClientTimeout = 60;
                //config.AddpTrace = "both";
                config.AddpTraceMode = AddpTraceMode.Both;
                #endregion

                Endpoint endpoint = new Endpoint(HOST, PORT, config);
                //Endpoint backupEndpoint = new Endpoint(BACKUP_HOST, BACKUP_PORT, config);

                protocol            = new TServerProtocol(endpoint);
                protocol.ClientName = CLIENT_NAME;
                protocol.BeginOpen();

                Register();
                //Connect();
                //logging();
                //AnswerCall();

                #region Setup Warmstandby
                // WarmStandbyConfiguration warmStandbyConfig = new WarmStandbyConfiguration(endpoint, backupEndpoint);
                //warmStandbyConfig.Timeout = 5000;
                //warmStandbyConfig.Attempts = 2;

                //warmStandbyService = new WarmStandbyService(protocol);
                // warmStandbyService.ApplyConfiguration(warmStandbyConfig);
                //warmStandbyService.Start();
                #endregion

                //protocol.Opened += new EventHandler(OnProtocolOpened);
                //protocol.Closed += new EventHandler(OnProtocolClosed);

                protocol.Received += new EventHandler(OnMessageReceived);
                protocol.Error    += new EventHandler(OnProtocolError);
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.ToString());
            }
        }
 public void SubscribeSFDCPopup(ISFDCListener subscirber, IAgentDetails agentDetails, IConfService confService, bool sendLogsToSubscriber, TServerProtocol tServerProtocol, UniversalContactServerProtocol ucsProtocol)
 {
     if (subscirber != null && agentDetails != null && confService != null && sendLogsToSubscriber)
     {
         this._logger = Log.GenInstance().CreateLogger(subscirber, sendLogsToSubscriber);
         InitializeSFDCIntegration(subscirber, agentDetails, confService);
         _logger.Info("*****************************************************************");
         this._logger.Info("SFDCController: Assembly Name    " + Assembly.GetExecutingAssembly().GetName().Name);
         this._logger.Info("SFDCController: Assembly Version " + Assembly.GetExecutingAssembly().GetName().Version);
         _logger.Info("*****************************************************************");
         _logger.Info("Subscribe : SFDCController Subscription Success");
     }
     else
     {
         throw new Exception("SFDC Popup Subscription Failed because Supplied Parameter(s) are null");
     }
 }