Changelog for HylaFAX
+* add remoteNSF, remoteDIS to info files and return
+ CSI and interpreted NSF with notify information (4 May 2005)
* improved disconnection detection (25, 26 Apr 2005)
* wait longer for partial-page signals (19 Apr 2005)
* adjust the timing of input buffering enabling (15 Apr 2005)
: FaxConfig(other)
, file(other.file)
, csi(other.csi)
+ , nsf(other.nsf)
+ , dis(other.dis)
, lastSendFailure(other.lastSendFailure)
, lastDialFailure(other.lastDialFailure)
, pagerPassword(other.pagerPassword)
dialFailures = getNumber(value);
} else if (streq(tag, "remotecsi")) {
csi = value;
+ } else if (streq(tag, "remotensf")) {
+ nsf = value;
+ } else if (streq(tag, "remotedis")) {
+ dis = value;
} else if (streq(tag, "lastsendfailure")) {
lastSendFailure = value;
} else if (streq(tag, "lastdialfailure")) {
void FaxMachineInfo::setCSI(const fxStr& v)
{ checkChanged(csi, v); }
+void FaxMachineInfo::setNSF(const fxStr& v)
+ { checkChanged(nsf, v); }
+void FaxMachineInfo::setDIS(const fxStr& v)
+ { checkChanged(dis, v); }
void FaxMachineInfo::setLastSendFailure(const fxStr& v)
{ checkChanged(lastSendFailure, v); }
void FaxMachineInfo::setLastDialFailure(const fxStr& v)
putString(buf, "minScanlineTime", isLocked(ST),
stnames[fxmin(minScanlineTime, ST_40MS)]);
putString(buf, "remoteCSI", false, csi);
+ putString(buf, "remoteNSF", false, nsf);
+ putString(buf, "remoteDIS", false, dis);
putDecimal(buf, "sendFailures", false, sendFailures);
putIfString(buf, "lastSendFailure", false, lastSendFailure);
putDecimal(buf, "dialFailures", false, dialFailures);
u_short maxSignallingRate; // max capable signalling rate
u_short minScanlineTime; // min scanline time capable
fxStr csi; // last received CSI
+ fxStr nsf; // last received NSF
+ fxStr dis; // last received DIS
int sendFailures; // count of failed send attempts
int dialFailures; // count of failed dial attempts
fxStr lastSendFailure; // reason for last failed send attempt
u_short getMaxSignallingRate() const;
u_short getMinScanlineTime() const;
const fxStr& getCSI() const;
+ const fxStr& getNSF() const;
+ const fxStr& getDIS() const;
int getSendFailures() const;
int getDialFailures() const;
void setMaxSignallingRate(int);
void setMinScanlineTime(int);
void setCSI(const fxStr&);
+ void setNSF(const fxStr&);
+ void setDIS(const fxStr&);
void setSendFailures(int);
void setDialFailures(int);
{ return minScanlineTime; }
inline const fxStr& FaxMachineInfo::getCSI() const
{ return csi; }
+inline const fxStr& FaxMachineInfo::getNSF() const
+ { return nsf; }
+inline const fxStr& FaxMachineInfo::getDIS() const
+ { return dis; }
inline int FaxMachineInfo::getSendFailures() const
{ return sendFailures; }
usexvres = false;
pagechop = chop_default;
chopthreshold = -1;
+ csi = fxStr::null;
+ nsf = fxStr::null;
notify = no_notice;
jobtype = "facsimile"; // for compatibility w/ old clients
writeQFilePid = 0;
{ "passwd", &FaxRequest::passwd },
{ "doneop", &FaxRequest::doneop },
{ "commid", &FaxRequest::commid },
+ { "csi", &FaxRequest::csi },
+ { "nsf", &FaxRequest::nsf },
};
FaxRequest::shortval FaxRequest::shortvals[] = {
{ "state", &FaxRequest::state },
case H_NOTIFY: checkNotifyValue(tag); break;
case H_PAGECHOP: checkChopValue(tag); break;
case H_CHOPTHRESHOLD: chopthreshold = atof(tag); break;
+ case H_CSI: csi = tag; break;
+ case H_NSF: nsf = tag; break;
case H_DONEOP: doneop = tag; break;
case H_STATUS:
/*
fxStr jobtype; // job type for selecting send command
fxStr tagline; // tag line format
fxStr doneop; // operation to do when job completes
+ fxStr csi; // CSI string from receiving equipment (ASCII representation)
+ fxStr nsf; // NSF string from receiving equipment (ASCII representation)
pid_t writeQFilePid; // pid of last writeQFile operation
FaxItemArray items; // set of requests
if (status != send_ok) {
sendFailed(fax, status, notice, requeueProto);
} else {
+ // CSI
fxStr csi("<UNSPECIFIED>");
(void) modem->getSendCSI(csi);
clientInfo.setCSI(csi); // record remote CSI
+ fax.csi = csi; // store in queue file also for notify
+
+ // NSF
+ NSF nsf;
+ (void) modem->getSendNSF(nsf);
+ clientInfo.setNSF(nsf.getHexNsf()); // record remote NSF
+ fax.nsf = fxStr::format("Equipment:%s %s:Station:%s", nsf.getVendor(), nsf.getModel(), nsf.getStationId());
+
+ // DIS
+ fxStr clientdis;
+ clientCapabilities.asciiEncode(clientdis);
+ clientInfo.setDIS(clientdis);
+
if (!sendClientCapabilitiesOK(fax, clientInfo, notice)) {
// NB: mark job completed 'cuz there's no way recover
sendFailed(fax, send_failed, notice);
hash("notify");
hash("pagechop");
hash("chopthreshold");
+ hash("csi");
+ hash("nsf");
hash("status");
hash("returned");
hash("doneop");
pageSource string parameter to tell the paging central who we are
pagingProtocol string protocol (IXO or UCP) for this provider
remoteCSI string remote device Called Subscriber Identification
+remoteNSF string remote equipment Non-Standard Facilities information
+remoteDIS string remote Digital Identification Signal: capabilities
sendFailures number count of consecutive failed send attempts
supportsBatching boolean accepts batching protocol
supportsHighRes boolean accepts 196 line/inch images (obsolete)
doneop = "default";
pagernum = "unknown";
commid = "";
+ csi = "";
+ equipment = "";
+ station = "";
}
+ /^csi/ { p("csi",$2); }
+ /^nsf/ { p("equipment",$3); }
+ /^nsf/ { p("station",$5); }
/^jobid/ { p("jobid",$2); }
/^groupid/ { p("groupid", $2); }
/^state/ { p("state", $2+0); }
FMT="$1"
TAG="$2"
VALUE="$3"
- printf "%14s: $FMT\n" "$TAG" "$VALUE"
+ printf "%16s: $FMT\n" "$TAG" "$VALUE"
}
echo "";
if [ "$jobtype" = "facsimile" ] ; then
printItem "%u" "Pages" "$npages"
+ printItem "%s" "Receiver" "$csi"
if [ "$RETURNTECHINFO" = "yes" ] ; then
if [ "$resolution" = "196" ] ; then
printItem "%s" "Quality" "Fine"
printItem "%.0f (mm)" "Page Length" "$pagelength"
printItem "%s" "Signal Rate" "$signalrate"
printItem "%s" "Data Format" "$dataformat"
+ printItem "%s" "Remote Equipment" "$equipment"
+ printItem "%s" "Remote Station" "$station"
fi
fi
if [ "$RETURNTECHINFO" = "yes" ] ; then