1JOBCONTROL(8C)                                                  JOBCONTROL(8C)
2
3
4

NAME

6       jobcontrols - per-job controls for HylaFAX servers
7

DESCRIPTION

9       The  HylaFAX configuration parameter JobControlCmd specifies the script
10       that is used to apply per-job controls on job characteristics  such  as
11       the time-of-day to place a call.
12
13       The  controls  program  is  passed  the respective job ID number as the
14       first and only argument.
15
16       The controls program should produce a simple  line-based  ASCII  output
17       containing a series of records of the form:
18              param: value
19       which is parsed the same manner as all HylaFAX config files.  Parameter
20       values are parsed exactly as specified in hylafax-config(5F); i.e. val‐
21       ues with embedded whitespace may be enclosed in quote marks (``"'').
22
23       All output on a line following a ``#'' character is ignored.
24
25       The  output order is important.  The last parameter value in the output
26       overrides any previous values in the output.  Otherwise a default value
27       is used from the faxq configuration file.
28
29       The  following  parameters  may  be  output on a per-job basis; consult
30       hylafax-config(5F) for a description of each parameter  (except  Modem,
31       Priority, and RejectNotice which are described below).
32       Tag                   Type       Default      Description
33       MaxConcurrentCalls    integer    1            max concurrent jobs to process for a destination
34       MaxDials              integer    unlimited    max phone calls to make to transmit a job
35       MaxSendPages          integer    unlimited    max pages to permit in a send
36       MaxTries              integer    3            max attempts to transmit a job
37       Modem                 string     Any          ModemGroup to use for destination
38       Notify                string     -            notification override for job
39       PageSize              string     -            page size to use for job
40       Priority              integer    -            priority to use for job
41       Proxy                 string     -            proxy server to which the job should be delivered
42       ProxyUser             string     -            authentication username for the proxy server
43       ProxyPass             string     -            authentication password for the proxy server
44       ProxyMailbox          string     -            E-Mail address for job notification
45       ProxyNotification     string     none         notification request
46       ProxyJobTag           string     see below    jobtag for proxy job
47       ProxyLogMode          octal      0600         protection to use for logs retrieved from proxy server
48       ProxyTaglineFormat    string     -            impose tagline format for proxy job
49       ProxyTries            integer    -1           number of tries proxy should attempt
50       ProxyTSI              string     -            impose TSI for proxy job
51       ProxyDials            integer    -1           number of dials proxy should attempt
52       ProxyReconnects       integer    5            number of reconnections to proxy for any job submisison
53       RejectNotice          string     -            rejection notice for transmit job
54       RewriteFaxname        string     -            replace faxname in job request with this
55       RewriteFaxnumber      string     -            replace faxnumber in job request with this
56       TimeOfDay             string     Any          default time-of-day restrictions
57       VRes                  integer    -            Vertical resolution
58       UseXVRes              integer    -            Usage of extended resolutions
59       UseColor              integer    -            Usage of color
60
61       The  Modem parameter controls which ModemGroup is used in sending faxes
62       to the destination.  If the user assigns a ModemGroup for a  job  where
63       there  are  no common modems between that ModemGroup and the ModemGroup
64       assigned here by JobControlCmd, then the JobControlCmd value  of  Modem
65       is  overridden by the user's ModemGroup.  Likewise, if the user assigns
66       a ModemGroup for a specific job where some, but not all, of the  modems
67       are  included in this ModemGroup matching a destination, then the value
68       of Modem is overridden by the inclusive set of modems found in both.
69
70       The Notify  parameter  allows  an  override  of  whatever  notification
71       request the client requested in the job.  Options are ``none'',  ``when
72       requeued'', ``when done'', and ``when done+requeued''.
73
74       The PageSize parameter controls the page size for the job.  This  over‐
75       rides any page size requested by the submitter.  Page sizes are defined
76       in the pagesizes(5F) database.
77
78       The Priority parameter controls the priority  to  assign  to  the  job.
79       This overrides any priority requested by the submitter.
80
81       The  Proxy parameter controls to which host the job should be delivered
82       for transmission.  This should be a hostname  or  IP  address  and  may
83       include  the  modem  group  name  when formatted as the host option for
84       sendfax(1).  The proxy server should have login  access  permitted  for
85       the  originating  server  without a password if ProxyUser and ProxyPass
86       are not also provided.  Caution: actions such as job  removal  and  job
87       modification  (such  as those done by faxrm(1) or faxalter(1)) will not
88       currently propagate to the proxy and is a matter  for  future  develop‐
89       ment.   Therefore,  such  actions  should  be  made on the proxy server
90       directly.
91
92       The ProxyMailbox and ProxyNotification identify the e-mail address  and
93       the  notification mechanism for the proxied job.  (This does not change
94       the e-mail address or the notification mechanism  for  the  originating
95       job.)
96
97       The  ProxyJobTag  sets  the jobtag for the job on the proxy server.  By
98       default this is the jobid for the originating job.
99
100       The ProxyLogMode parameter specifies  the  file  mode  protection  that
101       should  be  used  for  the  logs that are able to be retrieved from the
102       proxy server.  (In order to retrieve logs the proxy server must  permit
103       it.)
104
105       The ProxyTaglineFormat sets the tagline format for the job on the proxy
106       server.  By default this is whatever was specified by the client.
107
108       The ProxyTries and ProxyDials parameters specify the number of  respec‐
109       tive  attempts  that  the proxy server should make.  The default is -1,
110       and any value less than 1 indicates that the  proxy  server  should  be
111       delegated all remaining attempts.
112
113       The  ProxyTSI sets the TSI for the job on the proxy server.  By default
114       this is whatever was specified by the client.
115
116       The ProxyReconnects parameter specifies  the  number  of  reconnections
117       that  should  be made to the proxy server in the event that the network
118       connection is lost.  Attempts are made no sooner than 60 seconds apart,
119       so to tolerate a network outage of 30 minutes ProxyReconnects should be
120       set to ``30'' or higher.
121
122       The RejectNotice parameter controls whether or not to  reject  jobs  to
123       the  destination.  Jobs that are rejected are done so without placing a
124       phone call and the associated message is returned to the job submitter.
125       This  facility can be used to disallow calling sensitive phone numbers;
126       for example
127           RejectNotice: "Calls to emergency numbers are not permitted"
128
129       The RewriteFaxname and RewriteFaxnumber  parameters  allow  the  ``fax‐
130       name''  and  ``faxnumber''  parameters  in  the  job request file to be
131       replaced and rewritten with the given values.
132
133       The VRes parameter controls the vertical  resolution.  Possible  values
134       are  98  (normal  resolution,  equivalent to sendfax -l option) and 196
135       (fine resolution, equivalent to sendfax -m option).
136
137       The UseColor parameter is used to enable or disable the usage of  color
138       as  supported  by  the  receiver.  Possible  values are 1 (enable color
139       usage, equivalent to sendfax -O usecolor:yes  option)  and  0  (disable
140       color   usage).   This  parameter  may  be  used  in  conjunction  with
141       DesiredDF: 6 in order to abort fax transmission if  the  receiver  does
142       not support color facsimile.
143
144       The  UseXVRes  parameter  is  used  to  enable  or disable the usage of
145       extended resolutions supported by the receiver. Possible values  are  1
146       (enable  extended  resolutions  usage, equivalent to sendfax -G option)
147       and 0 (disable extended resolutions usage).  This parameter  supersedes
148       the usage of VRes.
149
150       In  addition  to  the  above  parameters, any other parameters that are
151       specified are automatically accumulated and passed to programs  invoked
152       by  faxq,  such  as faxsend and pagesend.  (Note that in a batched-jobs
153       instance that these parameters will apply to all jobs  in  the  batch.)
154       This  is  a  convenient mechanism for defining configuration parameters
155       for all modems without having to modify each modem-specific  configura‐
156       tion file.  For example,
157           SessionTracing: 0x4f
158
159       This  mechanism  also makes it easy to control transmit-related parame‐
160       ters according to the destination phone number.  For example,  to  dis‐
161       able  use  of ECM and restrict the transmit speed when placing interna‐
162       tional phone calls one might use:
163           DesiredBR: 3
164           DesiredEC: 0
165           DesiredDF: 1
166

EXAMPLES

168       Change (overlap) MaxDials parameter to 3 for all outgoing calls.
169
170       1. Create file bin/jobcontrol with the following content:
171          #!/bin/sh
172          echo "MaxDials:
173          exit 0
174
175       2. Ensure that bin/jobcontrol is marked as executable:
176           chmod +x bin/jobcontrol
177
178       3. Add  parameter  JobControlCmd  to  hylafax-config(5F);  (etc/config)
179       file:
180           JobControlCmd: bin/jobcontrol
181
182       The controls program will likely need to refer to the sendq file corre‐
183       sponding to the job in order to obtain information such as  the  number
184       being  dialed, the job owner, or the number of send attempts.  For this
185       purpose the parseQfile function has been placed in bin/common-functions
186       to assist in this.  For example:
187
188           #!/bin/sh
189           . etc/setup.cache
190           . bin/common-functions
191           QFILE=sendq/q$1
192           SetupPrivateTmp
193           parseQfile
194           case "$number-$owner-$tottries" in
195               5551212-lee-3) echo "Class1ECMSupport: no";;
196               *-sam-*) echo "LocalIdentifier: +1.800.555.1212";;
197               911-*) echo "RejectNotice: \"Calls to 911 are not permitted\"";;
198           esac
199           exit 0
200
201

NOTES

203       JobControlCmd  is  run  each  time  the  job  moves  into the run-queue
204       ("READY" state), and all output is effective on each instance.  If  the
205       administrator wishes to vary output based on the attempt sequence, then
206       the q-file values should be consulted  in  the  process.   Furthermore,
207       blind  usage of options such as Priority could be confusing as it would
208       essentially prevent a job from increasing or decreasing in job priority
209       as usually expected after call attempts.
210

SEE ALSO

212       faxq(8C), hylafax-config(5F), re_format(7).
213
214
215
216                                 Mar 27, 2006                   JOBCONTROL(8C)
Impressum