]> git.evergreen-ils.org Git - Evergreen.git/blob - docs/admin/sip_server.txt
LP#1684011: My Account summary ebook link correction
[Evergreen.git] / docs / admin / sip_server.txt
1 SIP Server
2 ----------
3
4 indexterm:[Automated Circulation System]
5 indexterm:[SelfCheck]
6 indexterm:[Automated Material Handling]
7
8 +SIP+, standing for +Standard Interchange Protocol+, was developed by the +3M corporation+ to be a common 
9 protocol for data transfer between ILS' (referred to in +SIP+ as an _ACS_, or _Automated Circulation System_)  and a 
10 third party device. Originally, the protocol was developed for use with _3M SelfCheck_ (often abbreviated SC, not to 
11 be confused with Staff Client) systems, but has since expanded to other companies and devices. It is now common 
12 to find +SIP+ in use in several other vendors' SelfCheck systems, as well as other non-SelfCheck devices. Some 
13 examples include:
14
15 * Patron Authentication (computer access, subscription databases) 
16 * Automated Material Handling (AMH) 
17 ** The automated sorting of items, often to bins or book carts, based on shelving location or other programmable 
18 criteria
19
20 Installing the SIP Server
21 ~~~~~~~~~~~~~~~~~~~~~~~~~
22
23
24
25 This is a rough intro to installing the +SIP+ server for Evergreen. 
26
27 Getting the code 
28 ^^^^^^^^^^^^^^^^
29
30 Current +SIP+ server code lives at in the Evergreen git repository:
31
32    cd /opt 
33    git clone git://git.evergreen-ils.org/SIPServer.git SIPServer 
34
35
36 Configuring the Server 
37 ^^^^^^^^^^^^^^^^^^^^^^
38
39 indexterm:[configuration files, oils_sip.xml]
40
41 . Type the following commands from the command prompt: 
42
43    $ sudo su opensrf 
44    $ cd /openils/conf 
45    $ cp oils_sip.xml.example oils_sip.xml 
46
47 . Edit oils_sip.xml. Change the commented out <server-params> section to this: 
48
49    <server-params
50       min_spare_servers='1' 
51       max_spare_servers='2' 
52       min_servers='3'
53       max_servers='25' 
54                 />
55
56 . max_servers will directly correspond to the number of allowed +SIP+ clients. Set the number accordingly, but 
57 bear in mind that too many connections can exhaust memory. On a 4G RAM/4 CPU server (that is also running 
58 evergreen), it is not recommended to exceed 100 +SIP+ client connections. 
59
60 Adding SIP Users
61 ^^^^^^^^^^^^^^^^
62
63 indexterm:[configuration files, oils_sip.xml]
64
65 . Type the following commands from the command prompt: 
66
67   $ sudo su opensrf 
68   $ cd /openils/conf
69
70 . In the +<accounts>+ section, add +SIP+ client login information. Make sure that all +<logins>+ use the same 
71 institution attribute, and make sure the institution is listed in +<institutions>+. All attributes in the 
72 +<login>+ section will be used by the +SIP+ client. 
73
74 . In Evergreen, create a new profile group called +SIP+. This group should be a sub-group of +Users+ (not +Staff+ 
75 or +Patrons+). Set _Editing Permission_ as *group_application.user.sip_client* and give the group the following 
76 permissions: 
77 +
78      COPY_CHECKIN 
79      COPY_CHECKOUT 
80      CREATE_PAYMENT
81      RENEW_CIRC 
82      VIEW_CIRCULATIONS 
83      VIEW_COPY_CHECKOUT_HISTORY 
84      VIEW_PERMIT_CHECKOUT 
85      VIEW_USER 
86      VIEW_USER_FINES_SUMMARY 
87      VIEW_USER_TRANSACTIONS 
88 +
89 OR use SQL like: 
90 +
91    
92    INSERT INTO permission.grp_tree (name,parent,description,application_perm) 
93    VALUES ('SIP', 1, 'SIP2 Client Systems', 'group_application.user.sip_client'); 
94   
95    INSERT INTO 
96      permission.grp_perm_map (grp, perm, depth, grantable) 
97    SELECT 
98      g.id, p.id, 0, FALSE 
99    FROM 
100      permission.grp_tree g, 
101      permission.perm_list p 
102    WHERE 
103      g.name = 'SIP' AND 
104      p.code IN ( 
105        'COPY_CHECKIN', 
106        'COPY_CHECKOUT', 
107        'RENEW_CIRC', 
108        'VIEW_CIRCULATIONS', 
109        'VIEW_COPY_CHECKOUT_HISTORY', 
110        'VIEW_PERMIT_CHECKOUT', 
111        'VIEW_USER', 
112        'VIEW_USER_FINES_SUMMARY', 
113        'VIEW_USER_TRANSACTIONS' 
114     ); 
115 +
116 Verify:
117 +
118     
119     SELECT * 
120     FROM permission.grp_perm_map pgpm 
121         INNER JOIN permission.perm_list ppl ON pgpm.perm = ppl.id 
122         INNER JOIN permission.grp_tree pgt ON pgt.id = pgpm.grp 
123     WHERE pgt.name = 'SIP';
124     
125  
126     
127 . For each account created in the +<login>+ section of oils_sip.xml, create a user (via the staff client user 
128 editor) that has the same username and password and put that user into the +SIP+ group. 
129
130 [NOTE]
131 ===================
132 The expiration date will affect the +SIP+ users' connection so you might want to make a note of this 
133 somewhere. 
134 ===================
135
136 Running the server 
137 ^^^^^^^^^^^^^^^^^^
138
139 To start the +SIP+ server type the following commands from the command prompt: 
140
141
142    $ sudo su opensrf 
143
144    $ oils_ctl.sh -a [start|stop|restart]_sip 
145
146 indexterm:[SIP]
147
148
149 Logging-SIP 
150 ^^^^^^^^^^^
151
152 Syslog
153 ++++++
154
155 indexterm:[syslog]
156
157
158 It is useful to log +SIP+ requests to a separate file especially during initial setup by modifying your syslog config file. 
159
160 . Edit syslog.conf. 
161
162    $ sudo vi /etc/syslog.conf  # maybe /etc/rsyslog.conf
163
164
165 . Add this: 
166
167    local6.*                -/var/log/SIP_evergreen.log 
168  
169 . Syslog expects the logfile to exist so create the file. 
170
171    $ sudo touch /var/log/SIP_evergreen.log 
172
173 . Restart sysklogd. 
174
175    $ sudo /etc/init.d/sysklogd restart 
176
177
178 Syslog-NG
179 +++++++++
180
181 indexterm:[syslog-NG]
182
183 . Edit logging config. 
184
185    sudo vi /etc/syslog-ng/syslog-ng.conf 
186
187 . Add: 
188
189    # +SIP2+ for Evergreen 
190    filter    f_eg_sip { level(warn, err, crit) and facility(local6); }; 
191    destination eg_sip { file("var/log/SIP_evergreen.log"); }; 
192    log { source(s_all); filter(f_eg_sip); destination(eg_sip); }; 
193
194 . Syslog-ng expects the logfile to exist so create the file. 
195
196    $ sudo touch /var/log/SIP_evergreen.log
197
198 . Restart syslog-ng 
199
200    $ sudo /etc/init.d/syslog-ng restart 
201
202
203 indexterm:[SIP]
204
205
206 Testing Your SIP Connection 
207 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
208
209 * In the root directory of the SIPServer code: 
210
211    $ cd SIPServer/t 
212
213 * Edit SIPtest.pm, change the $instid, $server, $username, and $password variables. This will be 
214 enough to test connectivity. To run all tests, you'll need to change all the variables in the _Configuration_ section. 
215
216    $ PERL5LIB=../ perl 00sc_status.t 
217 +
218 This should produce something like:
219 +
220
221    1..4 
222    ok 1 - Invalid username 
223    ok 2 - Invalid username 
224    ok 3 - login 
225    ok 4 - SC status 
226
227 * Don't be dismayed at *Invalid Username*. That's just one of the many tests that are run. 
228
229 More Testing
230 ^^^^^^^^^^^^
231
232 Once you have opened up either the +SIP+ OR +SIP2+ ports to be accessible from outside you can do some testing 
233 via +telnet+. In the following tests:
234
235 * Replace +$server+ with your server hostname (or +localhost+ if you want to
236   skip testing external access for now);
237 * Replace +$username+, +$password+, and +$instid+ with the corresponding values
238   in the +<accounts>+ section of your SIP configuration file;
239 * Replace the +$user_barcode+ and +$user_password+ variables with the values
240   for a valid user.
241 * Replace the +$item_barcode+ variable with the values for a valid item.
242
243 ///////////////
244 Comments because we don't want to indent these numbered bullets!
245 ///////////////
246
247 . Start by testing your ability to log into the SIP server:
248 +
249 [NOTE]
250 ======================
251 We are using 6001 here which is associated with +SIP2+ as per our configuration. 
252 ======================
253 +
254    $ telnet $server 6001 
255    Connected to $server. 
256    Escape character is '^]'. 
257    9300CN$username|CO$password|CP$instid
258 +
259 If successful, the SIP server returns a +941+ result. A result of +940+,
260 however, indicates an unsuccessful login attempt. Check the +<accounts>+
261 section of your SIP configuration and try agin.
262
263 . Once you have logged in successfully, replace the variables in the following
264 line and paste it into the telnet session:
265 +
266     2300120080623    172148AO$instid|AA$user_barcode|AC$password|AD$user_password
267 +
268 If successful, the SIP server returns the patron information for $user_barcode,
269 similar to the following:
270 +
271    24  Y           00120100113    170738AEFirstName MiddleName LastName|AA$user_barcode|BLY|CQY
272    |BHUSD|BV0.00|AFOK|AO$instid| 
273 +
274 The response declares it is a valid patron BLY with a valid password CQY and shows the user's +$name+.
275
276 . To test the SIP server's item information response, issue the following request:
277 +
278     1700120080623    172148AO$instid|AB$item_barcode|AC$password
279 +
280 If successful, the SIP server returns the item information for $item_barcode,
281 similar to the following:
282 +
283     1803020120160923    190132AB30007003601852|AJRégion de Kamouraska|CK001|AQOSUL|APOSUL|BHCAD
284     |BV0.00|BGOSUL|CSCA2 PQ NR46 73R
285 +
286 The response declares it is a valid item, with the title, owning library,
287 permanent and current locations, and call number.
288
289 indexterm:[SIP]
290
291 SIP Communication
292 ~~~~~~~~~~~~~~~~~
293
294 indexterm:[SIP Server, SIP Communication]
295
296 +SIP+ generally communicates over a +TCP+ connection (either raw sockets or over +telnet+), but can also 
297 communicate via serial connections and other methods. In Evergreen, the most common deployment is a +RAW+ socket 
298 connection on port 6001.
299
300 +SIP+ communication consists of strings of messages, each message request and response begin with a 2-digit 
301 ``command'' - Requests usually being an odd number and responses usually increased by 1 to be an even number. The 
302 combination numbers for the request command and response is often referred to as a _Message Pair_ (for example, 
303 a 23 command is a request for patron status, a 24 response is a patron status, and the message pair 23/24 is patron 
304 status message pair). The table in the next section shows the message pairs and a description of them. 
305
306 For clarification, the ``Request'' is from the device (selfcheck or otherwise) to the ILS/ACS. The response is… the 
307 response to the request ;). 
308
309 Within each request and response, a number of fields (either a fixed width or separated with a | [pipe symbol] and 
310 preceded with a 2-character field identifier) are used. The fields vary between message pairs. 
311
312 |===========================================================================
313 | *Pair* | *Name*              | *Supported?*          |*Details* 
314 | 01     | Block Patron        | Yes                   |<<sip_01_block_patron, 01/Block_Patron>> - ACS responds with 24 Patron Status Response 
315 | 09-10  | Checkin             | Yes (with extensions) |<<sip_09-10_checkin, 09/10_Checkin>> 
316 | 11-12  | Checkout            | Yes (no renewals)     |<<sip_11-12_checkout, 11/12_Checkout>> 
317 | 15-16  | Hold                | Partially supported   |<<sip_15-16_hold, 15/16_Hold>>  
318 | 17-18  | Item Information    | Yes (no extensions)   |<<sip_17-18_item_information, 17/18_Item_Information>> 
319 | 19-20  | Item Status Update  | No                    |<<sip_19-20_item_status_update, 19/20_Item_Status_Update>> - Returns Patron Enable response, but doesn't make any changes in EG  
320 | 23-24  | Patron Status       | Yes                   |<<sip_23-24_patron_status, 23/24_Patron_Status>> - 63/64 ``Patron Information'' preferred 
321 | 25-26  | Patron Enable       | No                    |<<sip_25-26_patron_enable, 25/26_Patron_Enable>> - Used during system testing and validation 
322 | 29-30  | Renew               | Yes                   |<<sip_29-30_renew, 29/30_Renew>> 
323 | 35-36  | End Session         | Yes                   |<<sip_35-36_end_session, 35/36_End_Session>>
324 | 37-38  | Fee Paid            | Yes                   |<<sip_37-38_fee_paid, 37/38_Fee_Paid>> 
325 | 63-64  | Patron Information  | Yes (no extensions)   |<<sip_63-64_patron_information, 63/64_Patron_Information>> 
326 | 65-66  | Renew All           | Yes                   |<<sip_65-66_renew_all, 65/66_Renew_All>> 
327 | 93-94  | Login               | Yes                   |<<sip_93-94_login, 93/94_Login>> - Must be first command to Evergreen ACS (via socket) or +SIP+ will terminate 
328 | 97-96  | Resend last message | Yes                   |<<sip_97-96_resend, 97/96_Resend>> 
329 | 99-98  | SC-ACS Status       | Yes                   |<<sip_99-98_sc_and_acs_status, 99/98_SC_and_ACS_Status>> 
330 |===========================================================================
331
332 anchor:sip_01_block_patron[]
333
334 01 Block Patron
335 ^^^^^^^^^^^^^^^
336
337 indexterm:[SelfCheck]
338
339 A selfcheck will issue a *Block Patron* command if a patron leaves their card in a selfcheck machine or if the 
340 selfcheck detects tampering (such as attempts to disable multiple items during a single item checkout, multiple failed 
341 pin entries, etc). 
342
343 In Evergreen, this command does the following:
344
345 * User alert message: _CARD BLOCKED BY SELF-CHECK MACHINE_ (this is independent of the AL _Blocked 
346 Card Message_ field). 
347
348 * Card is marked inactive. 
349
350 The request looks like: 
351
352    01<card retained><date>[fields AO, AL, AA, AC] 
353
354 _Card Retained_: A single character field of Y or N - tells the ACS whether the SC has retained the card (ex: left in 
355 the machine) or not. 
356
357 _Date_: An 18 character field for the date/time when the block occurred. 
358
359 _Format_: YYYYMMDDZZZZHHMMSS (ZZZZ being zone - 4 blanks when local time, ``Z'' (3 blanks and a Z) 
360 represents UTC(GMT/Zulu) 
361
362 _Fields_: See <<fields, Fields>> for more details.
363
364 The response is a 24 ``Patron Status Response'' with the following: 
365
366 * Charge privileges denied 
367 * Renewal privileges denied 
368 * Recall privileges denied (hard-coded in every 24 or 64 response) 
369 * hold privileges denied 
370 * Screen Message 1 (AF): _blocked_ 
371 * Patron 
372
373 anchor:sip_09-10_checkin[]
374
375 09/10 Checkin
376 ^^^^^^^^^^^^^
377
378 ~The request looks like: 
379
380    09<No block (Offline)><xact date><return date>[Fields AP,AO,AB,AC,CH,BI] 
381
382 _No Block (Offline)_: A single character field of _Y_ or _N_ - Offline transactions are not currently supported so send _N_. 
383
384 _xact date_: an 18 character field for the date/time when the checkin occurred. Format: 
385 YYYYMMDDZZZZHHMMSS (ZZZZ being zone - 4 blanks when local time, ``Z'' (3 blanks and a Z) represents 
386 UTC(GMT/Zulu) 
387
388 _Fields_: See <<fields, Fields>> for more details. 
389
390 The response is a 10 ``Checkin Response'' with the following: 
391
392    10<resensitize><magnetic media><alert><xact date>[Fields AO,AB,AQ,AJ,CL,AA,CK,CH,CR,CS,CT,CV,CY,DA,AF,AG] 
393
394 Example (with a remote hold): 
395
396   09N20100507    16593720100507    165937APCheckin Bin 5|AOBR1|AB1565921879|ACsip_01| 
397
398   101YNY20100623    165731AOBR1|AB1565921879|AQBR1|AJPerl 5 desktop reference|CK001|CSQA76.73.P33V76 1996 
399   |CTBR3|CY373827|DANicholas Richard Woodard|CV02|
400
401 Here you can see a hold alert for patron CY _373827_, named DA _Nicholas Richard Woodard_, to be picked up at CT 
402 ``BR3''. Since the transaction is happening at AO ``BR1'', the alert type CV is 02 for _hold at remote library_. The 
403 possible values for CV are: 
404
405 * 00: unknown 
406
407 * 01: local hold 
408
409 * 02: remote hold 
410
411 * 03: ILL transfer (not used by EG) 
412
413 * 04: transfer 
414
415 * 99: other 
416
417 indexterm:[magnetic media]
418
419 [NOTE]
420 ===============
421 The logic for Evergreen to determine whether the content is magnetic_media comes from either legacy circ 
422 scripts or search_config_circ_modifier. The default is non-magnetic. The same is true for media_type (default 
423 001). Evergreen does not populate the collection_code because it does not really have any, but it will provide 
424 the call_number where available.
425
426 Unlike the +item_id+ (barcode), the +title_id+ is actually a title string, unless the configuration forces the 
427 return of the bib ID. 
428
429 Don't be confused by the different branches that can show up in the same response line. 
430
431 * AO is where the transaction took place, 
432
433 * AQ is the ``permanent location'', and 
434
435 * CT is the _destination location_ (i.e., pickup lib for a hold or target lib for a transfer). 
436 ================
437
438 anchor:sip_11-12_checkout[]
439
440 11/12 Checkout
441 ^^^^^^^^^^^^^^
442
443
444 anchor:sip_15-16_hold[]
445
446 15/16 Hold
447 ^^^^^^^^^^
448
449 Evergreen supports the Hold message for the purpose of canceling
450 holds.  It does not currently support creating hold requests via SIP2.
451
452
453 anchor:sip_17-18_item_information[]
454
455 17/18 Item Information 
456 ^^^^^^^^^^^^^^^^^^^^^^
457
458 The request looks like: 
459
460     17<xact_date>[fields: AO,AB,AC] 
461
462 The request is very terse. AC is optional. 
463
464 The following response structure is for +SIP2+. (Version 1 of the protocol had only 6 total fields.) 
465
466     18<circulation_status><security_marker><fee_type><xact_date> 
467     [fields: CF,AH,CJ,CM,AB,AJ,BG,BH,BV,CK,AQ,AP,CH,AF,AG,+CT,+CS] 
468
469 Example:
470
471    1720060110    215612AOBR1|ABno_such_barcode| 
472
473    1801010120100609    162510ABno_such_barcode|AJ| 
474
475    1720060110    215612AOBR1|AB1565921879| 
476
477    1810020120100623    171415AB1565921879|AJPerl 5 desktop reference|CK001|AQBR1|APBR1|BGBR1 
478    |CTBR3|CSQA76.73.P33V76 1996| 
479
480 The first case is with a bogus barcode. The latter shows an item with a circulation_status of _10_ for _in transit between 
481 libraries_. The known values of +circulation_status+ are enumerated in the spec. 
482
483 indexterm:[Automated Material Handling (AMH)]
484
485 EXTENSIONS: The CT field for _destination location_ and CS _call number_ are used by Automated Material Handling 
486 systems. 
487
488
489 anchor:sip_19-20_item_status_update[]
490
491 19/20 Item Status Update
492 ^^^^^^^^^^^^^^^^^^^^^^^^
493
494
495 anchor:sip_23-24_patron_status[]
496
497 23/24 Patron Status 
498 ^^^^^^^^^^^^^^^^^^^
499
500 Example: 
501
502    2300120060101    084235AOUWOLS|AAbad_barcode|ACsip_01|ADbad_password| 
503
504    24YYYY          00120100507    013934AE|AAbad_barcode|BLN|AOUWOLS|
505
506    2300120060101    084235AOCONS|AA999999|ACsip_01|ADbad_password| 
507
508    24  Y           00120100507    022318AEDoug Fiander|AA999999|BLY|CQN|BHUSD|BV0.00|AFOK|AOCONS| 
509
510    2300120060101    084235AOCONS|AA999999|ACsip_01|ADuserpassword|LY|CQN|BHUSD|BV0.00|AFOK|AOCONS| 
511
512    24  Y           00120100507    022803AEDoug Fiander|AA999999|BLY|CQY|BHUSD|BV0.00|AFOK|AOCONS| 
513
514 . The BL field (+SIP2+, optional) is _valid patron_, so the _N_ value means _bad_barcode_ doesn't match a patron, the 
515 _Y_ value means 999999 does. 
516
517 . The CQ field (+SIP2+, optional) is _valid password_, so the _N_ value means _bad_password_ doesn't match 999999's 
518 password, the _Y_ means _userpassword_ does. 
519
520 So if you were building the most basic +SIP2+ authentication client, you would check for _|CQY|_ in the response to 
521 know the user's barcode and password are correct (|CQY| implies |BLY|, since you cannot check the password 
522 unless the barcode exists). However, in practice, depending on the application, there are other factors to consider in 
523 authentication, like whether the user is blocked from checkout, owes excessive fines, reported their card lost, etc. 
524 These limitations are reflected in the 14-character _patron status_ string immediately following the _24_ code. See the 
525 field definitions in your copy of the spec. 
526
527
528 anchor:sip_25-26_patron_enable[]
529
530 25/26 Patron Enable 
531 ^^^^^^^^^^^^^^^^^^^
532
533 Not yet supported. 
534
535
536 anchor:sip_29-30_renew[]
537
538 29/30 Renew
539 ^^^^^^^^^^^
540
541 Evergreen supports the Renew message.
542
543
544 anchor:sip_35-36_end_session[]
545
546 35/36 End Session
547 ^^^^^^^^^^^^^^^^^
548
549    3520100505    115901AOBR1|AA999999|
550
551    36Y20100507    161213AOCONS|AA999999|AFThank you!| 
552    
553 The _Y/N_ code immediately after the 36 indicates _success/failure_. Failure is not particularly meaningful or important 
554 in this context, and for evergreen it is hardcoded _Y_. 
555
556
557
558 anchor:sip_37-38_fee_paid[]
559
560 37/38 Fee Paid 
561 ^^^^^^^^^^^^^^
562
563 Evergreen supports the Fee Paid message.
564
565
566 anchor:sip_63-64_patron_information[]
567
568 63/64 Patron Information 
569 ^^^^^^^^^^^^^^^^^^^^^^^^
570
571 Attempting to retrieve patron info with a bad barcode:
572
573    6300020060329    201700          AOBR1|AAbad_barcode| 
574    
575    64YYYY          00020100623    141130000000000000000000000000AE|AAbad_barcode|BLN|AOBR1| 
576
577 Attempting to retrieve patron info with a good barcode (but bad patron password): 
578
579    6300020060329    201700          AOBR1|AA999999|ADbadpwd| 
580
581    64  Y           00020100623    141130000000000000000000000000AA999999|AEDavid J. Fiander|BHUSD|BV0.00 
582    |BD2 Meadowvale Dr. St Thomas, ON Canada 
583
584    90210|BEdjfiander@somemail.com|BF(519) 555 1234|AQBR1|BLY|CQN|PB19640925|PCPatrons 
585    |PIUnfiltered|AFOK|AOBR1| 
586
587 See <<sip_23-24_patron_status, 23/24 Patron Status>> for info on +BL+ and +CQ+ fields. 
588
589
590
591 anchor:sip_65-66_renew_all[]
592
593 65/66 Renew All
594 ^^^^^^^^^^^^^^^
595
596 Evergreen supports the Renew All message.
597
598
599 anchor:sip_93-94_login[]
600
601 93/94 Login 
602 ^^^^^^^^^^^
603
604 Example: 
605
606    9300CNsip_01|CObad_value|CPBR1| 
607   
608    [Connection closed by foreign host.] 
609    ... 
610
611    9300CNsip_01|COsip_01|CPBR1|
612
613    941 
614
615 _941_ means successful terminal login. _940_ or getting dropped means failure.
616
617
618 anchor:sip_97-96_resend[]
619
620 97/96 Resend
621 ^^^^^^^^^^^^
622
623
624 anchor:sip_99-98_sc_and_acs_status[]
625
626 99/98 SC and ACS Status
627 ^^^^^^^^^^^^^^^^^^^^^^^
628
629    99<status code><max print width><protocol version> 
630  
631 All 3 fields are required:
632
633 * 0: SC is OK
634
635 * 1: SC is out of paper 
636
637 * 2: SC shutting down
638
639 * status code - 1 character 
640
641 * max print width - 3 characters - the integer number of characters the client can print 
642
643 * protocol version - 4 characters - x.xx 
644
645   98<on-line status><checkin ok><checkout ok><ACS renewal policy>
646   <status update ok><offline ok><timeout period> 
647
648   <retries allowed><date/time sync><protocol version><institution id> 
649   <library name><supported messages><terminal 
650
651   location><screen message><print line> 
652
653 Example: 
654
655   9910302.00 
656
657   98YYYYNN60000320100510    1717202.00AOCONS|BXYYYYYYYYYNYNNNYN|
658
659 The Supported Messages field +BX+ appears only in +SIP2+, and specifies whether 16 different +SIP+ commands are 
660 supported by the +ACS+ or not. 
661
662
663 anchor:fields[]
664
665 Fields
666 ^^^^^^
667
668 All fixed-length fields in a communication will appear before the first variable-length field. This allows for simple 
669 parsing. Variable-length fields are by definition delimited, though there will not necessarily be an initial delimiter 
670 between the last fixed-length field and the first variable-length one. It would be unnecessary, since you should know 
671 the exact position where that field begins already.