private ISession StartConversation(SessionType sessionType, bool enableVideo) { BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: {0}, {1}", sessionType, enableVideo)); IPresentity presentity = this.ContactsWindow.GetSelectedContact(); BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: {0}", presentity.Uri)); ISession session = this.Endpoint.FindSession(sessionType, presentity.Uri); BugTracer.Get(BugId.N01).Trace(string.Format(@"StartConversation: session {0}found", (session == null) ? "not " : "")); if (session != null) { if (enableVideo) { (session as IAvSession).EnableVideo(); } this.Endpoint.RestoreSession(session); } else { session = this.Endpoint.CreateSession(sessionType); if (enableVideo) { (session as IAvSession).EnableVideo(); } BugTracer.Get(BugId.N01).EndTrace(@"StartConversation -- endtrace"); session.AddPartipant(presentity.Uri); } return(session); }