Hello,<br><br>That&#39;s easy ;) (I&#39;m pretty new)<br><br>var = session:getVariable(&quot;uuid&quot;)<br><br>but you need to have 2 sessions.<br><br>Hope this helps<br><br>David<br><br><div class="gmail_quote">On Tue, Jan 12, 2010 at 10:43 AM, Cavalera Claudio Luigi <span dir="ltr">&lt;<a href="mailto:Claudio.Cavalera@italtel.it">Claudio.Cavalera@italtel.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br>
this should be simple in theory therefore I&#39;m probably missing the right<br>
way to do it.<br>
I want to play with sessions in lua, bridge them, park them, etc...<br>
<br>
example1: Consider this simple lua script in which i create two<br>
sessions:<br>
<br>
api = freeswitch.API();<br>
api:execute(&quot;originate&quot;, &quot;sofia/internal/1001%192.168.1.1 &amp;park&quot;);<br>
api:execute(&quot;originate&quot;, &quot;sofia/internal/1002%192.168.1.1 &amp;park&quot;);<br>
<br>
now if i want to bridge them i suppose i should use something like<br>
<br>
api:execute(&quot;uuid_bridge&quot;, &quot;uuid_1 uuid_2&quot;);<br>
<br>
but how do i get uuid_1 and uuid_2, i.e. the uuids of the two sessions?<br>
<br>
<br>
example2: I could create sessions with<br>
<br>
local session1 = freeswitch.Session(&quot;sofia/internal/1001%192.168.1.1&quot;);<br>
local session2 = freeswitch.Session(&quot;sofia/internal/1002%192.168.1.1&quot;);<br>
<br>
but then there is NOT a bridge API to bridge the sessions like:<br>
bridge(session1, session2);<br>
<br>
I admit I have not yet understood why such bridge possibility exist in<br>
javascript but does not exist in lua.<br>
<a href="http://wiki.freeswitch.org/wiki/Javascript_Misc_bridge" target="_blank">http://wiki.freeswitch.org/wiki/Javascript_Misc_bridge</a><br>
I guess there is a reason for this but I can&#39;t figure it out.<br>
<br>
<br>
example3: yet another possibility<br>
local session1 = freeswitch.Session(&quot;sofia/internal/1001%192.168.1.1&quot;);<br>
session1:originate(session2, &quot;sofia/internal/1002%192.168.1.1&quot;, 1000);<br>
<br>
but it does not work either.<br>
<br>
Besides with this third example something strange happen:<br>
<br>
freeswitch@internal&gt; show channels<br>
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr<br>
,dest,application,application_data,dialplan,context,read_codec,read_rate<br>
,write_codec,write_rate,secure<br>
1c5db2df-14ce-4516-94f2-bb7c087e0802,outbound,2010-01-12<br>
10:50:59,1263289859,sofia/internal/1004,CS_REPORTING,FreeSWITCH,00000000<br>
00,,1004,,,,default,PCMA,8000,PCMA,8000,<br>
<br>
1 total.<br>
<br>
freeswitch@internal&gt; uuid_kill 1c5db2df-14ce-4516-94f2-bb7c087e0802<br>
-ERR No Such Channel!<br>
<br>
freeswitch@internal&gt; show channels<br>
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr<br>
,dest,application,application_data,dialplan,context,read_codec,read_rate<br>
,write_codec,write_rate,secure<br>
1c5db2df-14ce-4516-94f2-bb7c087e0802,outbound,2010-01-12<br>
10:50:59,1263289859,sofia/internal/1004,CS_REPORTING,FreeSWITCH,00000000<br>
00,,1004,,,,default,PCMA,8000,PCMA,8000,<br>
<br>
1 total.<br>
<br>
freeswitch@internal&gt;<br>
<br>
If you are interested the full log is here:<br>
<a href="http://pastebin.freeswitch.org/11757" target="_blank">http://pastebin.freeswitch.org/11757</a><br>
but I admit i&#39;m not on latest trunk yet!<br>
<br>
Thanks.<br>
Ciao,<br>
Claudio<br>
<br>
<br>
PS: Is there a reason why there is a uuid_park command but not<br>
uuid_valet_park ?<br>
<br>
<br>
Internet Email Confidentiality Footer<br>
-----------------------------------------------------------------------------------------------------<br>
La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e&#39; rivolta unicamente alla/e persona/e cui e&#39; indirizzata ed alle altre da questa autorizzata/e a riceverla. Se non siete i destinatari/autorizzati siete avvisati che qualsiasi azione, copia, comunicazione, divulgazione o simili basate sul contenuto di tali informazioni e&#39; vietata e potrebbe essere contro la legge (art. 616 C.P., D.Lgs n. 196/2003 Codice in materia di protezione dei dati personali). Se avete ricevuto questa comunicazione per errore, vi preghiamo di darne immediata notizia al mittente e di distruggere il messaggio originale e ogni file allegato senza farne copia alcuna o riprodurne in alcun modo il contenuto.<br>

<br>
This e-mail and its attachments are intended for the addressee(s) only and are confidential and/or may contain legally privileged information. If you have received this message by mistake or are not one of the addressees above, you may take no action based on it, and you may not copy or show it to anyone; please reply to this e-mail and point out the error which has occurred.<br>

-----------------------------------------------------------------------------------------------------<br>
<div><div></div><div class="h5"><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>
</div></div></blockquote></div><br>