<div dir="ltr">Thanks Anthony,<div><br></div><div>I&#39;m trying to figure out what happens next - after the route to new dial plan completed. Now a new lua script is executed (as a hookup to answer) - what is the expected mode at that state - isn&#39;t it <span style="font-size:12.8000001907349px">CS_EXECUTE</span><span style="font-size:12.8000001907349px"> again?</span></div><div><span style="font-size:12.8000001907349px">How should I validate the session is ready in my answer hookup script?</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">My experience is that in most cases session:ready() returns true at that stage, but sometime it returns false although  the call continue without any problem (2 legs are bridged and hears each other).</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Thanks</span></div><div><span style="font-size:12.8000001907349px">Zvi Agmon</span></div><div><span style="font-size:12.8000001907349px">Lexifone </span></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Best regards</div><div><br></div>Zvi Agmon<div><a href="http://www.lexifone.com/" target="_blank">Lexifone</a><br></div><div>email: <a href="mailto:zvi@lexifone.com" target="_blank">zvi@lexifone.com</a></div><div>Office: +972-4-6817711</div><div>Cell: +972-54-4505109</div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 7, 2015 at 1:37 AM, Anthony Minessale <span dir="ltr">&lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">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"><div dir="ltr">As you quoted if session:ready returns false you MUST fall through to the end of the script and allow it to exit without trying to hang it up or do anything else.<div>When the state machine wants to move the session state from CS_EXECUTE (running your script) to CS_ROUTING (new lookup in dialplan)  session ready will be false.</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Mon, Jul 6, 2015 at 1:30 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">What specifically are you looking for in &quot;alive&quot;<div><div><div><br><div><blockquote type="cite"><div>On Jul 6, 2015, at 2:10 PM, Zvi Agmon &lt;<a href="mailto:zvi@lexifone.com" target="_blank">zvi@lexifone.com</a>&gt; wrote:</div><br><div><div dir="ltr">Hi Michael,<div>Thanks for your response.</div><div><br></div><div>The issues I&#39;m facing is in this scenario:</div><div>- an inbound call is answered and hit the first dial plan</div><div>- after performing application logic the call is transferred to another dial plan.</div><div>- in this dial plan the call is bridged to an out bound leg and a lua script is run when the outbound call is answered.</div><div>- in this lua script I need to do some logic but want to make sure the session is alive. </div><div>  - for that I&#39;m calling the method<b> session:ready</b> but in some cases the method returns<b> false although the call is alive</b>. Also the documentation says that after transfer session:ready should return false.</div><div><br></div><div>So my question is - how would you check that the session is in working state at this stage?</div><div><br></div><div>Thanks</div><div>Zvi Agmon</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div>Best regards</div><div><br></div>Zvi Agmon<div><a href="http://www.lexifone.com/" target="_blank">Lexifone</a><br></div><div>email: <a href="mailto:zvi@lexifone.com" target="_blank">zvi@lexifone.com</a></div><div>Office: <a href="tel:%2B972-4-6817711" value="+97246817711" target="_blank">+972-4-6817711</a></div><div>Cell: <a href="tel:%2B972-54-4505109" value="+972544505109" target="_blank">+972-54-4505109</a></div></div></div></div>
<br><div class="gmail_quote">On Mon, Jul 6, 2015 at 6:38 PM, Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is a very vague question.  you are alluding to a problem but never coming out and saying what problem you have.<div><div><span></span><div><div><br>On Monday, July 6, 2015, Zvi Agmon &lt;<a href="mailto:zvi@lexifone.com" target="_blank">zvi@lexifone.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Can anyone help with this please? </div><div>Didn&#39;t get any response - maybe the question is not clear enough...</div><div><br></div><div>I&#39;m trying to figure out the correct way to check for session state after it was transferred to another dial plan - meaning - a lua script is called from the new dial plan and in it I want to know if the session is in ready state.</div><div><br></div><div>Thanks a lot</div><div><br></div><div>Zvi Agmon</div><div><a href="http://www.lexifone.com/" target="_blank">Lexifone</a><br></div><div><a>zvi@lexifone.com</a></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div>Best regards</div><div><br></div>Zvi Agmon<div><a href="http://www.lexifone.com/" target="_blank">Lexifone</a><br></div><div>email: <a>zvi@lexifone.com</a></div><div>Office: <a href="tel:%2B972-4-6817711" value="+97246817711" target="_blank">+972-4-6817711</a></div><div>Cell: <a href="tel:%2B972-54-4505109" value="+972544505109" target="_blank">+972-54-4505109</a></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jun 30, 2015 at 2:07 PM, Zvi Agmon <span dir="ltr">&lt;<a>zvi@lexifone.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>Need some help regarding session state validation.</div><div><br></div><div>In documentation I see this:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><h4 style="margin:0px 0px 0.3em;overflow:hidden;padding-top:0.5em;padding-bottom:0.17em;border-bottom-style:none;font-size:14.8480014801025px;font-family:sans-serif;line-height:19.2000007629395px;background-image:none;background-repeat:initial initial"><span>session:ready</span></h4></div><div><div style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;font-family:sans-serif;font-size:12.8000001907349px">- checks whether the session is still active (true anytime between call starts and hangup)</div></div><div><div style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;font-family:sans-serif;font-size:12.8000001907349px">- also session:ready will return false if the call is being transferred. Bottom line is you should always be checking session:ready on any loops and periodically throughout your script and exit asap if it returns false.</div></div></blockquote><div><div style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;font-family:sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:small;line-height:normal;color:rgb(34,34,34)"><br></span></div><div style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;font-family:sans-serif;font-size:12.8000001907349px"><span style="font-family:arial,sans-serif;font-size:small;line-height:normal;color:rgb(34,34,34)">My experience is that after transfer the return value of session:ready() is is not consistent - what is the correct way to check session state in that case?</span></div></div><div><br clear="all"><div><div><div dir="ltr"><div>Thanks</div><span><font color="#888888"><div><br></div>Zvi Agmon<div><a href="http://www.lexifone.com/" target="_blank">Lexifone</a><br></div><div>email: <a>zvi@lexifone.com</a></div><div>Office: <a href="tel:%2B972-4-6817711" value="+97246817711" target="_blank">+972-4-6817711</a></div><div>Cell: <a href="tel:%2B972-54-4505109" value="+972544505109" target="_blank">+972-54-4505109</a></div></font></span></div></div></div>
</div></div>
</blockquote></div><br></div>
</blockquote></div></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank">http://www.cluecon.com</a><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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><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></div></blockquote></div><br></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div><img goomoji="260e" style="margin:0 0.2ex;vertical-align:middle;max-height:24px" alt="☎" src="cid:260e@goomoji.gmail"> <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a>  <img goomoji="260e" style="margin:0 0.2ex;vertical-align:middle;max-height:24px" alt="☎" src="cid:260e@goomoji.gmail"> <a href="tel:%2B19193869900" value="+19193869900" target="_blank">+19193869900</a> </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</font></span></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>