RE: [Asterisk-Users] Executing a Function from AGI
-Original Message- From: Time Bandit [mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 4:49 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Executing a Function from AGI I'm getting nowhere with this. Is it even possible to set a variable to the result of a function call in AGI??? snip SET VARIABLE DIALPATH ${DUNDILOOKUP(2944093|180net)} in both cases, DIALPATH is set to a literal ${DUNDILOOKUP2944093|180net} What am I doing wrong here? You are telling it to assign the value ${DUNDILOOKUP2944093|180net} to the variable DIALPATH, and it seems it is doing exactly that Remember that you're in an AGI, not in the dialplan, so your variable doesn't get interpreted And to answer your question, I think you should call the function, get the result, then assign that to your variable Still not having any luck! I tried sending this to stdout: SET VARIABLE DIALPATH DUNDILOOKUP(2944093|180net) I must be missing something still. I assigned DIALPATH to the function. ___ --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] Executing a Function from AGI
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? 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
RE: [Asterisk-Users] Executing a Function from AGI
What is you AGI written in?? -Original Message- snip 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
RE: [Asterisk-Users] Executing a Function from AGI
Python... but it doesn't matter. The examples I pasted where what I am sending to stdout, so the scripting application shouldn't be an issue. -Original Message- From: Alexander Lopez [mailto:[EMAIL PROTECTED] Sent: Thursday, June 15, 2006 3:31 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Executing a Function from AGI What is you AGI written in?? -Original Message- snip 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 ___ --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] Executing a Function from AGI
I'm getting nowhere with this. Is it even possible to set a variable to the result of a function call in AGI??? -Original Message- From: Douglas Garstang Sent: Thursday, June 15, 2006 3:22 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Executing a Function from AGI 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? 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 ___ --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] Executing a Function from AGI
I'm getting nowhere with this. Is it even possible to set a variable to the result of a function call in AGI??? snip SET VARIABLE DIALPATH ${DUNDILOOKUP(2944093|180net)} in both cases, DIALPATH is set to a literal ${DUNDILOOKUP2944093|180net} What am I doing wrong here? You are telling it to assign the value ${DUNDILOOKUP2944093|180net} to the variable DIALPATH, and it seems it is doing exactly that Remember that you're in an AGI, not in the dialplan, so your variable doesn't get interpreted And to answer your question, I think you should call the function, get the result, then assign that to your variable hth ___ --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