Filter Pack

Top  Previous  Next

The filter pack is a scripting system that allows you to modify any input in to or output from any of PageGate's interfaces based on nearly any criteria of your choosing.

 

Things you can do with the filtering system:

Conditionally modify who a message is intended to go to based on key words or key phrases.

 

Examples:

All fire, rescue and accident calls should be dispatched but non-emergency calls should not be.

Only alarms with "CRITICAL" in them should be delivered.

Messages with the keyphrase "HAZARD" should go to a high priority group instead of the normal distribution list.

Replies with the word 'subscribe' should perform one action but replies with the word 'unsubscribe' should perform another.

 

Modify the contents or structure of data to turn it in to something more user-friendly and readable.

 

Examples:

Pull content from an API (like the National Weather Service, a Ticket Tracking system like Jira or ServiceNow, etc)

Parse XML, HTML, JSON or any other form of delimited text in to readable message content

 

Trigger a Powershell or other script.

 

Description:

This allows you to have PageGate trigger other applications or processes by tying them to a conditional filter in PageGate. Powershell is incredibly powerful and with the right script, you could have PageGate execute functions that would modify another application's database, perform network or domain lookup functions or anything else made available by Powershell.

 

This is certainly not a comprehensive list of things you could do and, effectively, this filter allows you to modify any input fed in to or output delivered from PageGate based on nearly any selection criteria of your choosing.

 

Over the course of this documentation, we'll be going over how to configure, code and implement PageGate's filtering system.

 

First, the filter scripts require the file 'pgfilter.exe' to reside in the PageGate program directory and will need to reference an XML file containing the script, which can reside in any directory the PageGate server has access to (whether that's on the local hard drive or on a network share via UNC path). You should receive all necessary files for the filtering system upon purchase but if you do not have them, please contact our sales or support departments.

 

Second, it's important to understand the chain of events that triggers the script to run.

 

For more detailed information, please see: How to Implement the Script

 

As an important note, due to the way this script is programmed, certain characters are treated as command characters instead of literal text characters. The following characters represent certain command functions in the script:

Character

Function

~

~ as first character means start of section/file, ~ as last character means end of section/file. For example, ~123~ would only find 123 and not 01234 or 1237, etc. ~123 would find 12340 but would not find 01234. 123~ would find 0123 but would not find 01234.

?

Single character wildcard.

*

Multiple character wildcard.

\

IMPORTANT

ASCII value prefix (Ex: \013 for a carriage return, \010 for a line feed). The \ must be followed by a three digit code to indicate the character to be output.

 

This character is used when you want to represent a character as represented by its ASCII Decimal value. For example, since the filter directly references the character ~ in its function, if you want to use the ~ character in your text, you'll need to represent it with its ASCII value. The ASCII value of ~ is: \126

 

Note: PageGate's filter script supports RegEx expressions, which can allow you to implement an incredibly intricate system.