@@ -, +, @@ --- C4/SIP/SIPServer.pm | 9 +++++---- etc/SIPconfig.xml | 19 +++++++++++++------ 2 files changed, 18 insertions(+), 10 deletions(-) --- a/C4/SIP/SIPServer.pm +++ a/C4/SIP/SIPServer.pm @@ -243,7 +243,7 @@ sub sip_protocol_loop { my $self = shift; my $service = $self->{service}; my $config = $self->{config}; - my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30; + my $timeout = $self->{service}->{client_timeout} || $config->{client_timeout}; # The spec says the first message will be: # SIP v1: SC_STATUS @@ -263,13 +263,14 @@ sub sip_protocol_loop { syslog( 'LOG_DEBUG', 'Inactive: timed out' ); die "Timed Out!\n"; }; - my $previous_alarm = alarm($timeout); + my $previous_alarm; + $previous_alarm = alarm($timeout) if $timeout; while ( my $inputbuf = read_request() ) { if ( !defined $inputbuf ) { return; #EOF } - alarm($timeout); + alarm($timeout) if $timeout; unless ($inputbuf) { syslog( "LOG_ERR", "sip_protocol_loop: empty input skipped" ); @@ -287,7 +288,7 @@ sub sip_protocol_loop { } next if $status eq REQUEST_ACS_RESEND; } - alarm($previous_alarm); + alarm($previous_alarm) if $previous_alarm; return; }; if ( $@ =~ m/timed out/i ) { --- a/etc/SIPconfig.xml +++ a/etc/SIPconfig.xml @@ -16,12 +16,6 @@ /> - + + --