I now have the following lines added in
lua.conf ---
<param name="xml-handler-script" value="$${base_dir}/scripts/dir.lua"/>
<param name="xml-handler-bindings" value="directory" />
dir.lua ---
freeswitch.consoleLog("info", params:serialize("xml") .. "\n")
// Do some api check here to decide allow REGISTER or not
session:hangup();
I am able to see the custom header with the consoleLog on params
but if I try to stop this incoming REGISTER request using
the hangup() call
I get FS complaining about "attempt to index global 'session' (a nil value)"
How can I go about locating this incoming REGISTER that's not a session yet?
thanks again for the help,
Mark
On Thursday, November 14, 2013 3:20 PM, Mark Tsai <twkid@yahoo.com> wrote:
Thanks for the quick reply.
I've tried using mod_xml_curl with directory binding. My observation is that the xml fetch only happens once - when FS starts up. Is this configurable?
I would need this curl fetch to happen for each REGISTER request that comes in.
thanks again for the help,
Miz
On Thursday, November 14, 2013 5:01 AM, Michael Jerris <mike@jerris.com>
wrote: