User Tools

Site Tools


evergreen-admin:sip

This is an old revision of the document!


Installing the SIP Server for Evergreen

Author: Bill Erickson
This is a rough intro to installing the SIP server for Evergreen.

Getting the code

$ cd /opt
$ sudo cvs -d:pserver:anonymous@openncip.cvs.sourceforge.net:/cvsroot/openncip login
# when prompted for a password, just hit Enter
$ sudo cvs -z3 -d:pserver:anonymous@openncip.cvs.sourceforge.net:/cvsroot/openncip co -P SIPServer

Configuring the Server

  1. $ sudo su opensrf
    $ cd /openils/conf
    $ cp oils_sip.xml.example oils_sip.xml
  2. Edit oils_sip.xml. Change the commented out <server-params> section to this:
        <server-params
            min_servers='1' 
            min_spare_servers='0'
            max_servers='25'
        />
  3. max_servers will directly correspond to the number of allowed SIP clients. Set the number accordingly, but bear in mind that too many connections can exhaust memory. On a 4G RAM/4 CPU server (that is also running evergreen), I would recommend not exceeding 100 SIP client connections, give or take.

Adding SIP users

  1. in the <accounts> section, add SIP client login information. Make sure that all <login>'s use the same institution attribute. All attributes in the <login> section will be used by the SIP client.
  2. In Evergreen, create a new profile group called SIP. This group should be a sub-group of Users (not Staff or Patrons). Set Editing Permission as "group_application.user.sip_client" and give the group the following permissions:
    COPY_CHECKIN
    COPY_CHECKOUT
    RENEW_CIRC
    VIEW_CIRCULATIONS
    VIEW_COPY_CHECKOUT_HISTORY
    VIEW_PERMIT_CHECKOUT
    VIEW_USER
    VIEW_USER_FINES_SUMMARY
    VIEW_USER_TRANSACTIONS
  3. For each account created in the <login> section of oils_sip.xml, create a user (via the staff client user editor) that has the same username and password and put that user into the SIP group.

Note: The expiration date will affect the SIP users' connection, you might want to make a note of this somewhere.

Running the server

$ sudo su opensrf
$ oils_ctl.sh -d /openils/var/run -s /openils/conf/oils_sip.xml -a [start|stop|restart]_sip

Testing Your Connection

  • In the top level CVS checkout of the SIPServer code
$ cd SIPServer/t
  • Edit SIPTest.pm, change the $instid, $server, $username, and $password variables. This will be enough to test connectivity. To run all tests, you'll need to change all the variables in the Configuration section
$ PERL5LIB=../ perl 00sc_status.t
  • This should produce something like:
1..4
ok 1 - Invalid username
ok 2 - Invalid username
ok 3 - login
ok 4 - SC status
  • Don't be dismayed at "Invalid Username". That's just one of the many tests that are run.

More Testing

Once you have opened up either the SIP OR SIP2 ports to be accessible from outside you can do some testing via telnet. You can try this with localhost if you so wish, but we want to prove that SIP2 works from non-localhost. Replace $instid, $server, $barcode, $username, and $password variables below as necessary. Note: We are using 6001 here which is associated with SIP2 as per our configuration.

$ telnet $server 6001
Connected to $server.
Escape character is '^]'.
9300CN$username|CO$password|CP$instid

You should get back.

941

Now just copy in the following line (with variables replaced) you don't need to hit enter, just paste!

2300120080623    172148AOecrl|AA$barcode|AC$password|AD$password

You will get back the patron information for $barcode.

24  Y           00120100113    170738AEFirstName MiddleName LastName|AA$barcode|BLY|CQY|BHUSD|BV0.00|AFOK|AO$instid|

The response declares it is a valid patron (BLY) with a valid password (CQY) and shows the user's $name.

evergreen-admin/sip.1263425040.txt.gz · Last modified: 2022/02/10 13:33 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.