コード例 #1
0
        public void hostActiveAgentService(object lstparam)
        {
            try
            {
                List <object> lstTempObj = (List <object>)lstparam;
                strUri = lstTempObj[0].ToString();

                NetPeerClient npcActiveAgent = new NetPeerClient();
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcJoin           += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcJoin(ctlrptActiveAgent_EntsvcJoin);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcGetAgentInfo   += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcGetAgentInfo(ctlrptActiveAgent_EntsvcGetAgentInfo);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcSetAgentInfo   += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcSetAgentInfo(ctlrptActiveAgent_EntsvcSetAgentInfo);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcSetAgentStatus += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcSetAgentStatus(ctlrptActiveAgent_EntsvcSetAgentStatus);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcBargeRequest   += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcBargeRequest(ctlrptActiveAgent_EntsvcBargeRequest);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcBargeReply     += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcBargeReply(ctlrptActiveAgent_EntsvcBargeReply);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcHangUp         += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcHangUp(ctlrptActiveAgent_EntsvcHangUp);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcUnJoin         += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcUnJoin(ctlrptActiveAgent_EntsvcUnJoin);

                channelNetTcp = (INetP2PBootStrapActiveAgentReportChannel)npcActiveAgent.OpenClient <INetP2PBootStrapActiveAgentReportChannel>(strUri, lstTempObj[1].ToString(), ref objNetTcpActiveAgent);
                channelNetTcp.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, VMuktiAPI.VMuktiInfo.CurrentPeer.CampaignID.ToString());

                channelNetTcp.svcGetAgentInfo(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "hostActiveAgentService()", "ctlrptActiveAgent.xaml.cs");
                if (ex.InnerException != null && ex.InnerException.Message != "")
                {
                    VMuktiAPI.VMuktiHelper.ExceptionHandler(ex.InnerException, "hostActiveAgentService()--Inner", "ctlrptActiveAgent.xaml.cs");
                }
            }
        }
コード例 #2
0
        public void ClosePod()
        {
            try
            {
                if (channelNetTcp != null)
                {
                    channelNetTcp.Close();
                    channelNetTcp.Dispose();
                    channelNetTcp = null;
                }

                LocalSQLConn.Close();
                LocalSQLConn.Dispose();
                LocalSQLConn = null;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePod()", "ctlrptActiveAgent.xaml.cs");
            }
        }
コード例 #3
0
        public void hostActiveAgentService(object lstparam)
        {
            try
            {
                List<object> lstTempObj = (List<object>)lstparam;
                strUriforActiveagent = lstTempObj[0].ToString();

                NetPeerClient npcActiveAgent = new NetPeerClient();
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcJoin += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcJoin(ctlrptActiveAgent_EntsvcJoin);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcGetAgentInfo += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcGetAgentInfo(ctlrptActiveAgent_EntsvcGetAgentInfo);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcSetAgentInfo += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcSetAgentInfo(ctlrptActiveAgent_EntsvcSetAgentInfo);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcSetAgentStatus += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcSetAgentStatus(ctlDialer_EntsvcSetAgentStatus);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcBargeRequest += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcBargeRequest(ctlDialer_EntsvcBargeRequest);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcBargeReply += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcBargeReply(ctlDialer_EntsvcBargeReply);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcHangUp += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcHangUp(ctlDialer_EntsvcHangUp);
                ((NetP2PBootStrapActiveAgentReportDelegates)objNetTcpActiveAgent).EntsvcUnJoin += new NetP2PBootStrapActiveAgentReportDelegates.DelsvcUnJoin(ctlrptActiveAgent_EntsvcUnJoin);

                channelNetTcp = (INetP2PBootStrapActiveAgentReportChannel)npcActiveAgent.OpenClient<INetP2PBootStrapActiveAgentReportChannel>(strUriforActiveagent, lstTempObj[1].ToString(), ref objNetTcpActiveAgent);
                channelNetTcp.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, VMuktiAPI.VMuktiInfo.CurrentPeer.CampaignID.ToString());

            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "hostActiveAgentService()", "ctlDialer.xaml.cs");
            }
        }
コード例 #4
0
 public void ClosePod()
 {
     try
     {
         VMuktiHelper.UnRegisterEvent("RegisterAgent");
         VMuktiHelper.UnRegisterEvent("Dial");
         VMuktiHelper.UnRegisterEvent("HangUp");
         VMuktiHelper.UnRegisterEvent("StartManualDialing");
         VMuktiHelper.UnRegisterEvent("SetSoftPhoneEnable");
         VMuktiHelper.UnRegisterEvent("CallHangUPFromRender");
     
         if (channelNetTcp != null)
         {
             channelNetTcp.svcUnJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
             channelNetTcp.Close();
             channelNetTcp = null;
         }
         if (ClientNetP2PRTCVistaChannel != null)
         {
             if (ProcStartAudioVistaExe != null)
             {
                 ProcStartAudioVistaExe.Kill();
                 ProcStartAudioVistaExe.CloseMainWindow();
                 ProcStartAudioVistaExe.Close();
                 ProcStartAudioVistaExe.Dispose();
                 ProcStartAudioVistaExe = null;
             }
             ClientNetP2PRTCVistaChannel.svcUnJoin();
             npcRTCVistaClient.CloseClient<INetTcpRTCVistaServiceChannel>();
         }
         if (ClientNetP2PRTCVistaChannel != null)
         {
             ClientNetP2PRTCVistaChannel.Close();
             ClientNetP2PRTCVistaChannel.Dispose();
             ClientNetP2PRTCVistaChannel = null;
         }
         if (!blIsVista)
         {
             try
             {
                 RClient.StopSniffing();
             }
             catch { }
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePod()", "ctlDialer.xaml.cs");
     }
 }
コード例 #5
0
        public void ClosePod()
        {
            try
            {
                VMuktiHelper.UnRegisterEvent("RegisterAgent");
                VMuktiHelper.UnRegisterEvent("Dial");
                VMuktiHelper.UnRegisterEvent("HangUp");
                VMuktiHelper.UnRegisterEvent("TransferCall");
                VMuktiHelper.UnRegisterEvent("BargeCall");
                VMuktiHelper.UnRegisterEvent("HijeckCall");
                VMuktiHelper.UnRegisterEvent("UnMuteCall");
                VMuktiHelper.UnRegisterEvent("StartManualDialing");
                VMuktiHelper.UnRegisterEvent("SetSoftPhoneEnable");
                VMuktiHelper.UnRegisterEvent("SetIncomingNumber");
                VMuktiHelper.UnRegisterEvent("HoldCall");

                channelNetTcpActiveAgent.svcUnJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);

                if (channelNetTcpActiveAgent != null)
                {
                    channelNetTcpActiveAgent.Close();
                    channelNetTcpActiveAgent.Dispose();
                    channelNetTcpActiveAgent = null;
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePod()", "ctlDialer.xaml.cs");
            }
        }
コード例 #6
0
        public void ClosePod()
        {
            try
            {
                if (channelNetTcp != null)
                {
                    channelNetTcp.Close();
                    channelNetTcp.Dispose();
                    channelNetTcp = null;
                }

                LocalSQLConn.Close();
                LocalSQLConn.Dispose();
                LocalSQLConn = null;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePod()", "ctlrptActiveAgent.xaml.cs");
            }
        }