Add a config check to hold phone extention Rather than returning the hold notification phone number on every checkin response, use the phone_ext_to_msg10 institution setting to enable this. Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
LP1528301 Add SIP Support for BF field on type 10 checkin responses This little patch will append the BF field in the SIP response during checkin when the item is for another hold. Some self check software vendors (ahem Bibliotheca) implement the hold phone number for the next patron this way. You will need this patch as well as the code change to the Evergreen repo LP1528301_Add_SIP_Support_for_BF_field_on_type_10_checkin_responses Signed-off-by: blake <blake@mobiusconsortium.org> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
LP 1463943: More Encoding Improvements. First, we improve the encoding search by looking in the institution config proper. The search order for an encoding is now: 1. An encoding attribute specified in the account tag. 2. An encoding tag in the institution tag. 3. An encoding tag in the implementation_config tag of the institution tag as a last resort. 4. Use ASCII if none is set. (The SIP2 specification practially requires this.) The last is done for backward compatibility with existing Evergreen oils_sip.xml files. This should be deprecated in the near future and only the account tag and institution tag proper should be supported. Second, we improve the handling of ASCII output by stealing a code chunk from Evergreen's OILS::SIP->clean_text routine to remove combining characters on strings. Third, we remove the encoding attribute from the sample SIPconfig.xml account tag for lpl-sc, and put an encoding tag in the institution tags for LPL and UWOLS. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP 1463943: Improve Encoding Discovery Improve the previous commit by looking for the encoding in the institution implementation config in addition to the account configuration. The account configuration is used first, followed by that from the institution implemenation config. We also set a convenience field on the server object in the _load_ils_handler method implementation. This way, we only need get the encoding once per session. Hopefully this is correct with the multiplex server. Signed-off-by: Jason Stephenson <jason@sigio.com> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP 1463943: Encode output messages. This commit adds support for an encoding attribute that can be added to accounts in the configuration file. When set, SIPServer will encode response messages in the specified encoding. Valid encodings are those listed in the Encode::Supported man page. This feature is useful if you have a vendor who cannot support the default UTF-8 output by SIPServer. An example is provided in SIPConfig.xml. The lpl-sc account has been set to use the ascii encoding. This particular code was mostly taken from a patch to Koha's SIPServer by Adrien Saurat <adrien.saurat@biblibre.com>, Christophe Croullebois <christophe.croullebois@biblibre.com>, and others. http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9865 Signed-off-by: Jason Stephenson <jstephenson@mvlc.org> Signed-off-by: Martha Driscoll <driscoll@noblenet.org> Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
LP#1613326 change UNIVERSAL::can import, style Remove deprecated (and now fatal) attempt to import a function from UNIVERSAL. To quote perl5220delta: > use UNIVERSAL '...' is now a fatal error > > Importing functions from UNIVERSAL has been deprecated since > v5.12, and is now a fatal error. Also, adjust the style by which we call "can" on $self->{ils} Thanks to Blake at MOBIUS for originally reporting this issue, and proposing a fix. Signed-off-by: Jeff Godin <jgodin@tadl.org> Signed-off-by: Jason Stephenson <jason@sigio.com>
LP#1180468: update license statement to GPL v2 or later In 2011, all current contributors and copyright holders to SIPServer approved switching the license from GPLv2 to GPLv2 or later: <http://libmail.georgialibraries.org/pipermail/open-ils-general/2011-April/004657.html>k In 2013, contributor Jeff Godin also confirmed approval of the license change: https://bugs.launchpad.net/sipserver/+bug/1180468/comments/2 All subsequent contributors have either already approved of the license switch or have done work-for-hire coding for organizations that have approved the change. Consequently, this patch adjusts all references to the GPLv2 to specify that the current license is GPLv2 or later. This patch also adds copyright and copying statements to a few files that lacked them. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jeff Godin <jgodin@tadl.org>
LP#1464748: don't toss terminal account information prematurely This patch ensures that when the PreFork Net::Server personality is in use, terminal login information is not prematurely cleared between *_transport() and sip_protocol_loop(). This, in conjunction with the patch for bug 1463459, fixes a problem where a SIP client that connects, issues a 93 request, then a 99 request, could get an incorrect 98 response. To test fixes for 1463459 and 1464748: [1] Set up a SIP configuration with at least two institutions with different capabilities and at least one account for each institution. Assume that account A1 is for institution I1 and A2 for I2. [2] Prior to applying the patches for 1463459 and 1464748, start the SIP server and try the following sequence: a. 93 to log in as A2 b. 99 to get SC status c. Note that the 98 response has values for I1, not I2 [3] Apply the patches and restart SIP, then repeat the steps in [2]. This time, the 98 response should have the values for I2. Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
LP#1463459: make SC Status handler recognize logged-in SIP session Due to MsgType not having an account field, handle_sc_status should be checking $server, not $self, for account information. As a result of checking the wrong field handle_sc_status always assumes the session is not logged in and returns status based on the first account. When this account is not flagged for some capabilities and the client expects/needs those capabilities the client may determine it can't function and disconnect, even though the login actually has those capabilities. This patch fixes that; it also adjusts how $server->{account} is checked (definedness, not existence). Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com> Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
LP#1298985: Protect against bad summary types Ensure that if we are asked for summary information in Patron Information that we have any form of definition for it *and* we have code to call. If neither case is true pretend they didn't ask for any to begin with. Testing notes ------------- Here is an example of the sort of request that, prior to this patch, could cause a SIPServer backend to crash: 6300020150615 111700 Y AOUinst|AAuser| Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#1425135 Log message duration w/ millisecond granularity Log message processing duration with finer granularity. This is especially useful for diagnosing SIP speed issues for automated materials handling, where small changes in speed can have a big impact. New message logs at DEBUG level. Signed-off-by: Bill Erickson <berickxx@gmail.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
LP#1339190 Add support for the "Multiplex" personality We use Net::Server::Multiplex to reduce resource consumption. In this mode, SIPServer will maintain connection state in the main listening process and fork workers as needed to handle individual requests. Initial implementation by Mike Rylander, with a conversion from File::Queue to Memcache, and LOTS of debugging, by Bill Erickson. Some highlights: * A fork fence for max concurrent in-flight requests * Allow the ILS to save state in IO::Multiplex mode * Optimistic login using fork-and-check When a SIP child process is spawned to handle a new connection login, the pending login is tracked in the parent process (by PID) and the child indicates to the parent that the login has succeeded by storing login success/failure plus some state information in memcache. Any time the parent wakes up to process a message, it checks for completed logins so they can be resolved as OK in the parent and the state information is extracted and stored for future conversation with the resolved client. * Let workers hang around for a bit for higher-rate clients For some clients, such as AMH (sorters), the per-message connections cause too much latency. So, instead, we'll let their backends hang around for a while. This is controlled by a new attribute on the server-params element, worker-keepalive, as a peer to the personality value. This value can also be set on the institution and login elements to support finer-grained keepalive tuning. This is measured in seconds and the default is 5. A value of 0 here will disable this feature altogether. Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Bill Erickson <berick@esilibrary.com> Signed-off-by: Blake GH <blake@mobiusconsortium.org>
LP#1338761: add support for Relais extensions to message 24 The Relais SIP2 client expects that the Patron Status Response (msg 24) will contain certain non-standard fields that are more properly included in the patron information response: - patron home address - patron email - patron home phone In addition, and contrary to the specification, Relais expects that the variable fields in the response will be given in the order that they appear in the spec. This patch ensures that the Patron Status repsonse emits the institution ID, patron ID, and personal name in that order. It also adds a new institution option, relais_extensions_to_msg24, to make the response includes the additional fields. For example: <relais_extensions_to_msg24 enabled="true" /> Signed-off-by: Galen Charlton <gmc@esilibrary.com>