[asterisk-users] Return data from Fast AGI

Douglas Garstang dgarstang at oneeighty.com
Thu Aug 17 15:43:31 MST 2006


> -----Original Message-----
> From: Anders Nygren [mailto:anders.nygren at gmail.com]
> Sent: Thursday, August 17, 2006 4:32 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Return data from Fast AGI
> 
> 
> On 8/17/06, Douglas Garstang <dgarstang at oneeighty.com> wrote:
> > > -----Original Message-----
> > > From: Justin Tunney [mailto:jtunney at gmail.com]
> > > Sent: Thursday, August 17, 2006 3:36 PM
> > > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > > Subject: Re: [asterisk-users] Return data from Fast AGI
> > >
> > >
> > > On Thursday 17 August 2006 17:12, Douglas Garstang wrote:
> > > > Ok, maybe I'm having a brain fart, or maybe I've never
> > > gotten quite this
> > > > far, but, if you call a fast AGI script, how do you RETURN
> > > data from the
> > > > fast AGI back to the dialplan???
> > >
> > > You could set some channel variables.
> >
> > See, that's what I can't work out. Let's say you have this 
> in your dialplan.
> >
> > exten => _X.,1,AGI(agi://server.gumby.com)
> >
> > Control at this point is passed to the server. That server 
> has no relationship with the Asterisk process. It doesn't 
> even have access to the STDOUT and STDERR streams tied to 
> Asterisk. If you send anything to STDOUT from the server (ie 
> set a channel variable), it's just going to go to STDOUT of 
> the server process, which is probably the terminal it's 
> running on. And what happens if the server process is on a 
> different host?
> >
> > It seems like you can't return variable from Fast AGI or 
> interact with the dial plan in any way, by setting or getting 
> dial plan variables. I must be missing something here.
> >
> Doug
> With fastAGI You have a TCP connection between the Asterisk 
> box and the
> fastAGI server so You have to send Your commands on that connection.
> 
> There are "get variable" and "set variable" commands  among 
> many others.

Anders, yes I know. That's why I can't understand how stdout is of any use. The stdout of the server process is _not_ the same as the stdout of the Asterisk process. If you set a variable in the server process by writing to stdout, the Asterisk process won't know anything about it.

Given that all you have on the client side is:

exten => _X.,1,AGI(agi://server.gumby.com)

... how do you send commands?

Doug.





More information about the asterisk-users mailing list