[Asterisk-Users] Re: Executing a Function from AGI

2006-06-17 Thread Stefan Tichy
On Fri, Jun 16, 2006 at 09:20:18AM -0600, Douglas Garstang wrote:
> Oh... Thanks... This doesn't seem to be documented anywhere.
> Where did you find out about this?

The output of "dump agihtml" gives some hint

"Understands complex variable names and builtin variables, unlike GET VARIABLE."


-- 
Stefan Tichy   <[EMAIL PROTECTED]>
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] Re: Executing a Function from AGI

2006-06-16 Thread Douglas Garstang
> -Original Message-
> From: Stefan Tichy [mailto:[EMAIL PROTECTED]
> Sent: Friday, June 16, 2006 7:26 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [Asterisk-Users] Re: Executing a Function from AGI
> 
> 
> On Thu, Jun 15, 2006 at 03:21:32PM -0600, Douglas Garstang wrote:
> > I've tried this:
> > EXEC "Set" "DIALPATH=${DUNDILOOKUP(2944093|180net)}"
> > 
> > and also:
> > SET VARIABLE DIALPATH ${DUNDILOOKUP(2944093|180net)}
> > 
> > in both cases, DIALPATH is set to a literal 
> "${DUNDILOOKUP2944093|180net}"
> 
> "get full variable" evaluates a channel expression, but "set
> variable" cannot be used this way.
> 
> Use "GET FULL VARIABLE" to get the value and then use "SET VARIABLE"
> to store this value in the DIALPATH variable. 

Oh... Thanks... This doesn't seem to be documented anywhere.
Where did you find out about this?

Doug.
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] Re: Executing a Function from AGI

2006-06-16 Thread Stefan Tichy
On Thu, Jun 15, 2006 at 03:21:32PM -0600, Douglas Garstang wrote:
> I've tried this:
> EXEC "Set" "DIALPATH=${DUNDILOOKUP(2944093|180net)}"
> 
> and also:
> SET VARIABLE DIALPATH ${DUNDILOOKUP(2944093|180net)}
> 
> in both cases, DIALPATH is set to a literal "${DUNDILOOKUP2944093|180net}"

"get full variable" evaluates a channel expression, but "set
variable" cannot be used this way.

Use "GET FULL VARIABLE" to get the value and then use "SET VARIABLE"
to store this value in the DIALPATH variable. 


-- 
Stefan Tichy   <[EMAIL PROTECTED]>
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] Re: Executing a Function from AGI

2006-06-16 Thread Tony Mountifield
In article <[EMAIL PROTECTED]>,
Douglas Garstang <[EMAIL PROTECTED]> wrote:
> Hmmm. Not having much luck with this. I'm trying to call the DUNDILOOKUP
> function and assign it to a variable in an AGI script.  I've tried
> setting with EXEC CMD and with SET VARIABLE. In both cases, it's
> treating DUNDILOOKUP literally, rather than calling a funciton.
> 
> I've tried this:
> EXEC "Set" "DIALPATH=${DUNDILOOKUP(2944093|180net)}"
> 
> and also:
> SET VARIABLE DIALPATH ${DUNDILOOKUP(2944093|180net)}
> 
> in both cases, DIALPATH is set to a literal "${DUNDILOOKUP2944093|180net}"
> 
> What am I doing wrong here?

I think you need to do "GET VARIABLE DUNDILOOKUP(2944093|180net)", with
no ${}, and then do whatever you need with the return value, such as
passing it to "SET VARIABLE DIALPATH ...".

Cheers
Tony
-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org
___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users