/// <summary> /// Dispose(bool disposing) executes in two distinct scenarios. /// If disposing equals true, the method has been called directly /// or indirectly by a user's code. Managed and unmanaged resources /// can be disposed. /// If disposing equals false, the method has been called by the /// runtime from inside the finalizer and you should not reference /// other objects. Only unmanaged resources can be disposed. /// </summary> protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!this._disposed) { // Note disposing has been done. _disposed = true; // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { if (_voipManager != null) { _voipManager.Dispose(); } if (_conferenceCall != null) { RemoveAllConferenceCallContacts(); } } // Call the appropriate methods to clean up // unmanaged resources here. _voipManager = null; _conferenceCall = null; } }
/// <summary> /// VoIP call. /// </summary> /// <param name="endpoint">The endpoint instance.</param> /// <param name="accountConnection">Account connection configuration.</param> public VoIPCall(VoIPEndpoint endpoint, AccountConnection accountConnection) { if (accountConnection == null) { throw new ArgumentNullException(nameof(accountConnection)); } // Create the voip manager. _voipManager = new VoIPManager(endpoint, accountConnection); }
/// <summary> /// VoIP call. /// </summary> /// <param name="endpoint">The endpoint instance.</param> /// <param name="accountName">The account name or service phone number.</param> /// <param name="spHost">The service provider host name or IP address.</param> /// <param name="username">The sip username.</param> /// <param name="password">The sip password.</param> public VoIPCall(VoIPEndpoint endpoint, string accountName, string spHost, string username, string password) { _voipManager = new VoIPManager(endpoint, accountName, spHost, username, password); }
/// <summary> /// VoIP call. /// </summary> /// <param name="endpoint">The endpoint instance.</param> public VoIPCall(VoIPEndpoint endpoint) { // Create the voip manager. _voipManager = new VoIPManager(endpoint); }