I have started learning ESL (using C library) and I have found this article: <a href="http://blog.godson.in/2010/12/use-of-returnringready-originate.html">http://blog.godson.in/2010/12/use-of-returnringready-originate.html</a><div>
<br></div><div>So I have added in my dialstring the prefix:</div><div><font class="Apple-style-span" color="#555544" face="tahoma, &#39;Trebuchet MS&#39;, lucida, helvetica, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><b><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-weight: normal; line-height: normal;"><br>
</span></font></b></span></font></div><div><font class="Apple-style-span" color="#555544" face="tahoma, &#39;Trebuchet MS&#39;, lucida, helvetica, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><b><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-weight: normal; line-height: normal;">    {return_ring_ready=true}</span></font></b></span></font></div>
<div><font class="Apple-style-span" color="#555544" face="tahoma, &#39;Trebuchet MS&#39;, lucida, helvetica, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><b><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-weight: normal; line-height: normal;"><br>
</span></font></b></span></font></div><div><font class="Apple-style-span" color="#555544" face="tahoma, &#39;Trebuchet MS&#39;, lucida, helvetica, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><b><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-weight: normal; line-height: normal;">and now the Lua script works as I want: the session creation returns also when a 180 ringing (with no media) is received!</span></font></b></span></font></div>
<div><br></div><div>Stephen</div><div><br><div class="gmail_quote">On Fri, Feb 4, 2011 at 10:57 PM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The way you expect it to work is not the case.<br>
<br>
in embedded scripts when you create a new session you must wait for it<br>
to have media.<br>
The scripts are not asynchronous.  if you want asynchronous you 100% want ESL.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
On Fri, Feb 4, 2011 at 1:30 PM, Stephen Wilde &lt;<a href="mailto:wstephen80@gmail.com">wstephen80@gmail.com</a>&gt; wrote:<br>
&gt; I have to port some applications on Freeswitch so I&#39;m doing some preliminary<br>
&gt; learning tests on Lua scripting.<br>
&gt; The result that I would obtain is to have the full control of both inbound<br>
&gt; and originated session and to have under control their state.<br>
&gt; The script I&#39;m running is simply: <a href="http://pastebin.freeswitch.org/15248" target="_blank">http://pastebin.freeswitch.org/15248</a><br>
&gt; But its behaviour is not as I expect.<br>
&gt;<br>
&gt; Stephen<br>
&gt;<br>
&gt; On Fri, Feb 4, 2011 at 7:26 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Feb 4, 2011 at 10:19 AM, Stephen Wilde &lt;<a href="mailto:wstephen80@gmail.com">wstephen80@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Ok, 18x will be perfect!<br>
&gt;&gt;&gt; The problem is that when the inbound call is SIP and the originated is<br>
&gt;&gt;&gt; ISDN, the originate doesn&#39;t return when a 180 ringing is received (that in<br>
&gt;&gt;&gt; ISDN is an ALERT without in band info).<br>
&gt;&gt;&gt; The originate returns when a 183 (ISDN = in band info available) or 200<br>
&gt;&gt;&gt; (ISDN = CONNECT) is received.<br>
&gt;&gt;&gt; Stephen<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Could you tell us a bit more about what you&#39;re trying to accomplish? My<br>
&gt;&gt; guess is that there&#39;s a better way to do it. In most cases it is not<br>
&gt;&gt; necessary to create a new session inside of a script called from the<br>
&gt;&gt; dialplan.<br>
&gt;&gt; What is the application that you are working on? Who calls whom, etc.<br>
&gt;&gt; -MC<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; FreeSWITCH-users mailing list<br>
&gt;&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt;&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt;&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt;&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; FreeSWITCH-users mailing list<br>
&gt; <a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
&gt; <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
&gt; UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
&gt; <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div></div>--<br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
Twitter: <a href="http://twitter.com/FreeSWITCH_wire" target="_blank">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" target="_blank">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="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
<div><div></div><div class="h5"><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></div>