void RegAudiop2pClient(string P2PUri) { try { NetPeerClient npcDummyAudio = new NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(P2PAudioClient_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(P2PAudioClient_EntsvcP2PUnJoin); channelNettcpAudio = (INetTcpAudioChannel)npcDummyAudio.OpenClient<INetTcpAudioChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { channelNettcpAudio.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "RegAudiop2pClient()", "Audio\\P2PAudioClient.cs"); } }
void RegAudiop2pClient(string P2PUri) { try { NetPeerClient npcDummyAudio = new NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(P2PAudioClient_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(P2PAudioClient_EntsvcP2PUnJoin); channelNettcpAudio = (INetTcpAudioChannel)npcDummyAudio.OpenClient <INetTcpAudioChannel>(P2PUri, P2PUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { channelNettcpAudio.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "RegAudiop2pClient()", "Audio\\P2PAudioClient.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(AudioDummy_EntsvcP2PGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(AudioDummy_EntsvcP2PSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient <INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "AudioDummy.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient <INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--AudioDummy.cs--:--RegNetP2PClient()--"); ClsException.LogError(ex); ClsException.WriteToErrorLogFile(ex); throw ex; } }
private void Dispose(bool disposing) { try { objNetTcpAudio = null; channelNettcpAudio = null; } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "Dispose()", "Audio\\P2PAudioClient.cs"); } }
private void Dispose(bool disposing) { try { lstMessage = null; UserName = null;; myMeshId = null;; objHttpAudio = null; objNetTcpAudio = null; HttpAudioServer = null; NetTcpAudioChannel = null;; HttpThread = null; NetTcpThread = null; VMuktiAPI.ClsException.WriteToLogFile("Audio Dummy is Disposed"); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "Dispose()", "AudioDummy.cs"); } }
private void Dispose(bool disposing) { //if (!this.disposed) // { // if (disposing) // { try { RClient = null; TimeCounterCollection = null; strNumber = string.Empty; strBtnChClick = string.Empty; intChannelNumber = 0; lstGlobalBuddyList = null; DomainElement = null; ThOpenClinet = null; SNChannel = null; objNetTcpAudio = null; NetP2PChannel.Close(); NetP2PChannel.Dispose(); NetP2PChannel = null; objHttpAudio = null; Httpchannel = null; t1.Stop(); } catch (Exception ex) { VMuktiHelper.ExceptionHandler(ex, "Dispose()", "Audio\\ctlDialer.xaml.cs"); } // } // disposed = true; //} // GC.SuppressFinalize(this); }
public void ClosePod() { try { for (int i = 0; i < btnChannels.Length; i++) { if (btnChannels[i].Tag.ToString() == "Running" || btnChannels[i].Tag.ToString() == "Hold" || btnChannels[i].Tag.ToString() == "Conference" || btnChannels[i].Tag.ToString() == "ConfHold") { btnChannels[i].Tag = "Free"; btnChannels[i].Background = Brushes.Transparent; if (blIsVista) { ClientNetP2PRTCVistaChannel.svcHangup(i + 1); } else { RClient.HangUp(i + 1); } } } if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithNetP2P || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.SuperNode || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.BootStrap) { if (NetP2PChannel != null) { NetP2PChannel.svcP2PUnJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); } } else { if (Httpchannel != null) { Httpchannel.svcUnJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); } } if (NetP2PChannel != null) { NetP2PChannel.Close(); NetP2PChannel.Dispose(); NetP2PChannel = null; } if (Httpchannel != null) { Httpchannel = null; } if (ClientNetP2PRTCVistaChannel != null) { if (p != null) { p.Kill(); p.CloseMainWindow(); p.Close(); p.Dispose(); p = null; } ClientNetP2PRTCVistaChannel.svcUnJoin(); npcRTCVistaClient.CloseClient<INetTcpRTCVistaServiceChannel>(); } if (ClientNetP2PRTCVistaChannel != null) { ClientNetP2PRTCVistaChannel.Close(); ClientNetP2PRTCVistaChannel.Dispose(); ClientNetP2PRTCVistaChannel = null; } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "ClosePOD()", "Audio\\ctlDialer.xaml.cs"); } }
void FncOpenClinet(object lstParameters) { try { System.Collections.Generic.List<object> lstTempObj = (System.Collections.Generic.List<object>)lstParameters; strUri = lstTempObj[1].ToString(); if ((VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.NodeWithNetP2P || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.BootStrap || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.SuperNode) { VMuktiService.NetPeerClient ncpAudio = new VMuktiService.NetPeerClient(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PJoin(ctlDialer_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PStartConference(ctlDialer_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(ctlDialer_EntsvcGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(ctlDialer_EntsvcSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new Audio.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PUnJoin(ctlDialer_EntsvcP2PUnJoin); NetP2PChannel = (INetTcpAudioChannel)ncpAudio.OpenClient<INetTcpAudioChannel>(strUri, strUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (temp < 20) { try { ClsException.WriteToLogFile("Going to call svcJoin"); NetP2PChannel.svcP2PJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); ClsException.WriteToLogFile("svcJoin has been called."); temp = 20; this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, objDelStartIntitialConfrence); if (strMyRole == "Host") { NetP2PChannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, strDefaultConfNumber); } else { NetP2PChannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, ""); } } catch { temp++; System.Threading.Thread.Sleep(1000); } } } else { VMuktiService.BasicHttpClient bhcAudio = new VMuktiService.BasicHttpClient(); Httpchannel = (IHttpAudio)bhcAudio.OpenClient<IHttpAudio>(strUri); while (tempcounter < 20) { try { Httpchannel.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); tempcounter = 20; this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal, objDelStartIntitialConfrence); if (strMyRole == "Host") { Httpchannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, strDefaultConfNumber); } else { Httpchannel.svcGetUserList(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, ""); } } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } dtGetConference.Interval = TimeSpan.FromSeconds(2); dtGetConference.Tick += new EventHandler(dtGetConference_Tick); dtGetConference.Start(); } ClsException.WriteToLogFile("Opening client Completed successfully"); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncOpenClient()", "Audio\\ctlDialer.xaml.cs"); } }
private void FncOpenClinet(object lstParameters) { try { System.Collections.Generic.List<object> lstTempObj = (System.Collections.Generic.List<object>)lstParameters; strUri = lstTempObj[1].ToString(); if ((VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.NodeWithNetP2P || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.BootStrap || (VMuktiAPI.PeerType)lstTempObj[0] == VMuktiAPI.PeerType.SuperNode) { VMuktiService.NetPeerClient ncpAudio = new VMuktiService.NetPeerClient(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PJoin(ctlDialer_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PStartConference(ctlDialer_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new AutoProgressivePhone.Business.Service.NetP2P.clsNetTcpAudio.DelsvcP2PUnJoin(ctlDialer_EntsvcP2PUnJoin); NetP2PChannel = (INetTcpAudioChannel)ncpAudio.OpenClient<INetTcpAudioChannel>(strUri, strUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (temp < 20) { try { NetP2PChannel.svcP2PJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); temp = 20; } catch { temp++; System.Threading.Thread.Sleep(1000); } } } else { VMuktiService.BasicHttpClient bhcAudio = new VMuktiService.BasicHttpClient(); Httpchannel = (IHttpAudio)bhcAudio.OpenClient<IHttpAudio>(strUri); while (tempcounter < 20) { try { Httpchannel.svcJoin(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } dtGetConference.Interval = TimeSpan.FromSeconds(2); dtGetConference.Tick += new EventHandler(dtGetConference_Tick); dtGetConference.Start(); } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "fncOpenClient()", "ctlDialer.xaml.cs"); } }
private void Dispose(bool disposing) { try { lstMessage = null; UserName = null; ; myMeshId = null; ; objHttpAudio = null; objNetTcpAudio = null; HttpAudioServer = null; NetTcpAudioChannel = null; ; HttpThread = null; NetTcpThread = null; VMuktiAPI.ClsException.WriteToLogFile("Audio Dummy is Disposed"); } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "Dispose()", "AudioDummy.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcGetUserList += new clsNetTcpAudio.DelsvcGetUserList(AudioDummy_EntsvcP2PGetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcSetUserList += new clsNetTcpAudio.DelsvcSetUserList(AudioDummy_EntsvcP2PSetUserList); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient<INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "RegNetP2PClient()", "AudioDummy.cs"); } }
void RegNetP2PClient(object netP2pUri) { try { VMuktiService.NetPeerClient npcDummyChat = new VMuktiService.NetPeerClient(); objNetTcpAudio = new clsNetTcpAudio(); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PJoin += new clsNetTcpAudio.DelsvcP2PJoin(AudioDummy_EntsvcP2PJoin); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PStartConference += new clsNetTcpAudio.DelsvcP2PStartConference(AudioDummy_EntsvcP2PStartConference); ((clsNetTcpAudio)objNetTcpAudio).EntsvcP2PUnJoin += new clsNetTcpAudio.DelsvcP2PUnJoin(AudioDummy_EntsvcP2PUnJoin); NetTcpAudioChannel = (INetTcpAudioChannel)npcDummyChat.OpenClient<INetTcpAudioChannel>(netP2pUri.ToString(), netP2pUri.ToString().Split(':')[2].Split('/')[2], ref objNetTcpAudio); while (tempcounter < 20) { try { NetTcpAudioChannel.svcP2PJoin(UserName); tempcounter = 20; } catch { tempcounter++; System.Threading.Thread.Sleep(1000); } } } catch (Exception ex) { ex.Data.Add("My Key", "VMukti--:--VmuktiModules--:--Call Center--:--AutoProgressiveSoftPhone--:--AutoProgressivePhone.Presentation--:--AudioDummy.cs--:--RegNetP2PClient()--"); ClsException.LogError(ex); ClsException.WriteToErrorLogFile(ex); throw ex; } }