! long distance and/or international dialing.
!
CanonicalNumber := [
-#.* = ! strip calling card stuff
+%.* = ! strip calling card stuff
[abcABC] = 2 ! these convert alpha to numbers
[defDEF] = 3
[ghiGHI] = 4
! long distance and/or international dialing.
!
CanonicalNumber := [
-#.* = ! strip calling card stuff
+%.* = ! strip calling card stuff
[abcABC] = 2 ! these convert alpha to numbers
[defDEF] = 3
[ghiGHI] = 4
! long distance and/or international dialing.
!
CanonicalNumber := [
-#.* = ! strip calling card stuff
+%.* = ! strip calling card stuff
[abcABC] = 2 ! these convert alpha to numbers
[defDEF] = 3
[ghiGHI] = 4
void
Class1Modem::encodePWD(fxStr& binary, const fxStr& ascii)
{
- u_int n = fxmin(ascii.length(), (u_int) 20);
- binary.resize(n);
- for (u_int i = 0, j = n-1; i < n; i++, j--)
- binary[j] = frameRev[ascii[i]];
+ encodeTSI(binary, ascii);
}
/*
const fxStr&
Class1Modem::decodePWD(fxStr& ascii, const HDLCFrame& binary)
{
- u_int n = fxmin(binary.getFrameDataLength(), (u_int) 20);
- ascii.resize(n);
- u_int d = 0;
- for (const u_char* cp = binary.getFrameData() + n-1; n > 0; cp--, n--) {
- u_char c = frameRev[*cp];
- if (isprint(c) || c == ' ') // XXX accept only printable ascii
- ascii[d++] = c;
- }
- return ascii;
+ return decodeTSI(ascii, binary);
}
/*
void
Class1Modem::sendSetupPhaseB(const fxStr& p, const fxStr& s)
{
- if (xinfo&DIS_PWD)
+ if (p != fxStr::null && xinfo&DIS_PWD)
encodePWD(pwd, p);
else
pwd = fxStr::null;
- if (xinfo&DIS_SUB)
+ if (p != fxStr::null && xinfo&DIS_SUB)
encodePWD(sub, s);
else
sub = fxStr::null;
!
CanonicalNumber := [
.ta \w'^${LDPrefix} 'u +\w'= 'u +\w'+${Country}${Area}& 'u
-#.* = ! strip calling card stuff
+%.* = ! strip calling card stuff
[abcABC] = 2 ! these convert alpha to numbers
[defDEF] = 3
[ghiGHI] = 4
.RE
.fi
.sp .5
-The first rule simply strips anything following a ``#''; this
+The first rule simply strips anything following a ``%''; this
will remove any calling card-related information.
The next eight rules convert upper and lower case alphabetics to the
equivalent key numbers (this is convenient for users that use
.fi
.sp .5
then if the above set of rules is applied
-to ``01123965-Tube#2345'', the transformations would be:
+to ``01123965-Tube%2345'', the transformations would be:
.sp .5
.nf
.ta \w'01123965-Tube#2345 'u +\w'01123965-7824 'u
.RS
-01123965-Tube#2345 01123965-Tube ! strip calling card stuff
+01123965-Tube%2345 01123965-Tube ! strip calling card stuff
01123965-Tube 01123965-8823 ! convert alphabetics
01123965-8823 011239658823 ! strip white space etc.
011239658823 +239658823 ! replace int. dialing code
435*) SENDTO=lee; FILETYPE=pdf;; # all faxes from area code 435
5059627777) SENDTO=amy; FILETYPE=tif;; # Amy wants faxes in TIFF
esac\s+1
+case "$SUBADDR" in
+53) SENDTO=FaxMaster;; # without double-notification
+roger) SENDTO=roger;; # possible text subaddressing
+esac\s+1
.ft R
.fi
.sp
controls the recipient of the received fax notification. It is
given as an e-mail address.
.TP
+.I SUBADDR
+the received subaddress value, communicated by the sender for
+post-reception routing purposes
+.TP
Other shell variables are available. Consult the faxrcvd script directly.
.SH FILES
.nf
A destination is the dialing string to use to contact
the remote fax machine.
Phone numbers may include non-alphanumeric characters for
-readability\(emonly alphanumerics and ``+'' (for denoting a
-country code) are significant in placing a call.
+readability\(emonly alphanumerics, ``+'' (for denoting a
+country code), and ``#'' (for denoting a subaddress)
+are significant in placing a call.
Alphabetic characters are automatically mapped to their numeric
key equivalents: ``abcABC'' to ``2'', ``defDEF'' to ``3'', etc.
Dialing prefixes, such as ``1'' and ``011''
.IR destination .
If the
.I destination
-is of the form ``\fIuser\fP@\fIphone-number\fP'' then any
-cover page will show \fIuser\fP as the intended receipient.
+is of the form ``\fIuser\fP@\fIphone-number\fP#\fIsubaddress\fP'' then any
+cover page will show \fIuser\fP as the intended receipient, and the
+remote system will be supplied the subaddress value (i.e. for routing)
+provided that the sending modem and the receiving system support it.
.TP 12
.B \-E
Disable use of the Error Correction Mode (\s-1ECM\s+1)
}
/*
- * Add a destination; parse ``person@number'' syntax.
+ * Add a destination; parse ``person@number#subaddress'' syntax.
+ * T.33 Appendix I suggests that ``#'' be used to tag a subaddress.
*/
void
sendFaxApp::addDestination(const char* cp)
{
+ fxStr subaddress;
+ size_t sublen = 0;
+ const char* ap = strchr(cp, '#');
+ if (ap) {
+ ap = ap+1;
+ subaddress = fxStr(ap);
+ sublen = strlen(subaddress) + 1;
+ } else {
+ subaddress = "";
+ }
fxStr recipient;
const char* tp = strchr(cp, '@');
if (tp) {
} else {
recipient = "";
}
- fxStr dest(cp);
+ fxStr dest(cp, strlen(cp) - sublen);
if (db && dest.length() > 0) {
fxStr name;
FaxDBRecord* r = db->find(dest, &name);
SendFaxJob& job = addJob();
job.setDialString(dest);
job.setCoverName(recipient);
+ job.setSubAddress(subaddress);
if(job.getDesiredSpeed() > BR_14400 && job.getDesiredEC() == false) {
printWarning("ECM disabled, limiting job to 14400 bps.");
job.setDesiredSpeed(BR_14400);
# Check the sender's TSI and setup to dispatch
# facsimile received from well-known senders.
#
+ SUBADDR="`$INFO $FILE | $AWK -F: '/SubAddr/ { print $2 }' 2>/dev/null`"
SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>/dev/null`"
SENDTO=
if [ -f etc/FaxDispatch ]; then