line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
43
|
|
|
43
|
|
2464060
|
use strict; |
|
43
|
|
|
|
|
387
|
|
|
43
|
|
|
|
|
1152
|
|
2
|
43
|
|
|
43
|
|
191
|
use warnings; |
|
43
|
|
|
|
|
62
|
|
|
43
|
|
|
|
|
1024
|
|
3
|
43
|
|
|
43
|
|
817
|
use 5.010; |
|
43
|
|
|
|
|
140
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Net::SIP; |
6
|
|
|
|
|
|
|
our $VERSION = '0.820'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# this includes nearly everything else |
9
|
43
|
|
|
43
|
|
17073
|
use Net::SIP::Simple (); |
|
43
|
|
|
|
|
130
|
|
|
43
|
|
|
|
|
942
|
|
10
|
43
|
|
|
43
|
|
18572
|
use Net::SIP::Simple::Call (); |
|
43
|
|
|
|
|
123
|
|
|
43
|
|
|
|
|
1028
|
|
11
|
43
|
|
|
43
|
|
277
|
use List::Util 'first'; |
|
43
|
|
|
|
|
81
|
|
|
43
|
|
|
|
|
2195
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# do not include these, because they are only |
14
|
|
|
|
|
|
|
# used when we do NAT |
15
|
|
|
|
|
|
|
# use Net::SIP::NATHelper::Base; |
16
|
|
|
|
|
|
|
# use Net::SIP::NATHelper::Local; |
17
|
|
|
|
|
|
|
# use Net::SIP::NATHelper::Client; |
18
|
|
|
|
|
|
|
# use Net::SIP::NATHelper::Server; |
19
|
|
|
|
|
|
|
|
20
|
43
|
|
|
43
|
|
231
|
use base 'Exporter'; |
|
43
|
|
|
|
|
69
|
|
|
43
|
|
|
|
|
7569
|
|
21
|
|
|
|
|
|
|
our (@EXPORT_OK, %EXPORT_TAGS); |
22
|
|
|
|
|
|
|
BEGIN { |
23
|
43
|
|
|
43
|
|
217
|
foreach ( qw( |
24
|
|
|
|
|
|
|
Net::SIP::Request |
25
|
|
|
|
|
|
|
Net::SIP::Response |
26
|
|
|
|
|
|
|
Net::SIP::Packet |
27
|
|
|
|
|
|
|
Net::SIP::SDP |
28
|
|
|
|
|
|
|
Net::SIP::Simple |
29
|
|
|
|
|
|
|
Net::SIP::Simple::RTP |
30
|
|
|
|
|
|
|
Net::SIP::Dispatcher |
31
|
|
|
|
|
|
|
Net::SIP::Dispatcher::Eventloop |
32
|
|
|
|
|
|
|
Net::SIP::Redirect |
33
|
|
|
|
|
|
|
Net::SIP::Registrar |
34
|
|
|
|
|
|
|
Net::SIP::StatelessProxy |
35
|
|
|
|
|
|
|
Net::SIP::Blocker |
36
|
|
|
|
|
|
|
Net::SIP::ReceiveChain |
37
|
|
|
|
|
|
|
Net::SIP::Authorize |
38
|
|
|
|
|
|
|
Net::SIP::Endpoint |
39
|
|
|
|
|
|
|
Net::SIP::NATHelper::Client |
40
|
|
|
|
|
|
|
Net::SIP::NATHelper::Server |
41
|
|
|
|
|
|
|
Net::SIP::NATHelper::Local |
42
|
|
|
|
|
|
|
Net::SIP::Debug |
43
|
|
|
|
|
|
|
Net::SIP::Dropper |
44
|
|
|
|
|
|
|
Net::SIP::Leg |
45
|
|
|
|
|
|
|
)) { |
46
|
|
|
|
|
|
|
|
47
|
903
|
|
|
|
|
1156
|
my $pkg = $_; # copy from alias |
48
|
903
|
|
|
|
|
918
|
my $sub; |
49
|
903
|
50
|
|
|
|
2632
|
if ( $pkg =~m{^Net::SIP::(.*)} ) { |
|
|
0
|
|
|
|
|
|
50
|
903
|
|
|
|
|
2072
|
( $sub = $1 ) =~s{::}{_}g; |
51
|
|
|
|
|
|
|
} elsif ( $pkg =~m{::(\w+)$} ) { |
52
|
0
|
|
|
|
|
0
|
$sub = $1; |
53
|
|
|
|
|
|
|
} |
54
|
903
|
50
|
|
|
|
1466
|
if ( $sub ) { |
55
|
43
|
|
|
43
|
|
318
|
no strict 'refs'; |
|
43
|
|
|
|
|
80
|
|
|
43
|
|
|
|
|
3354
|
|
56
|
903
|
|
|
|
|
4156
|
*{ $sub } = sub () { $pkg }; |
|
903
|
|
|
|
|
3561
|
|
|
0
|
|
|
|
|
0
|
|
57
|
903
|
|
|
|
|
1690
|
push @EXPORT_OK,$sub; |
58
|
903
|
|
|
|
|
982
|
push @{ $EXPORT_TAGS{alias} },$sub; |
|
903
|
|
|
|
|
13310
|
|
59
|
|
|
|
|
|
|
}; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
sub import { |
65
|
47
|
|
|
47
|
|
340
|
my $class = shift; |
66
|
47
|
|
|
|
|
125
|
my @tags = @_; |
67
|
47
|
|
|
|
|
607
|
while ( my $tag = shift(@tags)) { |
68
|
112
|
100
|
|
|
|
485
|
if ( $tag eq ':all' ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
69
|
25
|
|
|
|
|
84
|
push @tags,':alias',':util',':debug'; |
70
|
|
|
|
|
|
|
} elsif ( $tag eq ':util' ) { |
71
|
25
|
|
|
|
|
2967
|
Net::SIP::Util->export_to_level(1,$class,':all') |
72
|
|
|
|
|
|
|
} elsif ( $tag eq ':debug' ) { |
73
|
29
|
|
|
|
|
30174
|
Net::SIP::Debug->export_to_level(1,$class,':DEFAULT') |
74
|
|
|
|
|
|
|
} elsif ( $tag eq ':alias' ) { |
75
|
29
|
|
|
|
|
4284
|
$class->export_to_level(1,$class,$tag); |
76
|
|
|
|
|
|
|
} elsif ( $tag =~m{rtp[=:](\d+)-(\d+)}i ) { |
77
|
0
|
|
|
|
|
0
|
$Net::SIP::Util::RTP_MIN_PORT = $1; |
78
|
0
|
|
|
|
|
0
|
$Net::SIP::Util::RTP_MAX_PORT = $2; |
79
|
|
|
|
|
|
|
} elsif ( $tag =~m{^debug[=:](.*)}i ) { |
80
|
0
|
|
|
|
|
0
|
Net::SIP::Debug->level($1); |
81
|
84
|
|
|
84
|
|
93
|
} elsif ( first { $_ eq $tag } @EXPORT_OK ) { |
82
|
|
|
|
|
|
|
# from the predefined list |
83
|
0
|
|
|
|
|
0
|
$class->export_to_level(1,$class,$tag); |
84
|
|
|
|
|
|
|
} else { |
85
|
|
|
|
|
|
|
# default try to import from Net::SIP::Util |
86
|
4
|
|
|
|
|
221
|
Net::SIP::Util->export_to_level(1,$class,$tag) |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
1; |