[asterisk-users] AMI Originate issue

Muhammad Faheem faheem2084 at gmail.com
Sat May 11 06:23:40 CDT 2013


Hi,
I'm getting an issue while executing AMI Originate.
I'm getting "extension does not exists" on Originate's Response, and on the
other hand Asterisk CLI say "fwrite() returned error: Broken pipe"
Please suggest me what is wrong.

Muhammad Faheem

### my originate code block ...
-----------------------------------------------------------------------------------------------
# ami-script.pl
my $astman = Asterisk::AMI->new(PeerAddr => '127.0.0.1', PeerPort =>
'5038', Username => 'faheem', Secret => 'secret');
                        die "Unable to connect to asterisk" unless
($astman);
                        my $resp_code = $astman->send_action({Action =>
'Originate',
                                                        Channel =>
'Local/11223344',
                                                        Context => 'users',
                                                        Exten => 100,
                                                        Priority =>1 });
                        sleep(2);
                        my $response = $astman->get_response($resp_code);
                        print $response->{'Response'} ."\n";
                        print $response->{'Message'} ."\n";
                        $astman->disconnect ();

####Script Output...
*Error*
*Extension does not exist*
--------------------------------------------------------------------------------------
;extensions.conf
;;; Asterisk Dialplan
[default]
exten => 11223344,1,NoOp("welcome")
exten => 11223344,n,Answer()
exten => h,1,NoOp("hangup...")

-----------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130511/40ba381e/attachment.htm>


More information about the asterisk-users mailing list