[Freeswitch-users] LUA and return variables
viper at fx-services.com
Fri Dec 18 11:51:37 PST 2009
On 12/18/09 7:18 PM, Michael Collins wrote:
> One thing you can do is create an extension that does the enum look up
> and then transfers the call back into the dialplan. You could set up a
Cool idea, didn't think about that!
> separate context that handles just the enum checking. Your condition
> would just need to match whatever var you put the enum return val in. So
> if your var name is "enum_res" then you can transfer like this after
> your enum lookup:
Right, makes sense. Going to try a bit in that direction. Do the enum
lookup and then transfer to an enum handling context. Simple, should
have thought about that. :)
> This is just one way to do it without using a scripting lang. you can by
> all means use Lua as well.
My main question there really was, since I'm not able to work on vars I
set in an extention, will that work if I return vars from a script? It
should really, but I was asking to make sure it would.
I think in that design, the script would have been like three rules or
something, but keeping it in the dialplan is nicer, I think (even though
it says "don't do magic in the dialplan, do it in scripts" on the wiki).
I'll report back when I managed to fiddle something together.
More information about the FreeSWITCH-users