Wow, thanks so much, couldn&#39;t i just eliminate the top portion of that code up until:<span class="Apple-style-span" style="color: rgb(0, 0, 128); font-family: Arial; font-size: 13px; "> $astman-&gt;host($man_addr);</span><div>
<font class="Apple-style-span" color="#000080" face="Arial">and replace <span class="Apple-style-span" style="font-size: 13px; ">               $astman-&gt;host($man_addr); with </span><span class="Apple-style-span" style="font-size: 13px; ">               $astman-&gt;host(&#39;localhost&#39;);</span></font></div>
<div><font class="Apple-style-span" color="#000080" face="Arial"><br></font></div><div><font class="Apple-style-span" color="#000080" face="Arial">?<br></font><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 9:54 AM, Danny Nicholas <span dir="ltr">&lt;<a href="mailto:danny@debsinc.com">danny@debsinc.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">










<div lang="EN-US" link="blue" vlink="blue">

<div>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">Here’s a snippet to place a call
using Asterisk Manager (AMI) and PERL</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">     open (my $man_in,
&quot;/etc/asterisk/manager.conf&quot;) or $man_ok=undef;</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               if ($man_ok) {</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                  while (&lt;$man_in&gt;)
{</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                     if ($_ =~
/^bindaddr/) {</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                        (undef,$man_addr)
= split /\=/, $_;</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                        }</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                     }</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                  close $man_in;</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                  }</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               $man_addr =~ s/\s//g;</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               ( $man_addr )=( $man_addr
=~ /(.*)/ );</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">              
$astman-&gt;host($man_addr);</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               $astman-&gt;connect || die
&quot;Could not connect to &quot; . $astman-&gt;host . &quot;!\n&quot;;</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               my %resp =
$astman-&gt;sendcommand(  Action =&gt; &#39;Originate&#39;,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                          
Channel =&gt; $extval,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                          
Variable =&gt; &quot;ARG1=$fileval&quot;,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                           Exten
=&gt; $extval,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                          
Context =&gt; &#39;recordit&#39;,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                          
priority =&gt; 1,</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                           Number
=&gt; 5551212</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">                                                          
);</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy">               %resp =
$astman-&gt;sendcommand(  Action =&gt; &#39;Logoff&#39;);</span></font></p>

<p class="MsoNormal"><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"> </span></font></p>

<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma">
<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>
[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b><span style="font-weight:bold">On Behalf Of </span></b>vip killa<br>
<b><span style="font-weight:bold">Sent:</span></b> Wednesday, April 06, 2011
8:49 AM<br>
<b><span style="font-weight:bold">To:</span></b> Asterisk
 Users Mailing List - Non-Commercial Discussion<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [asterisk-users] agi
voicemail callback</span></font></p>

</div><div><div></div><div class="h5">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">like a perl script? could
you originate a call using Perl and AMI ?</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On Wed, Apr 6, 2011 at 9:13 AM, Steve Edwards &lt;<a href="http://asterisk.org" target="_blank">asterisk.org</a>@<a href="http://sedwards.com" target="_blank">sedwards.com</a>&gt;
wrote:</span></font></p>

<div>

<p class="MsoNormal" style="margin-bottom:12.0pt"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">On Wed, 6 Apr 2011, vip
killa wrote:</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">What about a executing an AGI script with:<br>
[general]<br>
externnotify = /some_agi_script.agi<br>
<br>
Would that work?</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">No.<br>
<br>
What makes a program (compiled or interpreted script) an AGI is that it follows
the AGI protocol.<br>
<br>
Very simplistically, the AGI protocol consists of 2 things:<br>
<br>
1) the AGI environment sent to the AGI&#39;s STDIN<br>
<br>
2) a defined interface to ask Asterisk to do things in the form of a request
and a response.<br>
<br>
Externnotify will work if the program is not an AGI.</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"><br>
<br>
-- <br>
Thanks in advance,<br>
-------------------------------------------------------------------------<br>
Steve Edwards       <a href="mailto:sedwards@sedwards.com" target="_blank">sedwards@sedwards.com</a>      Voice: <a href="tel:%2B1-760-468-3867" value="+17604683867" target="_blank">+1-760-468-3867</a>
PST<br>
Newline                    
                     
   Fax: <a href="tel:%2B1-760-731-3000" value="+17607313000" target="_blank">+1-760-731-3000</a><br>
<br>
--<br>
_____________________________________________________________________</span></font></p>

</div>

<div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">-- 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></span></font></p>

</div>

</div>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div></div></div>

</div>

</div>


<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></blockquote></div><br></div>