Hi Peter, Thanks for your replay. It works in this way, thanks. Can you please also explain (or point me to right documentation) what does mean "10" as 3rd variable in your example? Also I'm looking the way to set session variables before origination and I also failed with this... For example I have tried this (the call itself was succeeded, but caller_id was not passed): s = freeswitch.Session(); s:setVariable("effective_caller_id_number", "999"); s:setVariable("effective_caller_id_name", "999"); s:originate(session, "sofia/gateway/mygw/1000", 10); and I got the following in console: 2011-03-05 23:43:05.754621 [ERR] switch_cpp.cpp:634 session is not initalized 2011-03-05 23:43:05.754621 [ERR] switch_cpp.cpp:634 session is not initialized Thanks, Dmitry. -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Peter Olsson Sent: 05 Mar 2011 22:48 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] How do I originiate new session from within LUA script? This should work, last parameter is the originate timeout in seconds. s = freeswitch.Session(); s:originate(session, "sofia/internal/1000@192.168.1.1", 10); /Peter ________________________________________ Från: freeswitch-users-bounces@lists.freeswitch.org [freeswitch-users-bounces@lists.freeswitch.org] för Dmitry Saratsky [simpot@simpot.com] Skickat: den 5 mars 2011 20:53 Till: freeswitch-users@lists.freeswitch.org Ämne: [Freeswitch-users] How do I originiate new session from within LUA script? Hello all, According to wiki: http://wiki.freeswitch.org/wiki/Mod_lua#session:originate I can use: "session:originate" command in LUA script to originate new session, but I can't understand how should I do it and can't find any example how I use this command. Can you help, guys? Thanks, Dmitry. !DSPAM:4d72960532761307510204! _______________________________________________ FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org