<!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=542192317-14012010><FONT face=Arial
color=#0000ff size=2>We are telling the same thing Mike, I've also written
to elaborate the "originate" entry on mod_lua wiki.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=542192317-14012010><FONT face=Arial
color=#0000ff size=2>We could take examples from here maybe:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=542192317-14012010><FONT face=Arial
color=#0000ff size=2><A
href="http://wiki.freeswitch.org/wiki/Session_originate">http://wiki.freeswitch.org/wiki/Session_originate</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=542192317-14012010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=542192317-14012010><FONT face=Arial
color=#0000ff size=2>ciao,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=542192317-14012010><FONT face=Arial
color=#0000ff size=2>claudio</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <B>On Behalf Of
</B>Mike van Lammeren<BR><B>Sent:</B> Thursday, January 14, 2010 4:16
PM<BR><B>To:</B> freeswitch-users@lists.freeswitch.org<BR><B>Subject:</B> Re:
[Freeswitch-users] playing with sessions in lua<BR></FONT><BR></DIV>
<DIV></DIV>Hi Claudio!
<DIV><BR></DIV>
<DIV>Thanks for the additions to the wiki! Every little bit helps.</DIV>
<DIV><BR></DIV>
<DIV>I don't think I explained myself well, earlier. The point I was trying to
make about the wiki is that rather than remove the section about "originate",
it would be better to make an entry like "originate -- Does anyone know what
this does?"</DIV>
<DIV><BR></DIV>
<DIV>Mike van Lammeren</DIV>
<DIV><BR>
<DIV><BR>
<DIV class=gmail_quote>On Thu, Jan 14, 2010 at 6:23 AM, Cavalera Claudio Luigi
<SPAN dir=ltr><<A
href="mailto:Claudio.Cavalera@italtel.it">Claudio.Cavalera@italtel.it</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Hi
Mike,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>in fact
i've completed that page with the list of available session
functions.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I've not
removed "session:originate" yet, but it would be better if someone could
provide an example in order to write an example in the
wiki.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I've
added this valuable example also with the help of rupa</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.Session"
target=_blank>http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.Session</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I would
like to write something also about api_on_answer to use an api instead of a
dialplan application.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>BRs,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Claudio</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV lang=en-us dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2><B>From:</B> <A
href="mailto:freeswitch-users-bounces@lists.freeswitch.org"
target=_blank>freeswitch-users-bounces@lists.freeswitch.org</A> [mailto:<A
href="mailto:freeswitch-users-bounces@lists.freeswitch.org"
target=_blank>freeswitch-users-bounces@lists.freeswitch.org</A>] <B>On
Behalf Of </B>Mike van Lammeren<BR><B>Sent:</B> Wednesday, January 13,
2010 8:30 PM
<DIV class=im><BR><B>To:</B> <A
href="mailto:freeswitch-users@lists.freeswitch.org"
target=_blank>freeswitch-users@lists.freeswitch.org</A><BR><B>Subject:</B>
Re: [Freeswitch-users] playing with sessions in
lua<BR></DIV></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV></DIV>Hello!
<DIV><BR></DIV>
<DIV>Before you remove "session:originate" from the wiki, you should take
a look at this:</DIV>
<DIV><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#How_can_I_find_useful_undocumented_Session_Functions.3F"
target=_blank>http://wiki.freeswitch.org/wiki/Mod_lua#How_can_I_find_useful_undocumented_Session_Functions.3F</A></DIV>
<DIV><BR></DIV>
<DIV><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#How_can_I_find_useful_undocumented_Session_Functions.3F"
target=_blank></A>There is, in fact, a function called "originate".</DIV>
<DIV><BR></DIV>
<DIV>Mike van Lammeren</DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Wed, Jan 13, 2010 at 5:22 AM, Cavalera Claudio
Luigi <SPAN dir=ltr><<A href="mailto:Claudio.Cavalera@italtel.it"
target=_blank>Claudio.Cavalera@italtel.it</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Thanks a lot Anthony,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><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><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2>
<DIV><SPAN>>> </SPAN>example1: Consider this simple lua
script in which i create two<SPAN><FONT
color=#0000ff> </FONT></SPAN>sessions:<BR><BR><SPAN><FONT
color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api = freeswitch.API();<BR><SPAN><FONT
color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api:execute("originate",
"sofia/internal/1001%192.168.1.1 &park");<BR><SPAN><FONT
color=#0000ff> <FONT color=#000000>>>
</FONT> </FONT></SPAN>api:execute("originate",
"sofia/internal/1002%192.168.1.1 &park");<BR><BR><SPAN><FONT
color=#0000ff> <FONT color=#000000>>
</FONT> </FONT></SPAN>capture the output from api:execute the uuid
is in there<BR><BR></DIV><SPAN><FONT color=#0000ff>Thx a
lot,</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><SPAN><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><FONT face=Arial color=#0000ff size=2><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#For_making_API_calls"
target=_blank>http://wiki.freeswitch.org/wiki/Mod_lua#For_making_API_calls</A></FONT></SPAN><SPAN><FONT
face=Arial size=2> </FONT></SPAN></DIV>
<DIV><FONT color=#0000ff></FONT><FONT color=#0000ff></FONT>
<DIV dir=ltr align=left><BR><BR><FONT face=Arial><FONT
size=2><SPAN><FONT color=#0000ff><FONT
color=#000000> ></FONT> </FONT></SPAN>because lua calls it
freeswitch.bridge<BR><BR><SPAN><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN><FONT
color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>session2 =
freeswitch.Session("sofia/internal/1002%192.168.1.1",
session1);<BR><SPAN><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>freeswitch.bridge(session1,
session2);<SPAN><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT
size=2><SPAN></SPAN></FONT></FONT> </DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN><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><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><FONT
color=#0000ff>freeswitch.Session( ) ?</FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT size=2><SPAN><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><FONT
color=#0000ff>
<DIV>session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR></DIV>session2
=
freeswitch.Session("sofia/internal/1002%192.168.1.1");<BR>freeswitch.bridge(session1,
session2);<SPAN> </SPAN></FONT></SPAN><BR><BR><SPAN><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><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT
size=2><SPAN> >> </SPAN>example3: yet another
possibility<BR><SPAN> >> </SPAN>local session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN> >> </SPAN>session1:originate(session2,
"sofia/internal/1002%192.168.1.1",
1000);<BR><SPAN> >> </SPAN>but it does not work
either.<BR><BR></FONT></FONT><FONT face=Arial><FONT size=2><SPAN><FONT
color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>The above is gibberish
try:<BR><SPAN><FONT color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>local session1 =
freeswitch.Session("sofia/internal/1001%192.168.1.1");<BR><SPAN><FONT
color=#0000ff> <FONT
color=#000000>></FONT> </FONT></SPAN>session1:execute("bridge",
"sofia/internal/1002%192.168.1.1");<SPAN><FONT
color=#0000ff> </FONT></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT
size=2><SPAN></SPAN></FONT></FONT><FONT face=Arial><FONT
size=2><SPAN></SPAN></FONT></FONT> </DIV></DIV>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff
size=2><SPAN>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>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> </SPAN></FONT><A
href="http://wiki.freeswitch.org/wiki/Mod_lua#session:originate"
target=_blank><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><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>Claudio</FONT></SPAN></DIV>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"> </P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT
style="FONT-SIZE: 8pt" face="Courier New"><SPAN lang=EN-GB>Internet
Email Confidentiality Footer</SPAN></FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT
style="FONT-SIZE: 8pt"
face="Courier New">********************************************************************************************************************************************</FONT></P>
<P style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px"><FONT
style="FONT-SIZE: 8pt" face="Courier New"></FONT></P><FONT
style="FONT-SIZE: 8pt" face="Courier New">
<DIV>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></DIV>********************************************************************************************************************************************</FONT>
<P></P></DIV><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></BLOCKQUOTE></DIV><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></DIV></DIV></BLOCKQUOTE></BODY></HTML>