[asterisk-users] How to pass variable back and forth from dialplan to php file?

Steve Edwards asterisk.org at sedwards.com
Mon Jun 14 17:09:11 CDT 2010


> On Mon, 2010-06-14 at 14:57 -0400, bruce bruce wrote:

>> Carlos, Thanks a lot for getting me started. That helps a great deal.

>> exten => _x.,1,NoOp(${EXTEN})

Since you're just getting started, there is an application specifically 
written to send output to the CLI -- verbose(). It's more "obvious" and it 
has additional functionality.

On Mon, 14 Jun 2010, Carlos Chavez wrote:

> As you can see agi_extension and agi_dnid should contain the number that 
> the user dialed.  Those are all the variables that are automatically 
> sent to the AGI script from Asterisk.

agi_extension contains the extension (the bit after the equals sign) of 
the statement that executes the AGI application. For example,

 	exten = s,n,			agi(foo)

When "foo" examines agi_extension, it will contain "s"

> I do not know why you are getting the channel instead of the extension, 
> you could try giving the extension as a parameter to the AGI script if 
> you cannot get that from the included request variable.

Better to fix the really simple stuff before he gets to the complex stuff.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list