/// <summary> /// Add the conference call contact. /// </summary> /// <param name="caller">The contact to add.</param> public void AddConferenceCallContact(Param.ConferenceCallContainer caller) { if (_conferenceCall == null) { _conferenceCall = new List <Param.ConferenceCallContainer>(); } // Add the contact. if (_conferenceCall != null) { // Start the conversation between the caller and all other callers. foreach (Param.ConferenceCallContainer call in _conferenceCall) { try { // The current callers. caller.Call.StartConversation(call.Call); } catch { } } // Add the contact. _conferenceCall.Add(caller); } }
/// <summary> /// Remove the conference call contact. /// </summary> /// <param name="id">The call to remove.</param> public void RemoveConferenceCallContact(string id) { // Remove the contact. if (_conferenceCall != null) { Param.ConferenceCallContainer caller = null; try { // Find the caller. caller = _conferenceCall.First(u => u.Call.ID == id); bool ret = _conferenceCall.Remove(caller); if (!ret) { caller = null; } } catch { } // If call has been found. if (caller != null) { // Start the conversation between the caller and all other callers. foreach (Param.ConferenceCallContainer call in _conferenceCall) { try { // The current callers. caller.Call.StopConversation(call.Call); } catch { } } // If a video exists. if (caller.Video != null) { try { caller.Video.SetActiveState(false); caller.Video.Close(); } catch { } caller.Video = null; } } } }