| line |
true |
false |
branch |
|
637
|
0 |
0 |
if ($self->_configure(%values) and $self->_connect) |
|
650
|
0 |
0 |
if ($$hdl{'rbuf'} =~ s/^(.+)(?:\015\012\015\012)//osx) |
|
702
|
0 |
0 |
if (not exists $config_options{$opt}) { } |
|
|
0 |
0 |
elsif (not defined $val) { } |
|
703
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
711
|
0 |
0 |
if (ref $val ne $config_options{$opt}) { } |
|
|
0 |
0 |
elsif ($opt eq 'HANDLERS') { } |
|
714
|
0 |
0 |
if ($config_options{$opt} eq 'CODE') { } |
|
|
0 |
0 |
elsif ($config_options{$opt} eq 'HASH') { } |
|
715
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
718
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
723
|
0 |
0 |
if ($config_options{$opt} eq 'bool') { } |
|
|
0 |
0 |
elsif ($config_options{$opt} eq 'num') { } |
|
724
|
0 |
0 |
if ($val =~ /[^\d]/x or $val != 0 and $val != 1) |
|
725
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
730
|
0 |
0 |
if ($val =~ /[^\d]/x) |
|
731
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
740
|
0 |
0 |
if (not @match) { } |
|
741
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
752
|
0 |
0 |
if (ref $handler ne 'CODE') |
|
753
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
765
|
0 |
0 |
unless (exists $$self{'CONFIG'}{$req}) |
|
766
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
772
|
0 |
0 |
if ($$self{'CONFIG'}{'USESSL'}) |
|
778
|
0 |
0 |
unless (defined $$self{'CONFIG'}{$opt}) |
|
784
|
0 |
0 |
if ($$self{'CONFIG'}{'ORIGINATEHACK'}) |
|
786
|
0 |
0 |
if (lc $$self{'CONFIG'}{'EVENTS'} eq 'off') { } |
|
|
0 |
0 |
elsif (not lc($$self{'CONFIG'}{'EVENTS'}) =~ /on|call/x) { } |
|
790
|
0 |
0 |
unless $$self{'CONFIG'}{'HANDLERS'} |
|
805
|
0 |
0 |
if $$self{'CONFIG'}{'KEEPALIVE'} |
|
821
|
0 |
0 |
if (exists $$self{'CONFIG'}{'ON_CONNECT_ERR'}) { } |
|
|
0 |
0 |
elsif (exists $$self{'CONFIG'}{'ON_ERROR'}) { } |
|
845
|
0 |
0 |
if exists $$self{'CONFIG'}{'ON_ERROR'} |
|
866
|
0 |
0 |
if (exists $$self{'CONFIG'}{'ON_DISCONNECT'}) { } |
|
|
0 |
0 |
elsif (exists $$self{'CONFIG'}{'ON_ERROR'}) { } |
|
885
|
0 |
0 |
if (exists $$self{'CONFIG'}{'ON_TIMEOUT'}) { } |
|
|
0 |
0 |
elsif (exists $$self{'CONFIG'}{'ON_ERROR'}) { } |
|
901
|
0 |
0 |
if ($line =~ m[^Asterisk\ Call\ Manager/([0-9]\.[0-9])$]ox) { } |
|
930
|
0 |
0 |
if $$self{'CONFIG'}{'USESSL'} |
|
932
|
0 |
0 |
if $$self{'CONFIG'}{'TCP_KEEPALIVE'} |
|
938
|
0 |
0 |
if $$self{'CONFIG'}{'BLOCKING'} |
|
944
|
0 |
0 |
if defined $$self{'handle'} |
|
957
|
0 |
0 |
if ($line =~ s/--END\ COMMAND--$//ox) { } |
|
971
|
0 |
0 |
if (exists $parsed{'ActionID'}) { } |
|
|
0 |
0 |
elsif (exists $parsed{'Event'}) { } |
|
987
|
0 |
0 |
if (defined $$self{'RESPONSEBUFFER'}{$actionid}{'Response'} and $$self{'RESPONSEBUFFER'}{$actionid}{'Response'} =~ /^(?:Success|Follows|Goodbye|Events Off|Pong)$/ox) |
|
993
|
0 |
0 |
if (defined $$self{'CALLBACKS'}{$actionid}{'cb'}) |
|
1020
|
0 |
0 |
unless $$self{'EXPECTED'}{$actionid} |
|
1023
|
0 |
0 |
if (exists $$packet{'Event'}) { } |
|
|
0 |
0 |
elsif (exists $$packet{'Response'}) { } |
|
1025
|
0 |
0 |
if ($$packet{'Event'} =~ /[cC]omplete/ox) { } |
|
1029
|
0 |
0 |
if ($$packet{'Event'} eq 'DBGetResponse' or $$packet{'Event'} eq 'OriginateResponse') |
|
1039
|
0 |
0 |
if ($$packet{'Response'} ne 'Follows') |
|
1041
|
0 |
0 |
unless ($$self{'RESPONSEBUFFER'}{$actionid}{'ASYNC'} or exists $$packet{'Message'} and $$packet{'Message'} =~ /[fF]ollow/ox) |
|
1049
|
0 |
0 |
if ($_ =~ /^(?:Response|Message|ActionID|Privilege|CMD|COMPLETED)$/ox) { } |
|
1057
|
0 |
0 |
if ($$self{'RESPONSEBUFFER'}{$actionid}{'COMPLETED'}) |
|
1073
|
0 |
0 |
if ($$self{'CONFIG'}{'HANDLERS'}) { } |
|
1074
|
0 |
0 |
if (exists $$self{'CONFIG'}{'HANDLERS'}{$$event{'Event'}}) { } |
|
|
0 |
0 |
elsif (exists $$self{'CONFIG'}{'HANDLERS'}{'default'}) { } |
|
1081
|
0 |
0 |
if (exists $$self{'CALLBACKS'}{'EVENT'}) { } |
|
1099
|
0 |
0 |
if ($$self{'RESPONSEBUFFER'}{$id}{'COMPLETED'}) |
|
1111
|
0 |
0 |
unless defined $timeout |
|
1116
|
0 |
0 |
if ($timeout) |
|
1148
|
0 |
0 |
if ($key eq 'CALLBACK') { } |
|
|
0 |
0 |
elsif ($key eq 'TIMEOUT') { } |
|
|
0 |
0 |
elsif ($lkey eq 'async' and $value == 1) { } |
|
|
0 |
0 |
elsif ($lkey eq 'actionid') { } |
|
1149
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
1152
|
0 |
0 |
unless defined $callback |
|
1156
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
1159
|
0 |
0 |
unless defined $timeout |
|
1166
|
0 |
0 |
if warnings::enabled('Asterisk::AMI') |
|
1171
|
0 |
0 |
if (ref $value eq 'ARRAY') { } |
|
1191
|
0 |
0 |
unless $$self{'handle'} |
|
1194
|
0 |
0 |
if ($$self{'idseq'} > $$self{'CONFIG'}{'BUFFERSIZE'}) |
|
1211
|
0 |
0 |
unless defined $callback |
|
1212
|
0 |
0 |
unless defined $timeout |
|
1214
|
0 |
0 |
if ($$self{'LOGGEDIN'} or lc($$actionhash{'Action'}) =~ /login|challenge/x) { } |
|
1228
|
0 |
0 |
unless defined $timeout |
|
1231
|
0 |
0 |
if (defined $callback) |
|
1239
|
0 |
0 |
if ($timeout and defined $$self{'CALLBACKS'}{$id}) |
|
1262
|
0 |
0 |
unless defined $actionid |
|
1266
|
0 |
0 |
if ($$resp{'COMPLETED'}) |
|
1279
|
0 |
0 |
unless defined $actionid |
|
1284
|
0 |
0 |
if ($$resp{'COMPLETED'}) |
|
1297
|
0 |
0 |
if (defined $actionid) |
|
1312
|
0 |
0 |
if (defined $actionid) |
|
1314
|
0 |
0 |
if ($$resp{'COMPLETED'}) |
|
1343
|
0 |
0 |
unless $$self{'CONFIG'}{'TIMEOUT'} |
|
1351
|
0 |
0 |
if (lc $$self{'CONFIG'}{'AUTHTYPE'} eq 'md5') { } |
|
1360
|
0 |
0 |
if ($$self{'CONFIG'}{'BLOCKING'}) { } |
|
1373
|
0 |
0 |
if ($$login{'GOOD'}) { } |
|
1377
|
0 |
0 |
if $$self{'CONFIG'}{'ON_CONNECT'} |
|
1389
|
0 |
0 |
if ($$login{'COMPLETED'}) { } |
|
1408
|
0 |
0 |
if (%{$challenge;}) { } |
|
1413
|
0 |
0 |
if ($$chresp{'GOOD'}) { } |
|
1423
|
0 |
0 |
if ($$chresp{'COMPLETED'}) { } |
|
1450
|
0 |
0 |
if (%{$challenge;}) { } |
|
1453
|
0 |
0 |
if ($_[1]{'GOOD'}) { } |
|
1467
|
0 |
0 |
if ($_[1]{'COMPLETED'}) { } |
|
1502
|
0 |
0 |
unless defined $timeout |
|
1504
|
0 |
0 |
unless (defined $$self{'EVENTBUFFER'}[0]) |
|
1511
|
0 |
0 |
unless defined $timeout |
|
1513
|
0 |
0 |
if ($timeout) |
|
1537
|
0 |
0 |
if ($self and $self->simple_action({'Action', 'Ping'}, $timeout)) |
|
1556
|
0 |
0 |
unless ($_[1]{'GOOD'}) |
|
1604
|
0 |
0 |
if (not $$self{'SOCKERR'} and $$self{'LOGGEDIN'}) |
|
1610
|
0 |
0 |
if ($$self{'handle'}) |