[Freeswitch-users] lua library

Leon de Rooij leon at scarlet-internet.nl
Wed Jun 20 19:36:25 MSD 2012


I put my libs in the same dir as the rest of the FS Lua scripts and have this in my lua.conf.xml

	<param name="script-directory" value="$${base_dir}/scripts/?.lua"/>

then I can just

	require 'foo'

in my scripts, without specifying a path

regards,

Leon


On Jun 20, 2012, at 10:24, Alex wrote:

> Got some fairly common lua functions that I'd like to use as a library.
> I note that there is a "require" feature in lua, but that requires 
> modification of the environment variables.
> I was wondering if there isn't a simpler "include" type mechanism where 
> I can specify the full path of a lua script?
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> 
> 
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
> 
> Join Us At ClueCon - Aug 7-9, 2012
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list