Thank you Michael.  Sorry I missed that page.<div><br><br><div class="gmail_quote">On Sun, Sep 6, 2009 at 3:36 AM, Michael S  Collins <span dir="ltr">&lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><br>
On Sep 5, 2009, at 8:25 PM, Adam Wilt &lt;<a href="mailto:wiltingtree@gmail.com">wiltingtree@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi, the documentation says that mod_commands is available from<br>
&gt; within mod_lua. But when I try to access it like this:<br>
&gt;<br>
&gt; session:execute(&quot;uuid_broadcast&quot;,session_id .. &quot; &quot; .. filename .. &quot;<br>
&gt; both&quot;)<br>
&gt;<br>
&gt; I get: Invalid Application uuid_broadcast<br>
&gt;<br>
&gt; or<br>
&gt;<br>
&gt; session:execute(&quot;bgapi&quot;,&quot;uuid_broadcast &quot; .. session_id .. &quot; &quot; ..<br>
&gt; filename .. &quot; both&quot;)<br>
&gt;<br>
&gt; I get: Invalid Application bgapi<br>
&gt;<br>
&gt; or<br>
&gt;<br>
&gt; session:uuid_broadcast(session_id .. &quot; &quot; .. filename .. &quot; both&quot;)<br>
&gt;<br>
&gt; I get: attempt to call field &#39;uuid_broadcast&#39; (a nil value)<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Can somebody please explain how to do this?<br>
&gt;<br>
&gt; Thanks!<br>
&gt;<br>
<br>
</div></div>Absolutely. Using session:execute is only for dialplan applications.<br>
To do API commands, including all the stuff in mod_commands, you need<br>
to create an API object:<br>
<br>
api = freeswitch.API()<br>
<br>
Then send a command and the variable will receive the results:<br>
<br>
reply = api:executeString(&quot;version&quot;)<br>
<br>
Check out this page for more examples:<br>
<a href="http://wiki.freeswitch.org/wiki/Make_API_calls_directly_from_Lua_code" target="_blank">http://wiki.freeswitch.org/wiki/Make_API_calls_directly_from_Lua_code</a><br>
<br>
-MC<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<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>
</blockquote></div><br></div>