Lines 15-20
use C4::SIP::Sip::Constants qw(:all);
Link Here
|
15 |
use C4::SIP::Sip::Configuration; |
15 |
use C4::SIP::Sip::Configuration; |
16 |
use C4::SIP::Sip::Checksum qw(checksum verify_cksum); |
16 |
use C4::SIP::Sip::Checksum qw(checksum verify_cksum); |
17 |
use C4::SIP::Sip::MsgType qw( handle login_core ); |
17 |
use C4::SIP::Sip::MsgType qw( handle login_core ); |
|
|
18 |
use C4::SIP::Sip qw( get_timeout ); |
18 |
|
19 |
|
19 |
use base qw(Net::Server::PreFork); |
20 |
use base qw(Net::Server::PreFork); |
20 |
|
21 |
|
Lines 128-134
sub raw_transport {
Link Here
|
128 |
my $strikes = 3; |
129 |
my $strikes = 3; |
129 |
|
130 |
|
130 |
local $SIG{ALRM} = sub { die "raw_transport Timed Out!\n"; }; |
131 |
local $SIG{ALRM} = sub { die "raw_transport Timed Out!\n"; }; |
131 |
my $timeout = $service->{timeout} || 30; |
132 |
my $timeout = get_timeout( $self, { transport => 1 } ); |
132 |
syslog("LOG_DEBUG", "raw_transport: timeout is %d", $timeout); |
133 |
syslog("LOG_DEBUG", "raw_transport: timeout is %d", $timeout); |
133 |
|
134 |
|
134 |
while( $strikes && ( !$self->{account} || !$self->{account}->{id} )) { |
135 |
while( $strikes && ( !$self->{account} || !$self->{account}->{id} )) { |
Lines 190-196
sub telnet_transport {
Link Here
|
190 |
my $account = undef; |
191 |
my $account = undef; |
191 |
my $input; |
192 |
my $input; |
192 |
my $config = $self->{config}; |
193 |
my $config = $self->{config}; |
193 |
my $timeout = $self->{service}->{timeout} || $config->{timeout} || 30; |
194 |
my $timeout = get_timeout( $self, { transport => 1 } ); |
194 |
syslog("LOG_DEBUG", "telnet_transport: timeout is %s", $timeout); |
195 |
syslog("LOG_DEBUG", "telnet_transport: timeout is %s", $timeout); |
195 |
|
196 |
|
196 |
eval { |
197 |
eval { |
Lines 253-259
sub sip_protocol_loop {
Link Here
|
253 |
my $self = shift; |
254 |
my $self = shift; |
254 |
my $service = $self->{service}; |
255 |
my $service = $self->{service}; |
255 |
my $config = $self->{config}; |
256 |
my $config = $self->{config}; |
256 |
my $timeout = $self->{service}->{client_timeout} || $config->{client_timeout}; |
257 |
my $timeout = get_timeout( $self, { client => 1 } ); |
257 |
|
258 |
|
258 |
# The spec says the first message will be: |
259 |
# The spec says the first message will be: |
259 |
# SIP v1: SC_STATUS |
260 |
# SIP v1: SC_STATUS |