Please enable JavaScript to view this site.

CopiaFacts™ Reference Manual

Determine Valid Phone Numbers for all Outbound Calls

$phone_mask chan action mask [output_string]

The $phone_mask command in the configuration file allows you to control the allowable outbound call area and optional dialing prefixes and suffixes for your phone system, and to select which channels and phone lines are to be used for specific telephone number types. If the number is acceptable, you use the output string to convert it to either an intermediate string for further checks or to a dialing sequence for your phone system.

Phone masks which define a number mask to be rejected on 'all channels' can be added to exclusion search tree which can be scanned faster than the default of sequential matching of phone mask entries. For more information see the phone mask examples topic.

The parameters on this command are used as follows:

chan the channel number or channel group(s) affected, or * for all channels. The * entries are processed at call time after any user profile phone masks, as well as at the time of sending the fax.
action determines restriction or processing. You can specify either the code letter or the keyword:
c | convert convert phone numbers matched to mask, using output-string, for further phone-mask processing.
+ | accept accept phone number. For special purposes, the symbol + may be followed by a numeric TOSEND queue number (from 0 to the maximum queue number) which qualifies the mask as applying only to items in this queue number.
- | reject reject phone number. For special purposes, the symbol - may be followed by a numeric TOSEND queue number (from 0 to the maximum queue number) which qualifies the mask as applying only to items in this queue number.
~ | decline decline phone number for this channel. For special purposes, the symbol ~ may be followed by a numeric TOSEND queue number (from 0 to the maximum queue number) which qualifies the mask as applying only to items in this queue number.  For SMS job items processed from an MSMQ launch, this action is equivalent to a reject action, since the queue item cannot be processed by a line other than the one which has removed it from the queue.
$ | tollfreeaccept phone number and mark this number as toll-free.  For special purposes, the symbol $ may be followed by a numeric TOSEND queue number (from 0 to the maximum queue number) which qualifies the mask as applying only to items in this queue number.  Toll-free numbers use the special outbound ANI defined by $outbound_tf_ani or OB_TF_ANI.
mask pattern used to match the phone number as follows:
(0 .. 9, comma) match actual digits of supplied phone number
X match any numeric digit, or a comma, of supplied phone number
* match all remaining digits, or commas, in supplied phone number (only valid at end of mask).
output-string pattern used to convert phone number.  Apart from the last two entries, special codes and symbols apply only to the boards indicated and only when these are connected to analog phone lines. The available pattern characters are as follows:
(0 .. 9) digit to be used in next match
X digit of supplied phone number
* (at end, with a * at the end of mask) remaining digits of supplied phone number (otherwise * is dialed)
P leading P: pulse dial
T leading T: tone dial
W following T or P: wait for dial tone
, wait 2 seconds (Dialogic), 1 second (Brooktrout)
; wait 5 seconds (Brooktrout)
$ (not at end) hook flash (Brooktrout)
@ insert code from $phone_account or from system variable PHONE_ACCOUNT. This code may be used either once or twice in the string.  It is affected by the setting of the $macro_char command.  This special code is also used for placing SIP calls, see the example in the description of the $phone_account command.
|vertical bar separator character: commas and digits following this character respectively cause delays and generated DTMF in-band tones after the dial operation has been completed on an analog or digital line or on a SIP port. Commas and further vertical-bar characters which immediately follow the separator character cause one-second delays, and any following digits 0 to 9 cause DTMF tones to be generated in-band.  In-band delays and DTMF can also be specified on a $fax_phone command using the same syntax.

The output-string parameter is required on accept and convert commands and must not be specified on reject and decline commands. It is ignored on accept commands at call time and is only used when the fax is ready to be sent. It is always used on convert commands.

When an FS file is ready to send, CopiaFacts checks all currently free outbound channels in turn against the configuration-file phone mask list. The first match (on channel and phone mask) is processed as follows depending on the access code:

~ no further testing is done for the current channel and processing moves to the next free outbound channel, unless the ~ appears on an all lines (*) command, in which case processing moves to the next FS file, if any.
- the FS file is moved to FAIL with status code 63.
+ CopiaFacts sends the fax on the selected channel.

If no matches occur, processing moves to the next FS file, if any. Phone mask entries are processed in the sequence that they appear in the configuration file.

Default: all phone numbers valid if no masks specified

Examples:

$phone_mask * reject 900XXXXXXX ; no 900 numbers

$phone_mask * reject 0891* ; reject numbers of any length with this prefix