Bug 13432 - SIP Server does not respect timeout setting
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 10 Dec 2014 17:27:59 +0000 (12:27 -0500)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 5 Feb 2015 17:44:20 +0000 (14:44 -0300)
commit03335ab401576355dfc5bcee1aa45714fd9fc411
treed6dea4034e49042073dca44eaae3b78d8c3997b3
parentf4f1f5a3b3b750a2854d29962048c297c330f57b
Bug 13432 - SIP Server does not respect timeout setting

Koha's SIP server accepts timeout parameters, but those parameters
are only used for the login portion of a telnet transport session.
Other than that, they are ignored, and as long as whatever opened
the connection keeps it open, it will stay open indefinitely.

Test Plan:
1) Set the timeout setting on your SIP server to 10 seconds
2) Modify misc/sip_cli_emulator.pl, add "sleep 100;" directly after line 91
3) Start your SIP server
4) Run the modified sip script with valid parameters
5) Watch the SIP server stderr
6) Note that even though the script waits far too long before continuing,
   the SIP server never kills the connection, and the requests the cli
   script makes come back with valid data.
7) Apply this patch
8) Restart your SIP server
9) Repeat step 4
10) Note that this time you see "SIP Timed Out!" in the SIP server
    stderr and when the script finally makes it's request, it doesn't
    come back with valid data.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/SIP/SIPServer.pm