VoIP Regular Expressions Patterns!
Here are some reaaaaly cooool patterns I wrote using the new J2SE 1.4.1 Regular Expressions package.
VOIP RECORD TYPES
private Pattern voipCallHistoryPattern =
Pattern.compile("%VOIPAAA-5-VOIP_CALL_HISTORY:");
private Pattern callControlMaxConnectionsRecordPattern =
Pattern.compile("%CALL_CONTROL-6-MAX_CONNECTIONS:");
private Pattern isdnDisconnectRecordPattern =
Pattern.compile("%ISDN-6-DISCONNECT:");
private Pattern isdnConnectRecordPattern =
Pattern.compile("%ISDN-6-CONNECT:");
private Pattern voipCallLeg1LandlineHalfPattern =
Pattern.compile("CallLegType 1");
private Pattern voipCallLeg2VoipHalfPattern =
Pattern.compile("CallLegType 2");
private Pattern voipConnectionIDPattern =
Pattern.compile("ConnectionId.*,\\sSetupTime");
VOIP RECORD TIMESTAMPS
private Pattern timestampLoggingMachineReceivedPattern =
Pattern.compile("^\\w{3}\\s+\\d+");
sample: BOF + Feb 4 22:30:02
private Pattern timestampRouterSentPattern = Pattern.compile("\\w{3}\\s+\\d+\\s\\d{2}:\\d{2}:\\d{2}\\S\\d{3}.*VOIPAAA");
sample: Feb 5 03:58:48.799: %VOIPAAA
private Pattern timestampCallSetupPattern = Pattern.compile("SetupTime.*\\w{3}\\s+\\d+\\s\\d{4},\\sPeer");
sample: SetupTime 03:59:09.479 UTC Wed Feb 5 2003
this is the time the call hit the gateway for processing
private Pattern timestampCallConnectPattern =
Pattern.compile("ConnectTime.*\\w{3}\\s+\\d+\\s\\d{4},\\sDis");
sample: ConnectTime 03:59:09.479 UTC Wed Feb 5 2003
private Pattern timestampCallDisconnectPattern = Pattern.compile("DisconnectTime.*\\w{3}\\s+\\d+\\s\\d{4},\\sCall");
4:51:14 PM
|
|