<div dir="ltr">sessOut.causeCode should be sessOut.causecode<div><br></div><div>you can get the <span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">sessOut</span>
object values by adding:</div><div><br></div><div>
<span style="font-size:12.8px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">console_log("notice", JSON.stringify(<span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">sessOut</span>) );</span>
<br></div><div><br></div><div><br></div><div><br></div><div>thanks</div><div>Matt</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px;font-family:verdana,sans-serif">Matt Broad</span><br style="color:rgb(136,136,136);font-size:12.8px"><div style="color:rgb(136,136,136);font-size:12.8px"><font face="verdana, sans-serif">Tel: <a href="tel:+44%2020%203011%201313" value="+442030111313" style="color:rgb(17,85,204)" target="_blank">+44 (0)203 011 1313</a></font></div><div style="color:rgb(136,136,136);font-size:12.8px"><span style="font-family:verdana,sans-serif;font-size:12.8px">Web:</span><span style="font-family:verdana,sans-serif;font-size:12.8px"> </span><a href="http://www.supportedbusiness.com/" style="font-family:verdana,sans-serif;font-size:12.8px;color:rgb(17,85,204)" target="_blank">www.supportedbusiness.com</a><br></div><div style="color:rgb(136,136,136);font-size:12.8px"><div dir="ltr"><img src="http://www.supportedbusiness.com/coming-soon-logo.png" width="200" height="47" style="font-family:verdana,sans-serif;font-size:12.8px"><br></div><div dir="ltr"><span style="color:rgb(34,34,34);font-size:small">The content of this email, including any files or documents attached, are confidential and may also be legally privileged, protected from disclosure and/or protected by other legal rules. It is written without prejudice and is intended for the individual specified in the message only. The views and opinions included in this email belong to their author and do not necessarily mirror the views and opinions of the company. Full security of this email cannot be ensured as, despite our best efforts, the data included in emails could be infected, intercepted, or corrupted. Do not share any part of this message with any third party, without a written consent of the sender. If you have received this message in error, please notify us and remove it from your system.</span><br></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 17 June 2018 at 10:12, Francesco Facco de Lagarda <span dir="ltr"><<a href="mailto:francesco@delagarda.com" target="_blank">francesco@delagarda.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="IT" link="#0563C1" vlink="#954F72"><div class="m_1749672044327305504WordSection1"><p class="MsoNormal"><span lang="EN-US">‘Morning all<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I can’t get session.cause and session.causecode to work.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">All I get is false for the code and blank for the cause!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Im running FS 1.6.20<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">This is a simplified version of my JS script<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">if (session.ready()) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> session.answer();<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> var dialedNum = "3332094333"; <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> console_log("notice", "*********************** DIALING");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> var sessOut = new Session("sofia/gateway/<wbr>realtoneFXO/" + dialedNum + "@<a href="http://192.168.0.216:5060" target="_blank">192.168.0.216:5060</a>");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> console_log("notice", "*********************** WAITING FOR SESSION READY ..");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> if (sessOut.ready()) {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> console_log("notice", "*********************** SESSION READY");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> bridge(session, sessOut);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> } else {<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> console_log("notice", "************************* disconnect cause:" + sessOut.cause + ":" + sessOut.causeCode);<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> }<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> sessOut.hangup();<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> session.hangup();<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"> console_log("notice", "*********************** CALL ENDED");<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">}<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p></div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/<wbr>confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br></blockquote></div><br></div>