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, 'Trebuchet MS', 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, 'Trebuchet MS', 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, 'Trebuchet MS', 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, 'Trebuchet MS', 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"><<a href="mailto:anthony.minessale@gmail.com">anthony.minessale@gmail.com</a>></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 <<a href="mailto:wstephen80@gmail.com">wstephen80@gmail.com</a>> wrote:<br>
> I have to port some applications on Freeswitch so I'm doing some preliminary<br>
> learning tests on Lua scripting.<br>
> The result that I would obtain is to have the full control of both inbound<br>
> and originated session and to have under control their state.<br>
> The script I'm running is simply: <a href="http://pastebin.freeswitch.org/15248" target="_blank">http://pastebin.freeswitch.org/15248</a><br>
> But its behaviour is not as I expect.<br>
><br>
> Stephen<br>
><br>
> On Fri, Feb 4, 2011 at 7:26 PM, Michael Collins <<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>> wrote:<br>
>><br>
>><br>
>> On Fri, Feb 4, 2011 at 10:19 AM, Stephen Wilde <<a href="mailto:wstephen80@gmail.com">wstephen80@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Ok, 18x will be perfect!<br>
>>> The problem is that when the inbound call is SIP and the originated is<br>
>>> ISDN, the originate doesn't return when a 180 ringing is received (that in<br>
>>> ISDN is an ALERT without in band info).<br>
>>> The originate returns when a 183 (ISDN = in band info available) or 200<br>
>>> (ISDN = CONNECT) is received.<br>
>>> Stephen<br>
>>><br>
>><br>
>> Could you tell us a bit more about what you're trying to accomplish? My<br>
>> guess is that there's a better way to do it. In most cases it is not<br>
>> necessary to create a new session inside of a script called from the<br>
>> dialplan.<br>
>> What is the application that you are working on? Who calls whom, etc.<br>
>> -MC<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>
>><br>
><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>
><br>
><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>