<div dir="ltr">Check if the variable &#39;originateCause&#39; holds the actual cause. If I remember correctly this case will return an empty session object, but a global variable named &#39;originateCause&#39; is set instead.<div><br></div><div>/Peter</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-23 7:19 GMT+01:00 Sergey Safarov <span dir="ltr">&lt;<a href="mailto:s.safarov@gmail.com" target="_blank">s.safarov@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What is happned when you try originate registered user?<div>&quot;originate user/100&quot;</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 12:49 AM, Víctor Vladimir Chávez Gallardo <span dir="ltr">&lt;<a href="mailto:vivlachaga@gmail.com" target="_blank">vivlachaga@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">Hi i’m tring to catch the hangup cause for a outbound session, this session is started by a esl (socket connection) and an jsrun command, but when the end user give USER_BUSY or NO_ANSWER (or whatever) i can’t catch the disposition, currently the caller it’s working, (i can answer the calls, and do stuff)<br>
<br>
somebody can help me?<br>
<br>
EXAMPLE<br>
<br>
session = new Session( &quot;{ignore_early_media=yes,origination_caller_id_number=55597428100&quot;,originate_timeout=20}freetdm/1/1/5513143104 );<br>
<br>
hangup_cause = session.cause; &lt;— I GOT FALSE<br>
<br>
if(session.cause == &quot;USER_BUSY&quot;)<br>
{<br>
        console_log(&quot;err&quot;, &quot;Llamada fallida CAUSA: &quot; + hangup_cause + &quot;\n”); &lt;— NEVER EXECUTED<br>
}<br>
<br>
if (session.ready() )<br>
{<br>
        session.streamFile( &quot;barracuda.wav” ); &lt;— WORKS WHEN USER ANSWER<br>
}<br>
else<br>
{<br>
        console_log(&quot;err&quot;, session.uuid + &quot;\n”); &lt;—— THE SESSION IS “FALSE&quot;<br>
        var hangupCause = session.getVariable(&quot;bridge_hangup_cause”); &lt;— THIS OBJECT IS UNDEFINED<br>
}<br>
session.hangup();<br>
exit();<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" 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></blockquote></div><br></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" 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">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></blockquote></div><br></div>