Example #1
0
        /// <summary>
        /// Message handling
        /// </summary>
        /// <param name="message">See <see cref="Message"/></param>
        internal override void Handle(Message message)
        {
            // TODO: Tests for LiveCache
            this._Parse();

            int nodeId = message.Node.Id;

            if (!string.IsNullOrEmpty(channelId))
            {
                LiveCache.AddOrReplace($"channelIdToYRtpId-{nodeId}-{this.channelId}", this.rtpChannelId);
            }

            if (!string.IsNullOrEmpty(remoteRtpIp))
            {
                LiveCache.AddOrReplace($"yRtpIdToRemoteRtpIp-{nodeId}-{this.rtpChannelId}", this.remoteRtpIp);
            }

            if (!string.IsNullOrEmpty(callBillId))
            {
                LiveCache.AddOrReplace($"yRtpIdToBillId-{nodeId}-{this.rtpChannelId}", this.callBillId);
            }

            if (!string.IsNullOrEmpty(this.remoteRtpPort))
            {
                LiveCache.AddOrReplace($"yRtpIdToRemoteRtpPort-{nodeId}-{this.rtpChannelId}", this.remoteRtpPort);
            }

            this._Reset();
        }
Example #2
0
        /// <summary>
        /// Message handling
        /// </summary>
        /// <param name="message">See <see cref="Message"/></param>
        internal override void Handle(Message message)
        {
            string channelId = message.GetValue("id");
            string billId    = message.GetValue("billid");
            int    nodeId    = message.Node.Id;

            LiveCache.AddOrReplace($"channelIdToBillId-{nodeId}-{channelId}", billId);
        }