evergreen-admin:sip
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
evergreen-admin:sip [2010/01/14 14:52] – aatre | evergreen-admin:sip [2022/02/10 13:34] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====Installing the SIP Server for Evergreen==== | + | ======Installing the SIP Server for Evergreen====== |
Author: Bill Erickson\\ | Author: Bill Erickson\\ | ||
This is a rough intro to installing the SIP server for Evergreen. | This is a rough intro to installing the SIP server for Evergreen. | ||
- | ===Getting the code=== | + | NOTE: This documentation is also available in the Evergreen documentation at [[http:// |
+ | |||
+ | =====Getting the code===== | ||
+ | Current SIP code lives at http:// | ||
< | < | ||
- | $ cd /opt | + | cd /opt |
- | $ sudo cvs -d: | + | git clone git://git.evergreen-ils.org/ |
- | # when prompted for a password, just hit Enter | + | |
- | $ sudo cvs -z3 -d: | + | |
</ | </ | ||
- | ===Configuring the Server=== | + | =====Configuring the Server===== |
- < | - < | ||
$ cd / | $ cd / | ||
Line 18: | Line 19: | ||
< | < | ||
min_servers=' | min_servers=' | ||
- | min_spare_servers=' | + | min_spare_servers=' |
max_servers=' | max_servers=' | ||
/></ | /></ | ||
- '' | - '' | ||
- | ===Adding SIP users==== | + | =====Adding SIP users===== |
- | - in the < | + | - in the < |
- | - In Evergreen, create a new profile group called SIP. This group should be a sub-group of Users (not Staff or Patrons). | + | - In Evergreen, create a new profile group called SIP. This group should be a sub-group of Users (not Staff or Patrons). |
+ | < | ||
COPY_CHECKIN | COPY_CHECKIN | ||
COPY_CHECKOUT | COPY_CHECKOUT | ||
Line 35: | Line 37: | ||
VIEW_USER_FINES_SUMMARY | VIEW_USER_FINES_SUMMARY | ||
VIEW_USER_TRANSACTIONS</ | VIEW_USER_TRANSACTIONS</ | ||
+ | |||
+ | OR use SQL like: | ||
+ | <code sql> | ||
+ | INSERT INTO permission.grp_tree (id, | ||
+ | VALUES (8, ' | ||
+ | |||
+ | INSERT INTO | ||
+ | permission.grp_perm_map (grp, perm, depth, grantable) | ||
+ | SELECT | ||
+ | g.id, p.id, 0, FALSE | ||
+ | FROM | ||
+ | permission.grp_tree g, | ||
+ | permission.perm_list p | ||
+ | WHERE | ||
+ | g.name = ' | ||
+ | p.code in ( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | |||
+ | -- VERIFY: | ||
+ | SELECT * | ||
+ | FROM permission.grp_perm_map JOIN permission.perm_list ON | ||
+ | | ||
+ | WHERE grp=8; | ||
+ | </ | ||
+ | |||
+ | Keep in mind that the id (8) may not necessarily be available on your system. | ||
- For each account created in the < | - For each account created in the < | ||
Note: The expiration date will affect the SIP users' connection, you might want to make a note of this somewhere. | Note: The expiration date will affect the SIP users' connection, you might want to make a note of this somewhere. | ||
- | ===Running the server=== | + | =====Running the server===== |
< | < | ||
$ sudo su opensrf | $ sudo su opensrf | ||
Line 44: | Line 81: | ||
</ | </ | ||
- | ===Testing Your Connection=== | + | =====Logging===== |
+ | ==Syslog== | ||
+ | It is useful to log SIP requests to a separate file especially during initial setup by modifying your syslog config file. | ||
+ | - Edit syslog.conf.< | ||
+ | - Add this:< | ||
+ | - Syslog expects the logfile to exist so create the file.< | ||
+ | - Restart sysklogd< | ||
+ | ==Syslog-NG== | ||
+ | - Edit logging config < | ||
+ | - Add:< | ||
+ | # SIP2 for Evergreen | ||
+ | filter | ||
+ | destination eg_sip { file("/ | ||
+ | log { source(s_all); | ||
+ | </ | ||
+ | - Syslog-ng expects the logfile to exist so create the file.< | ||
+ | - Restart syslog-ng < | ||
+ | |||
+ | == syslog-ng(remote logging server) == | ||
+ | |||
+ | Use this configuration in the destination server' | ||
+ | |||
+ | < | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Destination | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | destination d_external_sip { # f_sip | ||
+ | file("/ | ||
+ | template(" | ||
+ | |||
+ | |||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Filter | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | filter f_sip { match(" | ||
+ | |||
+ | # -------------------------------------------------------------------------------- | ||
+ | # Log Statement | ||
+ | # -------------------------------------------------------------------------------- | ||
+ | |||
+ | log { source(s_external); | ||
+ | |||
+ | Add the lines below to the syslog-ng.conf on the remote server you wish to forward logs from. | ||
+ | |||
+ | < | ||
+ | #SIP | ||
+ | source s_file_sip { file("/ | ||
+ | log { source(s_file_sip); | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | =====Testing Your Connection===== | ||
* In the top level CVS checkout of the SIPServer code | * In the top level CVS checkout of the SIPServer code | ||
< | < | ||
$ cd SIPServer/t | $ cd SIPServer/t | ||
</ | </ | ||
- | * Edit SIPTest.pm, change the $instid, $server, $username, and $password variables. | + | * Edit SIPtest.pm, change the $instid, $server, $username, and $password variables. |
< | < | ||
$ PERL5LIB=../ | $ PERL5LIB=../ | ||
Line 63: | Line 154: | ||
* Don't be dismayed at " | * Don't be dismayed at " | ||
- | ===More Testing=== | + | ====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. | 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. | You can try this with localhost if you so wish, but we want to prove that SIP2 works from non-localhost. | ||
Line 72: | Line 163: | ||
Connected to $server. | Connected to $server. | ||
Escape character is ' | Escape character is ' | ||
- | 9300CN$username|CO$password|CP$instid | + | 9300CN**$username**|CO**$password**|CP**$instid** |
</ | </ | ||
You should get back. | You should get back. | ||
Line 80: | Line 171: | ||
Now just copy in the following line (with variables replaced) you don't need to hit enter, just paste! | Now just copy in the following line (with variables replaced) you don't need to hit enter, just paste! | ||
< | < | ||
- | 2300120080623 | + | 2300120080623 |
</ | </ | ||
You will get back the patron information for $barcode (something similar to the what's below). | You will get back the patron information for $barcode (something similar to the what's below). | ||
< | < | ||
- | 24 Y | + | 24 Y |
</ | </ | ||
The response declares it is a valid patron (BLY) with a valid password (CQY) and shows the user's $name. | The response declares it is a valid patron (BLY) with a valid password (CQY) and shows the user's $name. |
evergreen-admin/sip.1263498751.txt.gz · Last modified: 2022/02/10 13:33 (external edit)