[Freeswitch-users] Lua session originate

Eric Beard eric at loopfx.com
Tue Apr 12 21:59:46 MSD 2011


When I try to use lua to originate a call, I get this:

freeswitch at internal> lua test_originate.lua
-ERR encountered

freeswitch at internal> 2011-04-12 13:03:17.806648 [ERR] mod_lua.cpp:191 Error in originate expected 4.
.4 args, got 3
stack traceback:
        [C]: in function 'originate'
        /usr/local/freeswitch/scripts/test_originate.lua:3: in main chunk

I'm using the following line of code:

local new_session = freeswitch.Session();
new_session.originate(session, "sofia/gateway/mygatewayname/mynumber", 60);

This is in the Wiki:
session:originate
local new_session = freeswitch.Session();
new_session.originate(session, dest[, timeout]);
dest - quoted dialplan destanation. For example: "sofia/internal/1000 at 10.0.0.1" or "sofia/gateway/my_sip_provider/my_dest_number"
timeout - origination timeout in seconds
Note: in recent git versions, session.originate expects 4 arguments; the example above does not work (anymore?).
What is the 4th arg?


-----------------------
Eric Z. Beard, CTO
Loop LLC
w (877) 850-2010 x9249
m (727) 776-2768
eric at loopfx.com<mailto:eric at loopfx.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110412/08ec38d8/attachment.html 


More information about the FreeSWITCH-users mailing list