[Freeswitch-users] hangup cause in v8

Sergey Safarov s.safarov at gmail.com
Mon Feb 23 09:19:42 MSK 2015


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 at 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 at 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 at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150223/b7b55bea/attachment.html 


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