Koha/C4/SIP
David Cook 5ca20665a3
Bug 37087: Add TCP keepalive support to SIP server
This change adds the ability to enable and configure TCP keepalive
support for the SIP server using SIPconfig.xml.

For the sake of backwards compatibility, it defaults to disabled
and additional parameters default match typical kernel defaults.

Technical detail can be found in the perldoc for C4/SIP/SIPserver.pm

Test plan:
0. Apply the patch
1. koha-sip --restart kohadev
2. apt-get update && apt-get install tcpdump
3. In one window, run "tcpdump -A -n -v -i any 'port 6001'"
4. In another window, run the following:
echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v
5. Note in tcpdump output that after the initial flood of packets,
nothing more is received

6. vi /etc/koha/sites/kohadev/SIPconfig.xml
7. In the "server-params" element, add attributes like the following:
custom_tcp_keepalive='1'
custom_tcp_keepalive_time='10'
custom_tcp_keepalive_intvl='5'
8. koha-sip --restart kohadev
9. In one window, run "tcpdump -A -n -v -i any 'port 6001'"
10. In another window, run the following:
echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v
11. Note in tcpdump output that after the initial flood of packets,
ACK packets are sent out every 10+ seconds for the idle connection

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-20 15:32:47 +02:00
..
ILS Bug 28924: (QA follow-up) Use $self instead of $patron 2024-07-18 18:25:55 +02:00
Sip Bug 36948: (follow-up) Allow IPv[46] in port config 2024-06-11 08:10:01 +01:00
ILS.pm Bug 18317: (QA follow-up) Clean up code and add unit tests 2024-07-05 15:48:08 +02:00
ILS.pod Bug 13506 [QA Follouwp] - Fix POD 2015-02-20 11:54:41 -03:00
Logger.pm Bug 26673: Remove shebangs from Perl modules 2020-10-26 00:14:42 +01:00
Makefile
README Bug 15253: Rename syslog() to siplog() 2020-05-12 11:46:46 +01:00
Sip.pm Bug 33926: Add ability to specify fields allowed in a response 2023-09-25 10:53:50 -03:00
SIPServer.pm Bug 37087: Add TCP keepalive support to SIP server 2024-08-20 15:32:47 +02:00
Trapper.pm Bug 36948: (follow-up) Remove log_file param, adjust caller_depth 2024-06-11 08:09:55 +01:00

README for Open NSIP 3M-SIP Server

DEPENDENCIES

SIPServer is written entirely in Perl, but it require these CPAN
perl modules to run:

     Net::Server - The SIP server is a Net::Server::Prefork server
     XML::LibXML
     XML::Parser
     XML::Simple - for parsing the config file
     UNIVERSAL::require - for loading the correct ILS interface module
     Clone - for running the test cases

LOGGING

SIPServer uses Koha::Logger for status and debugging messages.