Hi, Jan Willamowius wrote: > Hi, > > the LUA scripting is still highly experimental and the way how LUA > scripts interface with GnuGk may still change. Thats why I haven't added > anything to the manual, yet. > > The main idea is that you shouldn’t have to worry about keeping another > process running to make complex routing decisions or destination > rewrites. Right now the 'lua' policy can do about the same things the > 'vqueue' and 'sql' policies can do, just more convenient. A lot more convenient. SQL becomes plenty painful pretty fast if you need to do anything complicated. > With the latest CVS, you can add > > [RoutingPolicy] > default=lua,explicit,internal > > [Routing::Lua] > ;Script=destAlias=string.gsub(calledAlias, "#", "*") > ;Script=destAlias=calledAlias;destAlias=string.gsub(destAlias, "#", "*") > ScriptFile=myscript.lua > > The current interface between LUA and GnuGk is that the script gets > access to a number of global symbols, like "calledAlias" and writes the > new destination to "destAlias" and GnuGk will treat this the same as a > RouteToAlias. What you do in the LUA script to make the transformation > is all up to you. > There are a few more symbols you can use. See Routing.cxx. > > If somebody tries this, please give me feedback how you like the > interface. I'm considering to move away from the lists of symbols maybe > towards functions GetProperty("calledAlias") and > SetProperty("destAlias", "new value") or even something completely > different. > > It would also be cool to have this kind of scripting ability for CLI > rewriting... > > Regards, > Jan > ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________________ Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users Homepage: http://www.gnugk.org/