<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What specifically are you looking for in "alive"<div class=""><br class=""><div style=""><blockquote type="cite" class=""><div class="">On Jul 6, 2015, at 2:10 PM, Zvi Agmon &lt;<a href="mailto:zvi@lexifone.com" class="">zvi@lexifone.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Michael,<div class="">Thanks for your response.</div><div class=""><br class=""></div><div class="">The issues I'm facing is in this scenario:</div><div class="">- an inbound call is answered and hit the first dial plan</div><div class="">- after performing application logic the call is transferred to another dial plan.</div><div class="">- 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 class="">- in this lua script I need to do some logic but want to make sure the session is alive.&nbsp;</div><div class="">&nbsp; - for that I'm calling the method<b class=""> session:ready</b> but in some cases the method returns<b class=""> false although the call is alive</b>. Also the documentation says that after transfer session:ready should return false.</div><div class=""><br class=""></div><div class="">So my question is - how would you check that the session is in working state at this stage?</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Zvi Agmon</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class="">Best regards</div><div class=""><br class=""></div>Zvi Agmon<div class=""><a href="http://www.lexifone.com/" target="_blank" class="">Lexifone</a><br class=""></div><div class="">email: <a href="mailto:zvi@lexifone.com" target="_blank" class="">zvi@lexifone.com</a></div><div class="">Office: +972-4-6817711</div><div class="">Cell: +972-54-4505109</div></div></div></div>
<br class=""><div class="gmail_quote">On Mon, Jul 6, 2015 at 6:38 PM, Michael Jerris <span dir="ltr" class="">&lt;<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">this is a very vague question. &nbsp;you are alluding to a problem but never coming out and saying what problem you have.<div class="HOEnZb"><div class="h5"><span class=""></span><div class=""><div class=""><br class="">On Monday, July 6, 2015, Zvi Agmon &lt;<a href="mailto:zvi@lexifone.com" target="_blank" class="">zvi@lexifone.com</a>&gt; wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">Can anyone help with this please?&nbsp;</div><div class="">Didn't get any response - maybe the question is not clear enough...</div><div class=""><br class=""></div><div class="">I'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 class=""><br class=""></div><div class="">Thanks a lot</div><div class=""><br class=""></div><div class="">Zvi Agmon</div><div class=""><a href="http://www.lexifone.com/" target="_blank" class="">Lexifone</a><br class=""></div><div class=""><a class="">zvi@lexifone.com</a></div><div class=""><br class=""></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class=""><div dir="ltr" class=""><div class="">Best regards</div><div class=""><br class=""></div>Zvi Agmon<div class=""><a href="http://www.lexifone.com/" target="_blank" class="">Lexifone</a><br class=""></div><div class="">email: <a class="">zvi@lexifone.com</a></div><div class="">Office: <a href="tel:%2B972-4-6817711" value="+97246817711" target="_blank" class="">+972-4-6817711</a></div><div class="">Cell: <a href="tel:%2B972-54-4505109" value="+972544505109" target="_blank" class="">+972-54-4505109</a></div></div></div></div>
<br class=""><div class="gmail_quote">On Tue, Jun 30, 2015 at 2:07 PM, Zvi Agmon <span dir="ltr" class="">&lt;<a class="">zvi@lexifone.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">Need some help regarding session state validation.</div><div class=""><br class=""></div><div class="">In documentation I see this:</div><div class=""><br class=""></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px" class=""><div class=""><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;" class=""><span class="">session:ready</span></h4></div><div class=""><div style="margin: 0.4em 0px 0.5em; line-height: 19.2000007629395px; font-family: sans-serif; font-size: 12.8000001907349px;" class="">- checks whether the session is still active (true anytime between call starts and hangup)</div></div><div class=""><div style="margin: 0.4em 0px 0.5em; line-height: 19.2000007629395px; font-family: sans-serif; font-size: 12.8000001907349px;" class="">- 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 class=""><div style="margin: 0.4em 0px 0.5em; line-height: 19.2000007629395px; font-family: sans-serif; font-size: 12.8000001907349px;" class=""><span style="font-family:arial,sans-serif;font-size:small;line-height:normal;color:rgb(34,34,34)" class=""><br class=""></span></div><div style="margin: 0.4em 0px 0.5em; line-height: 19.2000007629395px; font-family: sans-serif; font-size: 12.8000001907349px;" class=""><span style="font-family:arial,sans-serif;font-size:small;line-height:normal;color:rgb(34,34,34)" class="">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 class=""><br clear="all" class=""><div class=""><div class=""><div dir="ltr" class=""><div class="">Thanks</div><span class=""><font color="#888888" class=""><div class=""><br class=""></div>Zvi Agmon<div class=""><a href="http://www.lexifone.com/" target="_blank" class="">Lexifone</a><br class=""></div><div class="">email: <a class="">zvi@lexifone.com</a></div><div class="">Office: <a href="tel:%2B972-4-6817711" value="+97246817711" target="_blank" class="">+972-4-6817711</a></div><div class="">Cell: <a href="tel:%2B972-54-4505109" value="+972544505109" target="_blank" class="">+972-54-4505109</a></div></font></span></div></div></div>
</div></div>
</blockquote></div><br class=""></div>
</blockquote></div></div>
</div></div><br class="">_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://confluence.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://confluence.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-users mailing list<br class="">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="">FreeSWITCH-users@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class=""></blockquote></div><br class=""></div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services: <br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://confluence.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-users mailing list<br class="">FreeSWITCH-users@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br class="">http://www.freeswitch.org</div></blockquote></div><br class=""></div></body></html>