<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3640" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2>Thanks a lot Anthony,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2>some comments inline (and please forgive me for my broken
email client).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010>>> </SPAN>example1: Consider this simple
lua script in which i create two<SPAN class=650574509-13012010><FONT
color=#0000ff> </FONT></SPAN>sessions:<BR><BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api = freeswitch.API();<BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api:execute("originate",
"sofia/internal/1001%192.168.1.1 &park");<BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api:execute("originate",
"sofia/internal/1002%192.168.1.1 &park");<BR><BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT color=#000000>>
</FONT> </FONT></SPAN>capture the output from api:execute the uuid is in
there<BR><BR><SPAN class=650574509-13012010><FONT color=#0000ff>Thx a
lot,</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2>this was one piece i was missing although it's already
on the wiki here:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#For_making_API_calls">http://wiki.freeswitch.org/wiki/Mod_lua#For_making_API_calls</A></FONT></SPAN><SPAN
class=650574509-13012010><FONT face=Arial size=2> </FONT></SPAN></DIV><FONT
color=#0000ff></FONT><FONT color=#0000ff></FONT>
<DIV dir=ltr align=left><BR><BR><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff><FONT
color=#000000> ></FONT> </FONT></SPAN>because lua calls it
freeswitch.bridge<BR><BR><SPAN class=650574509-13012010><FONT
color=#0000ff> <FONT color=#000000>></FONT> </FONT></SPAN>session1
= freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>session2 =
freeswitch.Session("sofia/internal/1002%192.168.1.1", session1);<BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>freeswitch.bridge(session1,
session2);<SPAN class=650574509-13012010><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff>good to now, there isn't
any example of freeswitch.bridge in the wiki and i would like to add
one.</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff>Where I could find the full api
of</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff>freeswitch.Session( )
?</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff>because I've seen this working
also without "session1" in the second line:</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff>session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR>session2 =
freeswitch.Session("sofia/internal/1002%192.168.1.1");<BR>freeswitch.bridge(session1,
session2);<SPAN
class=650574509-13012010> </SPAN></FONT></SPAN><BR><BR><SPAN
class=650574509-13012010><FONT color=#0000ff> also is there any difference
between freeswitch.bridge and freeswitch.execute(uuid_bridge ...)
?</FONT></SPAN><BR></FONT></FONT><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010> >> </SPAN>example3: yet another
possibility<BR><SPAN class=650574509-13012010> >> </SPAN>local
session1 = freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN
class=650574509-13012010> >> </SPAN>session1:originate(session2,
"sofia/internal/1002%192.168.1.1", 1000);<BR><SPAN
class=650574509-13012010> >> </SPAN>but it does not work
either.<BR><BR></FONT></FONT><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>The above is gibberish
try:<BR><SPAN class=650574509-13012010><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>local session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN
class=650574509-13012010><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>session1:execute("bridge",
"sofia/internal/1002%192.168.1.1");<SPAN class=650574509-13012010><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN
class=650574509-13012010></SPAN></FONT></FONT><FONT face=Arial><FONT
size=2><SPAN class=650574509-13012010></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=650574509-13012010>Okay i will report also this bridge example on the wiki
which was missing.</SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=650574509-13012010>But does session:originate make sense in some cases or
not? Otherwise i'm going to remove this line on the
wiki</SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=650574509-13012010> </SPAN></FONT><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#session:originate"><FONT
size=2>http://wiki.freeswitch.org/wiki/Mod_lua#session:originate</FONT></A></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=650574509-13012010><FONT face=Arial
color=#0000ff size=2>Claudio</FONT></SPAN></DIV><p style="margin-top: 0; margin-bottom: 0">
</p>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Courier New" style="font-size: 8pt"><span lang="EN-GB">Internet
Email Confidentiality Footer</span></font></p>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Courier New" style="font-size: 8pt">
********************************************************************************************************************************************</font></p>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Courier New" style="font-size: 8pt">La presente comunicazione, con le informazioni in essa contenute e ogni documento o file allegato, e' rivolta unicamente alla/e persona/e cui e' 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' 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>
********************************************************************************************************************************************</font></p>
</BODY></HTML>