<div dir="ltr">Hello Joli,<div><br></div><div><br></div><div>you can define an &quot;startup-script&quot; in autoload_configs/lua.conf.xml that loops forever and consums the conference Events.</div><div><br></div><div>Here an example that listen to an &quot;CUSTOM&quot; Event to &quot;kill&quot;  loop.lua scripts</div>
<div>on fs_cli -x &quot;luarun loop.lua stop&quot;. In the &quot;--your magic code here loop&quot; you can add your stuff.</div><div><br></div><div><br></div><div><div>-- logging</div><div>LOGLEVEL = &quot;info&quot;</div>
<div>-- progname</div><div>PROGNAME = &quot;loop.lua&quot;</div><div>-- functions </div><div>function logger(message)</div><div>    freeswitch.consoleLog(LOGLEVEL,&quot;[&quot;..PROGNAME..&quot;] &quot;..message..&quot;\n&quot;)</div>
<div>end</div><div>-- main loop</div><div>logger(&quot;Starting script and loop forever&quot;)</div><div>con = freeswitch.EventConsumer(&quot;CUSTOM&quot;);</div><div>run = true</div><div>while run do</div><div>    for e in (function() return con:pop(1,1000) end) do</div>
<div>        -- logger(&quot;event\n&quot; .. e:serialize(&quot;xml&quot;))</div><div>        element = e:getHeader(&quot;Event-Subclass&quot;) or &quot;&quot;</div><div><br></div><div>        if (element == &quot;lua::stop_event&quot;) then</div>
<div>            action = e:getHeader(&quot;Action&quot;) or &quot;&quot;</div><div>            if (action == &quot;stop&quot;) then</div><div>                logger(&quot;Got stop message, exiting&quot;)</div><div>                run = false</div>
<div>                break</div><div>            end</div><div>        end</div><div>-- your magic code here in loop </div><div>    end</div><div>end</div></div><div><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2014/1/24 Joli Martinez <span dir="ltr">&lt;<a href="mailto:mrjoli021@gmail.com" target="_blank">mrjoli021@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">OK I can setup a separate event hook for that, but the problem I am having is that how can I trigger it at the same time I transfer the call.  This will be a busy box, so I can I make sure I get the right memberID and not a new memberID or the previous memberID?  <div>
<br></div><div>Thanks,</div><div><div class="h5"><div><br></div><div><br><div><div>On Jan 24, 2014, at 11:32 AM, Duvid Rottenberg &lt;<a href="mailto:adrottenberg@gmail.com" target="_blank">adrottenberg@gmail.com</a>&gt; wrote:</div>
<br><blockquote type="cite"><div dir="ltr">I haven&#39;t used LUA but from what I can see, session::execute is a blocking method and there is no  non-blocking version. You would probably have to setup a separate event-hook script to capture the conference::maintenance event.<div>

<a href="https://wiki.freeswitch.org/wiki/Mod_lua#Event_Hooks" target="_blank">https://wiki.freeswitch.org/wiki/Mod_lua#Event_Hooks</a><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Fri, Jan 24, 2014 at 10:35 AM, Joli Martinez <span dir="ltr">&lt;<a href="mailto:mrjoli021@gmail.com" target="_blank">mrjoli021@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Hello,<div><br></div><div>I was able to figure that out last night.  The problem I am having now is that I cant get the memberId until I transfer call to conference.  Once I transfer call to conference, my script stops execution until user hangs up.  How can I get the memberId right after I transfer to conference?</div>


<div><br></div><div><p>session:execute(<span>&quot;conference&quot;</span>,3001)</p><p>userId = session:getVariable(<span>&quot;conference_member_id&quot;</span>)</p><p>freeswitch.consoleLog(<span>&quot;INFO&quot;</span>, userId.. <span>&quot;</span><span>\n</span><span>&quot;</span>);</p>


</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 24, 2014 at 9:33 AM, Duvid Rottenberg <span dir="ltr">&lt;<a href="mailto:adrottenberg@gmail.com" target="_blank">adrottenberg@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can get it from the add-member event. There will be a Member-ID header.</div><div class="gmail_extra">


<br><br><div class="gmail_quote">On Thu, Jan 23, 2014 at 9:15 PM, Joli Martinez <span dir="ltr">&lt;<a href="mailto:mrjoli021@gmail.com" target="_blank">mrjoli021@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I need to know the userid number of a person joining a conference.  Is there a way to get that userid number when a person joins the conference and save it as a variable in Lua?<br>
<br>
Thanks<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Mit freundlichen Grüßen<br>*Karsten Horsmann*<br>
</div>