<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 href="mailto:zvi@lexifone.com" target="_blank">zvi@lexifone.com</a></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, Jun 30, 2015 at 2:07 PM, Zvi Agmon <span dir="ltr">&lt;<a href="mailto:zvi@lexifone.com" target="_blank">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="color:rgb(0,0,0);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"><span>session:ready</span></h4></div><div><p style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;color:rgb(0,0,0);font-family:sans-serif;font-size:12.8000001907349px">- checks whether the session is still active (true anytime between call starts and hangup)</p></div><div><p style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;color:rgb(0,0,0);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.</p></div></blockquote><div><p style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;color:rgb(0,0,0);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></p><p style="margin:0.4em 0px 0.5em;line-height:19.2000007629395px;color:rgb(0,0,0);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></p></div><div><br clear="all"><div><div><div dir="ltr"><div>Thanks</div><span class="HOEnZb"><font color="#888888"><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></font></span></div></div></div>
</div></div>
</blockquote></div><br></div>