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();
What is happned when you try originate registered user? "originate user/100" On Mon, Feb 23, 2015 at 12:49 AM, Víctor Vladimir Chávez Gallardo < vivlachaga@gmail.com> wrote:
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(); _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Check if the variable 'originateCause' holds the actual cause. If I remember correctly this case will return an empty session object, but a global variable named 'originateCause' is set instead. /Peter 2015-02-23 7:19 GMT+01:00 Sergey Safarov <s.safarov@gmail.com>:
What is happned when you try originate registered user? "originate user/100"
On Mon, Feb 23, 2015 at 12:49 AM, Víctor Vladimir Chávez Gallardo < vivlachaga@gmail.com> wrote:
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(); _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Peter Olsson
-
Sergey Safarov
-
Víctor Vladimir Chávez Gallardo