Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] Lua script session issues


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
nycphoneservice at gma...
Guest





PostPosted: Tue May 25, 2021 7:26 am    Post subject: [Freeswitch-users] Lua script session issues Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services