[asterisk-users] combining AGI with dialplans

Lee Jenkins lee at datatrakpos.com
Fri Jun 15 17:31:04 CDT 2007


james at dades.ca wrote:
> On 2007-05-15 Tony Mountifield wrote (wrt using AGI scripts to dial out):
> 
>> Can't comment on this one, as I never use AGI to dial.
>> My AGIs just set the context, extension and priority,
>> and exit to the dialplan to do any dialling.
> 
> (http://article.gmane.org/gmane.comp.telephony.pbx.asterisk.user/185537)
> 
> 
> I would like to do this, but I am having trouble figuring out how. I have
> tried the following but it is not working for me:
> 
> 
> ***test.php***
> #!/usr/bin/php -q
> <?php
>     require_once('phpagi.php');
>     $agi = new AGI();
> 
>     $dialstr="IAX2/wayne/112 at testcntxt";
>     $agi->SetVar("JAMES",$dialstr);
>     exit(0);
> ?>
> 
> ***extensions.conf***
> [from-sip]
> exten => 111,1,DeadAGI(test.php)
> exten => 111,2,Dial(${JAMES})
> exten => 111,3,Hangup
> 
> 
> 
> Thanks in advance for any help.
> James
> 

Checkout the "h" hangup extension:
http://www.voip-info.org/wiki/index.php?page=Asterisk+h+extension

-- 

Warm Regards,

Lee






More information about the asterisk-users mailing list