[Freeswitch-users] hangup cause in v8

Víctor Vladimir Chávez Gallardo vivlachaga at gmail.com
Mon Feb 23 00:49:02 MSK 2015


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)

somebody can help me?

EXAMPLE

session = new Session( "{ignore_early_media=yes,origination_caller_id_number=55597428100",originate_timeout=20}freetdm/1/1/5513143104 );

hangup_cause = session.cause; <— I GOT FALSE

if(session.cause == "USER_BUSY")
{
        console_log("err", "Llamada fallida CAUSA: " + hangup_cause + "\n”); <— NEVER EXECUTED
}

if (session.ready() )
{
        session.streamFile( "barracuda.wav” ); <— WORKS WHEN USER ANSWER
}
else
{
        console_log("err", session.uuid + "\n”); <—— THE SESSION IS “FALSE"
        var hangupCause = session.getVariable("bridge_hangup_cause”); <— THIS OBJECT IS UNDEFINED       
}
session.hangup();
exit();


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list