You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
856 B
29 lines
856 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CoreAgent.ProtocolClient.Context;
|
|
using CoreAgent.ProtocolClient.Models;
|
|
|
|
namespace CoreAgent.ProtocolClient.BuildProtocolParser
|
|
{
|
|
public class SIPProtocolParser : IGeneralProtocolParser
|
|
{
|
|
private readonly ProtocolClientContext context;
|
|
public SIPProtocolParser(ProtocolClientContext context)
|
|
{
|
|
this.context = context;
|
|
}
|
|
public void GeneralParse(ref BuildProtocolLog log)
|
|
{
|
|
var SIPInfoMatch = ProtocolLogPatterns.RegExpSIP.Match(log.Message);
|
|
if (SIPInfoMatch.Success)
|
|
{
|
|
var info = context.UeIdentifier.StringToId(SIPInfoMatch.Groups[2].Value);
|
|
log.Info = info;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|