#define FAX_REQBUSY (3*60) /* requeue interval on busy answer */
#define FAX_REQPROTO (1*60) /* requeue interval on protocol error */
#define FAX_REQUEUE (5*60) /* requeue interval on other */
+#define FAX_RETBUSY (u_int)-1 /* retry maximum on busy answer */
+#define FAX_RETRY (u_int)-1 /* retry maximum for others */
#define FAX_RETRIES 3 /* number times to retry send */
#define FAX_REDIALS 12 /* number times to dial phone */
#define FAX_TIMEOUT "now + 3 hours" /* default job timeout (at syntax) */
fax.ndials++; // number of consecutive failed calls
fax.totdials++; // total attempted calls
switch (callstat) {
+ case ClassModem::NOFCON: // carrier seen, but handshake failed
+ clientInfo.setCalledBefore(true);
+ /* fall thru... */
+ case ClassModem::DATACONN: // data connection established
case ClassModem::NOCARRIER: // no carrier detected on remote side
- /*
- * Since some modems can not distinguish between ``No Carrier''
- * and ``No Answer'' we offer this configurable hack whereby
- * we'll retry the job <n> times in the face of ``No Carrier''
- * dialing errors; if we've never previously reached a facsimile
- * machine at that number. This should not be used except if
- * the modem is incapable of distinguishing betwee ``No Carrier''
- * and ``No Answer''.
- */
- if (!clientInfo.getCalledBefore() && fax.ndials > noCarrierRetrys)
+ case ClassModem::BUSY: // busy signal
+ case ClassModem::NOANSWER: // no answer or ring back
+ if (!clientInfo.getCalledBefore() && fax.ndials > retryMAX[callstat])
sendFailed(fax, send_failed, notice);
else if (fax.retrytime != 0)
sendFailed(fax, send_retry, notice, fax.retrytime);
case ClassModem::NODIALTONE: // no local dialtone, possibly unplugged
case ClassModem::ERROR: // modem might just need to be reset
case ClassModem::FAILURE: // modem returned something unexpected
- sendFailed(fax, send_retry, notice, requeueTTS[callstat]);
- break;
- case ClassModem::NOFCON: // carrier seen, but handshake failed
- case ClassModem::DATACONN: // data connection established
- clientInfo.setCalledBefore(true);
- /* fall thru... */
- case ClassModem::BUSY: // busy signal
- case ClassModem::NOANSWER: // no answer or ring back
- if (fax.retrytime != 0)
- sendFailed(fax, send_retry, notice, fax.retrytime);
+ if (!clientInfo.getCalledBefore() && fax.ndials > retryMAX[callstat])
+ sendFailed(fax, send_failed, notice);
else
sendFailed(fax, send_retry, notice, requeueTTS[callstat]);
- /* fall thru... */
+ break;
case ClassModem::OK: // call was aborted by user
break;
}
{ "sessiontracing", &ServerConfig::logTracingLevel, FAXTRACE_SERVER },
{ "servertracing", &ServerConfig::tracingLevel, FAXTRACE_SERVER },
{ "uucplocktimeout", &ServerConfig::uucpLockTimeout, 0 },
-{ "nocarrierretrys", &ServerConfig::noCarrierRetrys, 1 },
{ "jobreqproto", &ServerConfig::requeueProto, FAX_REQPROTO },
{ "jobreqother", &ServerConfig::requeueOther, FAX_REQUEUE },
+{ "jobretryother", &ServerConfig::retryOther, FAX_RETRY },
{ "pollmodemwait", &ServerConfig::pollModemWait, 30 },
{ "polllockwait", &ServerConfig::pollLockWait, 30 },
{ "maxrecvpages", &ServerConfig::maxRecvPages, (u_int) -1 },
requeueTTS[ClassModem::NOFCON] = FAX_REQUEUE;
requeueTTS[ClassModem::DATACONN] = FAX_REQUEUE;
+
+ retryMAX[ClassModem::OK] = 0;
+ retryMAX[ClassModem::BUSY] = FAX_RETBUSY;
+ retryMAX[ClassModem::NOCARRIER] = FAX_RETRY;
+ retryMAX[ClassModem::NOANSWER] = FAX_RETRY;
+ retryMAX[ClassModem::NODIALTONE] = FAX_RETRY;
+ retryMAX[ClassModem::ERROR] = FAX_RETRY;
+ retryMAX[ClassModem::FAILURE] = FAX_RETRY;
+ retryMAX[ClassModem::NOFCON] = FAX_RETRY;
+ retryMAX[ClassModem::DATACONN] = FAX_RETRY;
+
localIdentifier = "";
delete dialRules, dialRules = NULL;
}
requeueTTS[ClassModem::NOFCON] = getNumber(value);
else if (streq(tag, "jobreqdataconn"))
requeueTTS[ClassModem::DATACONN] = getNumber(value);
+ else if (streq(tag, "nocarrierretrys"))
+ retryMAX[ClassModem::NOCARRIER] = getNumber(value);
+ else if (streq(tag, "jobretrybusy"))
+ retryMAX[ClassModem::BUSY] = getNumber(value);
+ else if (streq(tag, "jobretrynocarrier"))
+ retryMAX[ClassModem::NOCARRIER] = getNumber(value);
+ else if (streq(tag, "jobretrynoanswer"))
+ retryMAX[ClassModem::NOANSWER] = getNumber(value);
+ else if (streq(tag, "jobretrynofcon"))
+ retryMAX[ClassModem::NOFCON] = getNumber(value);
+ else if (streq(tag, "jobretrydataconn"))
+ retryMAX[ClassModem::DATACONN] = getNumber(value);
else
return ModemConfig::setConfigItem(tag, value);
return (true);
SpeakerVolume speakerVolume; // volume control
fxStr qualifyTSI; // if set, no recv w/o acceptable tsi
fxStr qualifyPWD; // if set, no recv w/o acceptable PWD
- u_int noCarrierRetrys; // # times to retry on no carrier
mode_t recvFileMode; // protection mode for received files
mode_t deviceMode; // protection mode for modem device
mode_t logMode; // protection mode for log files
u_int requeueTTS[9]; // requeue intervals[CallStatus code]
u_int requeueProto; // requeue interval after protocol error
u_int requeueOther; // requeue interval after other problem
+ u_int retryMAX[9]; // number of retries[CallStatus code]
+ u_int retryOther; // number of retries after other problem
u_int pollModemWait; // polling interval in modem wait state
u_int pollLockWait; // polling interval in lock wait state
u_int maxRecvPages; // max pages to accept on receive
* the modem is incapable of distinguishing between
* ``No Carrier'' and ``No Answer''.
*/
- if (!info.getCalledBefore() && req.ndials > noCarrierRetrys) {
+ if (!info.getCalledBefore() && req.ndials > retryMAX[callstat]) {
sendFailed(req, send_failed, notice);
break;
}
JobReqNoFCon integer \s-1300\s+1 requeue interval for carrier without \s-1+FCON\s+1 dial result
JobReqOther\(S2 integer \s-1300\s+1 requeue interval for ``other'' problems
JobReqProto integer \s-160\s+1 requeue interval after fax protocol error
+JobRetryBusy integer \- number of retries for \s-1BUSY\s+1 dial result
+JobRetryDataConn integer \- number of retries for data connection dial result
+JobRetryNoAnswer integer \- number of retries for \s-1NO ANSWER\s+1 dial result
+JobRetryNoCarrier integer \- number of retries for \s-1NO CARRIER\s+1 dial result
+JobRetryOther integer \- number of retries for ``other'' problems
LockDataCalls boolean \s-1Yes\s+1 lock modem for the duration of an inbound data call
LockVoiceCalls boolean \s-1Yes\s+1 lock modem for the duration of an inbound voice call
LogCalls boolean \s-1Yes\s+1 Log all incoming calls as CALL records in xferfaxlog
.B JobReqOther\(S2
The delay in seconds to wait before retrying a job that
failed for a reason not already covered by one of the
-.B Job*
+.B JobReq*
parameters.
.TP
.B JobReqProto
The delay in seconds to wait before retrying a facsimile job that
failed because of a fax protocol error.
.TP
+.B JobRetryBusy
+The number of times to redial a phone number after receiving
+a ``\s-1BUSY\s+1'' result code when the number has not
+been successfully dialed before.
+.TP
+.B JobRetryDataConn
+The number of times to redial a phone number after the
+dialing attempt failed because a data modem answered the phone when
+the number has not been successfully dialed before.
+.TP
+.B JobRetryNoAnswer
+The number of times to redial a phone number after the
+dialing attempt failed because of NO ANSWER when
+the number has not been successfully dialed before.
+.TP
+.B JobRetryNoCarrier
+The number of times to redial a phone number after the
+dialing attempt failed because of NO ANSWER when
+the number has not been successfully dialed before.
+In normal operation the fax server will treat this result code
+to mean that a facsimile modem/machine did not answer the
+phone and reject the transmit job.
+This is done to avoid repeatedly dialing wrong phone numbers
+and depends on the modem distinguishing between
+no carrier and no answer.
+However, some modems are not capable of reliably
+distinguishing between no carrier and no answer, or when instructed
+to do so do not identify a busy signal correctly.
+For these modems one may find it necessary to increase the
+value of this parameter to compensate.
+It is strongly recommended, however, that this value
+not be set to a large number.
+.TP
+.B JobRetryOther
+The number of times to redial a phone number after the
+dialing attempt failed for a reason not already covered
+by one of the other JobRetry* parameters when
+the number has not been successfully dialed before.
+.TP
.B GettyArgs
A string that indicates whether or not the server should invoke
the
).
.TP
.B NoCarrierRetrys
-The number of times to redial a phone number after receiving
-a ``\s-1NO CARRIER\s+1'' result code when the number has not
-been successfully dialed before.
-In normal operation the fax server will treat this result code
-to mean that a facsimile modem/machine did not answer the
-phone and reject the transmit job.
-This is done to avoid repeatedly dialing wrong phone numbers
-and depends on the modem distinguishing between
-no carrier and no answer.
-However, some modems are not capable of reliably
-distinguishing between no carrier and no answer, or when instructed
-to do so do not identify a busy signal correctly.
-For these modems one may find it necessary to increase the
-value of this parameter to compensate.
-It is strongly recommended, however, that this value
-not be set to a large number.
+This is mapped onto \s-1JobRetryNoCarrier\1+1
.TP
.B ModemReadyState
Define the