<div dir="ltr"><div>Sajad,</div><div><br></div><div>just to be explicit:</div><div><br></div><div>in FreeSWITCH, when a person say "API" it means "sending a command from the freeswitch command line" (and you *can* execute lua from freeswitch command line)</div><div><br></div><div>maybe, you are executing a LUA script from dialplan or configuration, so you are not using the freeswitch API</div><div><br></div><div>in that case, you are executing a lua script from dialplan. That lua script is written to execute the lua API to interact with freeswitch</div><div><br></div><div>in that case, for clarity, in future, you want to write: "I am executing a lua script"<br><br></div><div>If a lua script is started from dialplan, it always has a session object, until the call is hangup</div><div><br></div><div>the other case: if a lua script is started from the command line (eg, from the freeswitch API) it never has a session object, you must create it getting the uuid of the call from the freeswitch API (or because you know in advance the call uuid because you originated that call giving the uuid as parameter).</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 23, 2019 at 9:42 PM Sajad Tahernejad <<a href="mailto:sajad@tahernejad.com" target="_blank">sajad@tahernejad.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:small;color:rgb(53,28,117)">Thanks.<br>Please explain more,<br>I want transfered a session if 10th or more in queue with session:transfer("3000", "XML", "default");<br>Can you help more ?<br>I'm using lua api from <a href="https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference" target="_blank">https://freeswitch.org/confluence/display/FREESWITCH/Lua+API+Reference</a></div></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-1380152741336100506gmail-m_-1066431239601760049gmail_signature">Sincerely,<br><br>Giovanni Maruzzelli<br>OpenTelecom.IT<br>cell: +39 347 266 56 18<br><br></div>