asterisk_hangup => {
'Event' => 'Hangup'
},
+ asterisk_dial => {
+ 'Event' => 'Dial'
+ },
asterisk_input => ':all',
},
$kernel->state('asterisk_ring', $self, 'ring');
$kernel->state('asterisk_ringing', $self, 'ringing');
$kernel->state('asterisk_hangup', $self, 'hangup');
+ $kernel->state('asterisk_dial', $self, 'dial');
},
},
);
my ($self, $kernel, $input) = @_[OBJECT, KERNEL, ARG0];
print STDERR "Other input - $input->{Event}\n";
- #print Dumper($input);
+ print Dumper($input);
}
sub hangup {
my ($self, $kernel, $input) = @_[OBJECT, KERNEL, ARG0];
}
+sub dial {
+ my ($self, $kernel, $input) = @_[OBJECT, KERNEL, ARG0];
+
+ my $dest = $input->{Destination};
+ $dest =~ s/(.*)-.*/$1/;
+
+ my $text = Clutter::Label->new('Sans 20', "Call from " . $input->{CallerIDName} . "\n " . $input->{CallerID} . "\nFor $dest");
+ $text->set_color(Clutter::Color->parse('White'));
+ $text->set_ellipsize('end');
+
+ $kernel->post('display', 'notifications_add', $text);
+}
+
+
+
1;