Tech Support
Joined: 25 Aug 2003 Posts: 4367
|
Posted: Wed Feb 06, 2019 9:58 am Post subject: PageGate's Filter Script |
|
|
PageGate's filter script provides the ability to modify and/or filter the content of your messages, whether you want to filter data as it's read in to the program or modify the data that's being sent.
One of the more common uses for the filter script is processing 2-way messages with cellular hardware. When using cellular hardware to deliver SMS, it's entirely possible for a recipient to reply to that message. The reply then comes back to the cellular hardware, where PageGate can be configured to periodically check for replies and process them.
The filter script allows you to do many, many things with 2-way messaging. For example, you could configure a whitelist of phone numbers. If a phone number that isn't on your whitelist tries to reply, their message would be filtered and not allowed through. You could also configure a script to replace the phone number of a reply message with a name or other designation, modify the body of the reply, change who the reply is meant to go to based on who sent it or based on certain keyphrases or keywords in the body of the reply.
As an example, you could have the filter script scan for the word "critical" or the phrase "serious trouble". If it finds the keyword or keyphrase in the body of a reply, that reply would be sent to a higher priority group instead of the general replies group.
Another common use for the filter script is processing input data. Systems passing information to PageGate (whether that's a CAD system, alarm system, Solarwinds, PRTG, etc) might contain data that isn't relevant to your recipients or might be formatted in a way that isn't tidy or terribly readable and the filter script allows you to modify that data as it's being processed.
For example, let's say that this is what's currently being passed:
F34NW7Q High Temp Alarm 116C West Corridor
In our example, let's say that F34NW7Q is a code that means "Floor 34, North Wing, Room 7Q".
We could have the filter script reformat it to look like this:
Floor 34, North Wing, Room 7Q High Temp Alarm 116C West Corridor
In another example, let's say that you have a CAD system dispatching data to a messaging service like I Am Responding, Active911, etc. Since those services' data parsers require your data to be in a specific format, you can have the filter script reconfigure the data to bring it in line with their requirements.
For example, let's say that this is what the CAD system is currently outputting:
3664
DISPATCH
YourFD: CallNumber - DateStamp TimeStamp - CAD ID Number CallType
Address,City//ALIAS=Building Name//Unit:CallNumber//Narrative and Comments* * DIRECTIONS * * Cross Street Information
We could have the filter script modify the data like this:
3664
DISPATCH
CALL: CallType
ADDR: Address
CITY: City
ID: CAD ID Number
DATE: DateStamp
TIME: TimeStamp
UNIT: Unit
INFO: Narrative and Comments
DIRECTIONS: Cross Street Information
There are many, many things you can do with the filter script and these are a few examples of the types of things you can accomplish. |
|