! HylaFAX (tm) Dialing String Processing Rules.
!
! This file describes how to process user-specified dialing strings
-! to create two items:
+! to create three items:
!
! CanonicalNumber: a unique string that is derived from all dialing
! strings to the same destination phone number. This string is used
! telephone. This string should be void of any characters that might
! confuse the modem.
!
+! DisplayNumber: the external, displayable, form of a number that
+! does not include private information which should not be displayed
+! to clients.
+!
Area=${AreaCode} ! local area code
Country=${CountryCode} ! local country code
IDPrefix=${InternationalPrefix} ! prefix for placing an international call
^[+]${Country} = ${LDPrefix} ! long distance call
^[+] = ${IDPrefix} ! international call
]
+!
+! Strip private information from the dial string which should not be
+! displayed to clients. By default, DisplayNumber is not set.
+!
+! DisplayNumber := [
+! ]
* destination phone number.
*/
job.dest = canonicalizePhoneNumber(req.number);
+ req.external = externalizePhoneNumber(req.number);
if (job.dest == "") {
if (req.external == "") // NB: for notification logic
req.external = req.number;
return ds;
}
+/*
+ * Convert a dialstring to an external format.
+ */
+fxStr
+faxQueueApp::externalizePhoneNumber(const fxStr& ds)
+{
+ if (dialRules)
+ return dialRules->displayNumber(ds);
+ else
+ return ds;
+}
+
/*
* Create an appropriate UUCP lock instance.
*/
void configTrace(const char* fmt, ...);
void setDialRules(const char* name);
fxStr canonicalizePhoneNumber(const fxStr& ds);
+ fxStr externalizePhoneNumber(const fxStr& ds);
// modem support
void scanForModems();
bool assignModem(Job& job, const DestControlInfo&);
A dial string specifies how to dial the telephone in order to
reach a destination facsimile machine, or similar device.
This string is supplied by a user with each outgoing facsimile job.
-User-supplied dial strings need to be processed in two ways by the
+User-supplied dial strings need to be processed in three ways by the
\*(Fx server processes:
to craft a canonical phone number for use in locating the
-receiver's capabilities, and
-to process into a form suitable for sending to a modem.
-In addition client applications may need to process a dial string
+receiver's capabilities,
+to process into a form suitable for sending to a modem, and
to formulate an external form that does not include private information
such as a credit card access code.
+In addition, client applications may also need to process a dial string
+to formulate an external form.
Phone number canonicalization and dial string preparation
are done according to
.I "dial string processing rules"