Processing replies with a Filter Pack

Top  Previous  Next

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

 

To say that there are many things you can do with a properly coded filter pack would be an understatement. The Filter Pack allows you to modify and conditionally modify any part of what it interacts with. It can reassign who a message is delivered to based on words or phrases in a reply, it can modify the body of the message, it can modify the subject line, it can insert pre-determined text and many other things.

 

For instance, with the filter pack, you can tell PageGate to conditionally change who receives the message based on what the text in the reply is. As an example, you could configure a filter system so that any time the word lunch shows up in a reply message, that reply is sent to the cafeteria group instead of the general replies group.

 

You could configure a system where replies from a certain phone number will always be copied to certain recipients or groups.

 

You could configure a system where certain keywords or phrases are replaced with other keywords or phrases. For example, you could translate a code like PD4N in to 4th Precinct.

 

You could configure a system to describe every element I've just described all at once, it's just a matter of coding your filter pack to perform the actions you want.

 

Step 1: Configure GetASCII to process the received data

WCTP has a unique structure to the data returned to your server and you'll need to tell PageGate how to interpret the data and what to do with it in general.

 

To do that, you'll want to configure an 'Advanced Polling' rule for PageGate's GetASCII interface:

1)Open PG Admin.

v9AdminSplash

 

2)Expand Interfaces - GetAscii - Settings - Advanced Polling

ExpandedGetAscii

 

3)Click Files.

AdvancedPollingFiles

 

4)Click Add.

 

5)Specify the following and click Apply:

Recipient: *

From: Leave Blank

File(s): *.asc

Path: The path to the folder webdata.exe is stored in on the web server.

Example: \\WebServer01\pgscripts\ or c:\inetpub\pgscripts\

File Type: Custom

EMAGWCTPReplies01

 

6)Click Apply, then Apply again.

 

NOTE: Since you will be implementing a filtering system, you will do so at this point. For more information, please see PageGate's Filter Script documentation.