Don't forget that lua,perl,python,managed,java all share the same exact C++ source file with swig so the same exact api applies to all of the above.<br><br><div class="gmail_quote">On Thu, Jan 14, 2010 at 9:15 AM, Mike van Lammeren <span dir="ltr"><<a href="mailto:mike@van.lammeren.net">mike@van.lammeren.net</a>></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;">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><font color="#888888"><div>Mike van Lammeren</div></font><div><div></div><div class="h5"><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" target="_blank">Claudio.Cavalera@italtel.it</a>></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;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi Mike,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" size="2">I've added this valuable example also with the help of
rupa</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">BRs,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Claudio</font></span></div><br>
<blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div dir="ltr" align="left" lang="en-us">
<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><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>
<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="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks a
lot Anthony,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">some
comments inline (and please forgive me for my broken email
client).</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" 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 color="#0000ff" face="Arial" size="2"></font> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Thanks,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" 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" 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></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><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br><br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:+19193869900<br>