question... how reliable is what you wrote? as long as the daemon is running will the AMI stay connected?<br><br><div class="gmail_quote">On Mon, May 16, 2011 at 4:08 PM, vip killa <span dir="ltr"><<a href="mailto:vipkilla@gmail.com">vipkilla@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Umm thank you...apparently AMI::Asterisk sucks because that code did everything i needed in one try. thanks again!<div>
<div></div><div class="h5"><br><br><div class="gmail_quote">On Mon, May 16, 2011 at 3:58 PM, Alex Balashov <span dir="ltr"><<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 05/16/2011 03:48 PM, vip killa wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
yes, it's originating the call and never responding.<br>
</blockquote>
<br></div>
This sounds to me like a possible problem with the Asterisk::AMI module, although I am unsure what the problem is, since I am not familiar with its internal architecture and have never used it.<br>
<br>
To debug, try initiating the AMI connection and issuing the Originate statement raw:<br>
<br>
use IO::Socket;<br>
<br>
...<br>
<br>
my $mgr_sock = IO::Socket::INET->new(<br>
'PeerAddr' => '127.0.0.1',<br>
'PeerPort' => 5038,<br>
'Type' => SOCK_STREAM,<br>
'Protocol' => 'TCP',<br>
'Timeout' => 5);<br>
<br>
print $mgr_sock<br>
"Action: login\r\n" .<br>
"Username: XXXXXXXXXX\r\n" .<br>
"Secret: XXXXXXXXXX\r\n" .<br>
"\r\n";<br>
<br>
sleep(1);<br>
<br>
...<br>
<br>
print $mgr_sock<br>
"Action: Originate\r\n" .<br>
"Channel: Local/$row[2]\@outbound\r\n" .<br>
"Context: page\r\n" .<br>
"CallerID: $row[1]\r\n" .<br>
"Exten: $row[1]\r\n" .<br>
"Priority: 1\r\n" .<br>
"Async: 1\r\n" .<br>
"\r\n";<br>
<br>
while(defined($mgr_sock) && $_ = <$mgr_sock>) {<br>
print;<br>
}<br>
<br>
sleep(1);<br>
<br>
close $mgr_sock;<div><div></div><div><br>
<br>
-- <br>
Alex Balashov - Principal<br>
Evariste Systems LLC<br>
260 Peachtree Street NW<br>
Suite 2200<br>
Atlanta, GA 30303<br>
Tel: <a href="tel:%2B1-678-954-0670" value="+16789540670" target="_blank">+1-678-954-0670</a><br>
Fax: <a href="tel:%2B1-404-961-1892" value="+14049611892" target="_blank">+1-404-961-1892</a><br>
Web: <a href="http://www.evaristesys.com/" target="_blank">http://www.evaristesys.com/</a><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>