Example #1
0
        private void ParseAndPublishDialedCall(DialedCallReport rp)
        {
            var call = rp.ToProtobuf();

            var msg = new PhoneCallEnded {
                JWToken        = AC.SC.AccessToken,
                MsgReceivedAt  = C.GetCurrentInstant().ToTS(),
                RawMsg         = rp.RawLine,
                MitelCallEnded = call,
            };

            CH.Publish(PBXConnectorTopics.PbxCallCompletedTopic, msg);
        }
Example #2
0
        protected override void ParseLine(object sender, string line)
        {
            Log.LogDebug($"{ProtocolName}: Received full line from lexer: {line}");
            // Provided as a test hook -- tests inject input here
            var dialedCallMatch = _dialedCallReport.Match(line?.Trim());

            if (dialedCallMatch.Success)
            {
                var dc = new DialedCallReport(C, dialedCallMatch, line);
                ParseAndPublishDialedCall(dc);
                return;
            }

            var roomStatusMatch = _roomStatusRegex.Match(line);

            if (roomStatusMatch.Success)
            {
                Log.LogDebug($"Disregarding room status message \"{line}\"");
                return;
            }

            Log.LogWarning($"Ignoring unrecognized input line {line}");
            Log.LogWarning($"Ignoring unrecognized input line {line?.Trim()}SMDR Parser end of line");
        }