Updated: 4/29/2003; 9:28:33 AM.
Java Morning/C# Afternoon
Practical living with two modern languages


by Michael Isbell
        

Sunday, February 09, 2003

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    comment []


© Copyright 2003 Michael Isbell.
 
February 2003
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28  
Jan   Mar


Click here to visit the Radio UserLand website.

Subscribe to "Java Morning/C# Afternoon" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.