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

Tony Mountifield tony at softins.clara.co.uk
Fri Jun 16 02:14:44 MST 2006


In article <645FEC31A18FE54A8721500CDD55A7B603507405 at mail.oneeighty.com>,
Douglas Garstang <dgarstang at oneeighty.com> 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: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list