Branch Coverage

blib/lib/Net/SIP/DTMF.pm
Criterion Covered Total %
branch 72 94 76.6


line true false branch
39 36 48 unless defined $event and $event =~ /[\dA-D\*\#]/i
41 42 42 if (defined(my $type = $pargs{'rfc2833_type'})) { }
42 0 elsif (defined($type = $pargs{'audio_type'})) { }
69 9 0 if (defined(my $type = delete $pargs{'rfc2833_type'}))
73 9 0 if (defined(my $type = delete $pargs{'audio_type'}))
77 0 9 unless %sub
83 0 4213 unless $ver == 128
85 36 4177 if ($type & 128)
91 4204 9 if (defined $lastseq)
93 0 4204 if (not $seqdiff) { }
0 4204 elsif ($seqdiff > 32768) { }
94 0 0 if $Net::SIP::DTMF::DEBUG
97 0 0 if $Net::SIP::DTMF::DEBUG
100 0 4204 if $Net::SIP::DTMF::DEBUG and $seqdiff > 1
106 0 4213 unless my $sub = $sub{$type}
107 4141 72 unless my($event, $duration, $media) = &$sub($payload, $time, $marker, $seqdiff)
152 42 739 unless ($initial_timestamp)
157 84 655 if (&gettimeofday() - $start > $duration)
158 42 42 if $end
162 54 643 if $event eq ''
165 24 619 if ($first)
175 643 0 $timestamp > $initial_timestamp ? :
198 36 925 if ($volume & 128)
202 36 925 if (not $current_event) { }
925 0 elsif ($event eq $current_event->[0]) { }
203 0 36 if $end
208 36 889 if ($end)
220 0 0 unless $ce->[2]
272 0 4 if @costab
284 508 130564 if $j < 127 and $ulaw_expandtab[$j + 1] - $i < $i - $ulaw_expandtab[$j]
317 18 24 unless ($f)
321 18 65 if &gettimeofday() - $start > $duration
333 0 24 unless @costab
348 24 602 if &gettimeofday() - $start > $duration
354 48240 48080 $val >= 0 ? :
357 41158 55162 if $e1 < 0
361 45232 51088 if $e2 < 0
386 4 5 unless @costab
392 432194 88126 $_ < 128 ? :
394 0 3252 unless @samples == $samples4pkt
418 18 3234 if @time < $gzpkts
432 913 2321 if (@r and !$r[2][1] || $r[1][1] / $r[2][1] > 5)
434 602 311 unless defined $event
437 2321 913 unless defined $event
443 2285 949 if (not @lastev) { }
913 36 elsif ($event eq $lastev[0][0]) { }
453 0 36 if @ev == 1