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

bruce bruce bruceb444 at gmail.com
Mon Jun 14 17:19:31 CDT 2010


Thanks for the input. I actually did use verbose() and that is when I
noticed that my path to phpagi was not right since nothing was coming
through.

For return value prior to fixing phpagi path, I was getting:

*NoOp("SIP/64.111.222.111-00000ca7", "")*

which actually is just right because if you notice the last three charecters
of that line is* "")*. So, when the phpagi path is correct, it looks like:
*"415444555")*.

-Bruce

On Mon, Jun 14, 2010 at 6:09 PM, Steve Edwards <asterisk.org at sedwards.com>wrote:

> > 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
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100614/8df69b5a/attachment.htm 


More information about the asterisk-users mailing list