Phone Special Action Specification

$action_phone pathname [code] [phonetype] [EmptyOK] [WSDelim] [Partial]

This command is used to specify a list file which is pre-loaded by the COPIAFACTS engine, to specify special actions to be performed for specific phone numbers.  Multiple commands may be specified to arrange for different types of action.

Job Administration users should not normally use this command: instead use $action_phone commands in SYSTEM.UJP to specify actions at launch time.

For more information, see Destination-Specific Processing.

The parameters on this command are used as follows:

pathnameThe pathname of the look-up file to be used.  Currently supported file extensions are:
.NDXa character-mode index file created and maintained by the PIN utility.
.TXTa list of entries to be matched
The timestamp of the file will be checked each time a fresh scan of the TOSEND folders is started (typically every 20 seconds) and the file will be reloaded if it has changed.
codeA code which will be used as the default numeric action code for matched items.  If not supplied, only the action code from the list will be returned.
phonetypeOne of the keywords fax, phone, poll or sms to indicate the type of phone numbers for which this file is to be used.  If no keywords are given, the file is used for all types of broadcast involving a telephone number.
EmptyOKA keyword which indicates that the index/list may be empty.  This suppresses the check that ensures that at least one entry has been loaded from the file. Failure to load any entries could be a symptom of a corrupted file.
PartialA keyword which indicates that a partial match is allowed in addition to an exact match.  Specifically, a match is also recorded if the item in the index is shorter than, and an initial substring of, the item to be tested.  This parameter is ignored if databasespec is used
WSDelimA keyword which indicates that any number of white spaces may separate the phone number and the action code in a loaded TXT list.  If you use this parameter, phone numbers in the list should of course not have embedded blank space.

The following processing is done on numbers to be matched:

if the value starts with sip: then the check is carried out on the portion following this string and preceding any @, if present.

in the NANP area, either two look-up operations are done on NANP numbers (with and without the leading 1 digit) or if the look-up index is known to contain only numbers with a leading 1 digit, the number looked up is forced to this format. Otherwise, non-numeric characters are removed and the numbers are then matched as entered.

The base phone, fax, or voice number in the FS file is the number that is always matched against the list, before any $phone_mask processing has been performed on it.

The NDX file may contain a positive numeric data value for each entry, and the TXT file may contain a positive numeric data value separated from the phone number entry by a single TAB character (or any white space, if WSDelim is used).  If present, this will override the default numeric action code.

The action codes from the list(s) in which the item is matched will be returned, separated by semi-colons, in the ACTION_CODES variable as the FS file is processed, along with any action codes already present from the FS file.  However only the original ACTION_CODES content will be written back to the FS file variable.

Action codes less than 1000 are reserved for system use, and it is recommended that only 4-digit codes are used for user applications.


1. This CFG command specifies a list containing phone numbers and action codes to select a variable group:

$action_phone @FFBASE\RESTRICT.txt WSdelim

A phone number in the list would acquire an action code from the list entry (for example 201) which would be used to select a variable group, for example to reduce maximum baud rate.   See also Action Codes and Variable Groups.


2. This CFG command looks up a number in a list:

$action_phone lookup.txt 1234

A phone number matched in the list would acquire an action code of "1234" in the variable ACTION_CODES. The infobox pre-process command used to perform a special action would then be:

$if 1234 $in @ACTION_CODES

  $next_box sendemail