Perl Asterisk::AMI question about OriginateResponse


I’m use Asterisk::AMI perl module for catch result of Originate command. Try as example:


use strict;
use EV;
use Asterisk::AMI;
use warnings;

        #Create your connection
        my $astman = Asterisk::AMI->new(PeerAddr => '',
                                        PeerPort => '5038',
                                        Username => 'zzzzz',
                                        Secret => 'zzzzz',
                                        Events => 'call',
                                        Handlers => { OriginateResponse => \&OriginateRespEH });

        die "Unable to connect to asterisk" unless ($astman);

        #Define the subroutines for events

        sub OriginateRespEH  { my ($ami, $event) = @_;
                                print "Got Event: $event->{'Event'} \r\n";


After, from telnet in AMI do Originate. And, if I do Originate with ActionId, my event handler does not work, if without - all work fine.

Than I do wrong?

If problem in Asterisk::AMI, maybe you now modern alternative for perl?