コード例 #1
0
 internal void OnActiveMediaTypeCallToEstablish(Conversation conversation, TranscriptRecorderType addedModality)
 {
     // TODO: Will be called from ConferenceTranscriptRecorder after joining an invited conf & added Calls for each supported modality
     // Note: Requires Established async methods to be added to AV and IM
     if (addedModality == TranscriptRecorderType.AudioVideo)
     {
         AVTranscriptRecorder avRecorder = new AVTranscriptRecorder(this);
         // TODO: Log call established and added to conv/conf
         _transcriptRecorders.Add(avRecorder);
         _conversationToCallTranscriptMapping[_conversationTranscriptRecorder].Add(avRecorder);
         avRecorder.EstablishAudioVideoCall(conversation);
     }
     else if (addedModality == TranscriptRecorderType.InstantMessage)
     {
         IMTranscriptRecorder imRecorder = new IMTranscriptRecorder(this);
         // TODO: Log call established and added to conv/conf
         _transcriptRecorders.Add(imRecorder);
         _conversationToCallTranscriptMapping[_conversationTranscriptRecorder].Add(imRecorder);
         imRecorder.EstablishInstantMessagingCall(conversation);
     }
 }
コード例 #2
0
        public void AddIMIncomingCall(CallReceivedEventArgs<InstantMessagingCall> e, CancellationTokenSource cts = null)
        {
            if (_state != TranscriptRecorderState.Active)
            {
                NonBlockingConsole.WriteLine("Warn: AddIMIncomingCall in unexpected TranscriptRecorderSession state: " + _state.ToString());
            }

            IMTranscriptRecorder i = new IMTranscriptRecorder(this);
            ConversationParticipant caller = e.RemoteParticipant;

            Message m = new Message("InstantMessaging Conversation Participant Added.", caller.DisplayName, 
                caller.UserAtHost, caller.Uri, DateTime.Now,
                _conversation.Id, _conversation.ConferenceSession.ConferenceUri,
                MessageType.ConversationInfo, MessageDirection.Outgoing);
            this.OnMessageReceived(m);

            _transcriptRecorders.Add(i);
            _conversationToCallTranscriptMapping[_conversationTranscriptRecorder].Add(i);

            i.InstantMessagingCall_Received(e);
        }