Hi all,
I have the following issue in my lua script.
I need to initialize a new session, set variables and then originate a call later.
It doesn't work - I get a session uninitialized error.

The lua script is called from cli as luarun test.lua

Here is the script:
ses = freeswitch.Session()
ses:execute("set","test=123") <-- get a session uninitialized

When I try ses = new freeswitch.Session() I get function overload error

It works only when I use ses = freeswitch.Session("{api_hangup_hook='lua retry.lua',continue_on_error=true}/sofia/profile/gateway1/number|/sofia/profile/gateway2/number")
But the problem is that I have a session hangup hook specified and use multiple gateways dial failover.
The session executes the hangup hook if the first gateway call didn't go through, which doesn't make sense.
continue_on_error is ignored even if I do ses:execute("set","continue_on_error=true") after the initialization.

Please suggest what is the best approach.
Thank you