Action Codes and TOSEND Queues

This example illustrates how to launch parts of a job into separate TOSEND queues, based on the fax number.  It assumes you have three separate nodes running the COPIAFACTS engine, and uses action codes set from phone number look-up in order to select the launch queue.

Step 1: Specify the TOSEND queues to be processed

We will assume that you will set up four queues:

TOSEND2Will send to numbers known to work well with FoIP, configured on node M2
TOSEND3Will send to numbers known to work well with the lines connected to node M3
TOSEND4Will send to numbers known to work well with the lines connected to node M4
TOSEND5Will send to unclassified numbers

In node M2, on the COPIAFACTS Queues page, select only TOSEND2 and TOSEND5 to be processed by the node.

In node M3, on the COPIAFACTS Queues page, select only TOSEND3 and TOSEND5 to be processed by the node.

In node M4, on the COPIAFACTS Queues page, select only TOSEND4 and TOSEND5 to be processed by the node.

Step 2: Specify the default settings for the job:

The $job_priority should be set to 5 so that unclassified items go to this queue.

You may also want to set the $retry_tosend value to 3 or 4, to catch items which fail from one of the other queues.

Step 3: Define the Phone Number look-up list(s)

The basic principle is that a list or lists of numbers and associated action codes will be supplied.  The built-in action codes we will use are 301 to 315, which are pre-defined to select queues TOSEND1 to TOSEND15 respectively.  TOSEND numbers up to TOSEND99 and action codes to 399 are available if you have a license for the CopiaFacts Job Administration feature.  Currently you can specify action code lists either in a simple text file or in an NDX file maintained using PIN. SQL look-up is planned for a future release, but currently if you have the data in a SQL table you would need to dump this to a text file at intervals.

In this example, we will use a pre-defined list of phone-numbers in a text file.  There are two different ways to set this up; both methods use the UJP version of the $action_phone command:

First, you can specify separate lists of phone numbers to activate each group:

   $action_phone @FFBASE\TS2LIST.TXT 302 fax ; launch to TOSEND2 if in this list

   $action_phone @FFBASE\TS3LIST.TXT 303 fax ; launch to TOSEND3 if in this list

   $action_phone @FFBASE\TS4LIST.TXT 304 fax ; launch to TOSEND4 if in this list

In each case, the list will consist of just a telephone number on each line.  When a number is matched in the TS2LIST.TXT, action code 302 will be assigned: action code 302 will cause the specific job item to be launched into TOSEND2 instead of into the default queue set from $job_priority.  If a number appears in more than one list, only the first action code will be used to select a queue.

The fax keyword in the above examples restricts the action to FS files used for fax.  It may be omitted if you do not do voice or SMS broadcasting.

Secondly, you can combine both lists into a single list, with a TAB and then the required action code following each number:

   $action_phone @FFBASE\SELECTQ.TXT fax

For example a list of this type might contain:

    6417416000        303

    ...

    6417416913        304

where the columns are separated by a single tab character.  If you prefer to use any white-space separator, add the wsDelim keyword to the $action_phone command above.

Step 4: Add 'partial match' items if needed

To specify special handling for groups of numbers, such as international numbers, specific countries, or specific area codes, use a partial keyword on the $action_phone command:

$action_phone @FFBASE\International.TXT partial

This causes numbers to be treated as matched if it starts with the value in the look-up index.  Then you can create a look-up file with details of how each country will be handled:

01144        302

01149        303

011          304

This file would cause faxes for UK destinations to be launched to TOSEND2, German destinations to TOSEND3, and all other international destinations to TOSEND4.  Note that the matching process finds the entry in the look-up file which matches the longest string in the number being tested, so the sequence of the entries above is not significant.

Step 5: Create and Maintain the Phone Number look-up list

Typically you would create an initial list from any existing data you have for destination numbers based on successful transmissions and your knowledge of the capabilities of each of your fax nodes.

You should also set up a review procedure to keep the list up-to-date as you gain practical experience of the way this technique operates.

Copia also plans to create a sample set of post-process infoboxes which will extract data from successful and failed calls.  This will enable the creation of an automatic feedback loop which should gradually improved both delivery success rates and system throughput.  This will be the subject of a separate Examples subtopic.