Koha/etc/SIPconfig.xml
Kyle M Hall 59266cbd61 Bug 14512 - Add support for AV field to Koha's SIP2 Server
Koha's SIP2 server should have support for the AV field ( field items ).
The biggest problem with this field is that its' contents are not really
defined in SIP2 protocol specification. All it says is "this field
should be sent for each fine item". Due to this, I think the contents of
the field need to be configurable at the login level, so that the
contents can be defined based on the SIP2 devices requirements for the
AV field.

Test Plan:
1) Apply this patch
2) Find a patron with outstanding fines
3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value "   Y      "
4) Note there is an AV field for each fee containing the description and amount
5) Edit your sip config, add an av_field_template parameter to the login you are using such as
    av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
6) Restart your SIP server
7) Repeat the patron information request
8) Note your custom AV field is being used!

Signed-off-by: Chris Davis <cgdavis@uintah.utah.gov>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-31 20:29:18 +00:00

89 lines
3.1 KiB
XML

<acsconfig xmlns="http://openncip.org/acs-config/1.0/">
<!-- above address gets nothing, it's just a namespace -->
<error-detect enabled="true" />
<!--
Set Net::Server::PreFork runtime parameters
syslog_ident will identify SIP2 Koha server entries in syslog
For OpenSolaris, add: syslog_logsock=stream
-->
<server-params
min_servers='1'
min_spare_servers='0'
log_file='Sys::Syslog'
syslog_ident='koha_sip'
syslog_facility='local6'
/>
<listeners>
<!-- vestigial HTTP, never implemented: just use the OPAC!
<service
port="0:8080/tcp"
transport="http"
protocol="NCIP/1.0" />
-->
<service
port="8023/tcp"
transport="telnet"
protocol="SIP/2.00"
timeout="60" />
<service
port="127.0.0.1:6001/tcp"
transport="RAW"
protocol="SIP/2.00"
timeout="60" />
</listeners>
<accounts>
<login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" encoding="ascii" checked_in_ok="1" />
<login id="koha" password="koha" delimiter="|" error-detect="enabled" institution="kohalibrary" encoding="utf8" />
<login id="koha2" password="koha" institution="kohalibrary2" terminator="CR" />
<login id="lpl-sc" password="1234" institution="LPL" />
<login id="lpl-sc-beacock" password="xyzzy"
delimiter="|" error-detect="enabled" institution="LPL"
send_patron_home_library_in_af="1"
av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
<screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
<screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
</login>
</accounts>
<!--
Institution tags are for enabled branches. There needs to be one
institution stanza for each institution named in the accounts above.
The implementation attribute is actually used to find the code to run,
in our case "ILS".
-->
<institutions>
<institution id="MAIN" implementation="ILS" parms="">
<policy checkin="true" renewal="true" checkout="true"
status_update="false" offline="false"
timeout="100"
retries="5" />
</institution>
<institution id="CPL" implementation="ILS" parms="">
<policy checkin="true" renewal="true" checkout="true"
status_update="false" offline="false"
timeout="25"
retries="5" />
</institution>
<institution id="kohalibrary" implementation="ILS" parms="">
<policy checkin="true" renewal="false" checkout="true"
status_update="false" offline="false"
timeout="100"
retries="5" />
</institution>
<institution id="kohalibrary2" implementation="ILS" parms="">
<policy checkin="true" renewal="false" checkout="true"
timeout="100"
retries="3" />
</institution>
<institution id="LPL" implementation="ILS">
<policy checkin="true" renewal="false" checkout="true"
timeout="100"
retries="5" />
</institution>
</institutions>
</acsconfig>