internal void OnSubConversationAdded(Conversation subConversation, MediaTranscriptRecorder addingTranscriptRecorder)
        {
            // Start conversation recorder on sub conversation
            ConversationTranscriptRecorder subConvRecorder = null;
            foreach (ConversationTranscriptRecorder c in _conversationToCallTranscriptMapping.Keys)
            {
                if (c.Conversation.Equals(subConversation))
                {
                    subConvRecorder = c;
                    break;
                }
            }

            if (subConvRecorder == null)
            {
                subConvRecorder = new ConversationTranscriptRecorder(this, subConversation, true);
                _transcriptRecorders.Add(subConvRecorder);
                _conversationToCallTranscriptMapping.Add(subConvRecorder, new List<MediaTranscriptRecorder>());
                _conversationToCallTranscriptMapping[subConvRecorder].Add(addingTranscriptRecorder);
            }
        }
        internal void OnSubConversationRemoved(Conversation subConversation, MediaTranscriptRecorder removingTranscriptRecorder)
        {
            // Terminate conversation recorder on sub conversation if no calls left under this sub conv
            ConversationTranscriptRecorder subConvRecorder = null;
            foreach (ConversationTranscriptRecorder c in _conversationToCallTranscriptMapping.Keys)
            {
                if (c.Conversation.Equals(subConversation))
                {
                    subConvRecorder = c;
                    break;
                }
            }

            if (subConvRecorder != null)
            {
                if (_conversationToCallTranscriptMapping[subConvRecorder].Contains(removingTranscriptRecorder))
                {
                    _conversationToCallTranscriptMapping[subConvRecorder].Remove(removingTranscriptRecorder);
                    if (_conversationToCallTranscriptMapping[subConvRecorder].Count == 0)
                    {
                        _conversationToCallTranscriptMapping.Remove(subConvRecorder);
                        _transcriptRecorders.Remove(subConvRecorder);
                    }
                }
            }
        }
        internal void OnMediaTranscriptRecorderTerminated(MediaTranscriptRecorder terminatedRecorder)
        {
            // Add shutdown message for MediaTranscriptRecorder
            Message m = new Message("MediaTranscriptRecorder shutdown for MediaType: " + terminatedRecorder.RecorderType.ToString(), this._sessionId.ToString());
            this.OnMessageReceived(m);

            if (_transcriptRecorders.Contains(terminatedRecorder))
            {
                _transcriptRecorders.Remove(terminatedRecorder);
            }

            if ((_transcriptRecorders.Count == 0) || (terminatedRecorder is ConversationTranscriptRecorder)
            || (terminatedRecorder is ConferenceTranscriptRecorder))
            {
                this.Shutdown();
            }
        }