<div dir="ltr">Hi,<div style>I'm getting an issue while executing AMI Originate. </div><div style>I'm getting "extension does not exists" on Originate's Response, and on the other hand Asterisk CLI say "fwrite() returned error: Broken pipe"</div>
<div style>Please suggest me what is wrong.</div><div style><br></div><div style>Muhammad Faheem</div><div style><br></div><div style>### my originate code block ...</div><div style>-----------------------------------------------------------------------------------------------</div>
<div style><div style># <a href="http://ami-script.pl">ami-script.pl</a></div><div>my $astman = Asterisk::AMI->new(PeerAddr => '127.0.0.1', PeerPort => '5038', Username => 'faheem', Secret => 'secret');</div>
<div> die "Unable to connect to asterisk" unless ($astman);<br></div><div> my $resp_code = $astman->send_action({Action => 'Originate',<br></div><div> Channel => 'Local/11223344',</div>
<div> Context => 'users',</div><div> Exten => 100,</div><div> Priority =>1 });</div>
<div> sleep(2);<br></div><div> my $response = $astman->get_response($resp_code);<br></div><div> print $response->{'Response'} ."\n";</div>
<div> print $response->{'Message'} ."\n";<br></div><div> $astman->disconnect ();</div><div><br></div><div style>####Script Output...</div><div style><b>Error</b></div>
<div><b>Extension does not exist</b><br></div><div>--------------------------------------------------------------------------------------</div><div style>;extensions.conf</div><div style>;;; Asterisk Dialplan </div><div style>
<div>[default]</div><div>exten => 11223344,1,NoOp("welcome")</div><div>exten => 11223344,n,Answer()</div><div>exten => h,1,NoOp("hangup...")<br></div><div><br></div></div><div style>-----------------------------------------------------------------------------------------</div>
<div style><br></div><div><br></div><div><br></div></div></div>