]> git.evergreen-ils.org Git - working/SIPServer.git/blob - Sip/Configuration/Service.pm
LP#1338731: support clients that send 99 then 93 when starting a raw connection
[working/SIPServer.git] / Sip / Configuration / Service.pm
1 #
2 # Copyright (C) 2006-2008  Georgia Public Library Service
3
4 # Author: David J. Fiander
5
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of version 2 of the GNU General Public
8 # License as published by the Free Software Foundation.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public
16 # License along with this program; if not, write to the Free
17 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
18 # MA 02111-1307 USA
19 #
20
21 package Sip::Configuration::Service;
22
23 use strict;
24 use warnings;
25
26 sub new {
27     my ($class, $obj) = @_;
28     my $type = ref($class) || $class;
29
30     if (ref($obj) eq "HASH") {
31         return bless $obj, $type;   # Just bless the object
32     }
33
34     return bless {}, $type;
35 }
36
37 sub timeout {
38     my $self = shift;
39     return $self->{timeout} || $self->SUPER::timeout();
40 }
41
42 sub allow_sc_status_then_login {
43     my $self = shift;
44     return $self->{'allow_sc_status_then_login'} =~ /true|yes|enabled/i ? 1 : 0;
45 }
46
47 1;