public MainForm() { InitializeComponent(); _gv = new GoogleVoice(); // Create resource object containing SipekSdk and other Sipek related data _resources = new SipekResources(this); _sipekMutex = new Mutex(false); }
public SIP(Core core, ISynchronizeInvoke syncInvoke) { Logger.LogNotice("Initializing SIP core"); _core = core; _deferredSetAudioDevicesTimer = new System.Timers.Timer() { Interval = 200, SynchronizingObject = syncInvoke }; _deferredSetAudioDevicesTimer.Elapsed += new System.Timers.ElapsedEventHandler(_deferredSetAudioDevicesTimer_Elapsed); _deferredSetAudioDevicesTimer.Stop(); // Initialize PjSIP SipekResources = new SipekResources(core); if (!CheckUdpPort(SipekResources.Configurator.SIPPort)) { if (CheckUdpPort(5060)) { SipekResources.Configurator.SIPPort = 5060; } else if (CheckUdpPort(5061)) { SipekResources.Configurator.SIPPort = 5061; } else { throw new InvalidOperationException("SIP port is in use"); } } if (SipekResources.StackProxy.initialize() != 0) { throw new InvalidOperationException("Can't initialize PjSIP proxy stack!"); } if (SipekResources.CallManager.Initialize(SipekResources.StackProxy) != 0) { throw new InvalidOperationException("Can't initialize PjSIP call manager!"); } Codecs = LoadCodecs(); // Initialize account Account = new SipAccount(this); Messenger = new SipMessenger(this); NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged; }
public TestForm(SipekResources resources) { InitializeComponent(); _resources = resources; SipekResources.StackProxy.setWavPlayerEndedCallback(WavPlayerEndedCallback); }
private void MainForm_Load(object sender, EventArgs e) { // Create resource object containing SipekSdk and other Sipek related data _resources = new SipekResources(this); phoneControl1.SipResource = _resources; treeView1.Nodes[0].Nodes.Clear(); treeView1.Nodes[1].Nodes.Clear(); treeView1.Nodes[2].Nodes.Clear(); treeView1.Nodes[3].Nodes.Clear(); Stack<CCallRecord> records = _resources.CallLogger.getList(); TreeNode node = null; foreach (var item in records) { string nodeText = item.Number + " (" + item.Count.ToString() + ")"; switch (item.Type) { case ECallType.EAll: break; case ECallType.EDialed: node = treeView1.Nodes[1].Nodes.Add(nodeText); break; case ECallType.EMissed: node = treeView1.Nodes[0].Nodes.Add(nodeText); break; case ECallType.EReceived: node = treeView1.Nodes[2].Nodes.Add(nodeText); break; case ECallType.EUndefined: node = treeView1.Nodes[3].Nodes.Add(nodeText); break; default: break; } node.Tag = item; } loginTimer.Elapsed += new System.Timers.ElapsedEventHandler(loginTimer_Elapsed); loginTimer.Start(); }
public CallDetailsForm(SipekResources resource) { InitializeComponent(); this.bindingSource1.DataSource = resource.CallLogger.getList(); }
public SettingsForm(SipekResources resources) { InitializeComponent(); _resources = resources; }