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.
Created attachment 34284 [details] [review] 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.
Note, you really only need to sleep for 20 to 30 seconds, not 100.
Created attachment 34982 [details] [review] Patch Signed Off Timeout invoked correctly in testing
Created attachment 35573 [details] [review] 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>
Patch pushed to master. Thanks Kyle!
Pushed to 3.18.x will be in 3.18.4
(In reply to Chris Cormack from comment #6) > Pushed to 3.18.x will be in 3.18.4 Pushed to 3.16.x, will be in 3.16.8