[Freeswitch-users] session.cause and session.causecode

Francesco Facco de Lagarda francesco at delagarda.com
Tue Jun 19 07:46:15 UTC 2018


Thanks Matt .. you saved me… by dumping all the vars I realized that what I really needed to understand why the call had failed cas not the cause or causecode, but the “originateCause”

 

From: FreeSWITCH-users <freeswitch-users-bounces at lists.freeswitch.org> On Behalf Of Matt Broad
Sent: lunedì 18 giugno 2018 15:45
To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
Subject: Re: [Freeswitch-users] session.cause and session.causecode

 

sessOut.causeCode should be sessOut.causecode

 

you can get the sessOut object values by adding:

 

console_log("notice", JSON.stringify(sessOut) ); 

 

 

 

thanks

Matt




Matt Broad

Tel:  <tel:+44%2020%203011%201313> +44 (0)203 011 1313

Web:  <http://www.supportedbusiness.com/> www.supportedbusiness.com

  <http://www.supportedbusiness.com/coming-soon-logo.png> 

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.

 

On 17 June 2018 at 10:12, Francesco Facco de Lagarda <francesco at delagarda.com <mailto:francesco at delagarda.com> > wrote:

‘Morning all

I can’t get session.cause and session.causecode to work.

All I get is false for the code and blank for the cause!

 

Im running FS 1.6.20

 

This is a simplified version of my JS script

 

if (session.ready()) {

 

    session.answer();

 

    var dialedNum = "3332094333"; 

                console_log("notice", "*********************** DIALING");

                var sessOut = new Session("sofia/gateway/realtoneFXO/" +  dialedNum + "@192.168.0.216:5060 <http://192.168.0.216:5060> ");

                console_log("notice", "*********************** WAITING FOR SESSION READY ..");

 

                

                if (sessOut.ready()) {

               console_log("notice", "*********************** SESSION READY");

               bridge(session, sessOut);

                } else {

                               console_log("notice", "************************* disconnect cause:" + sessOut.cause + ":" + sessOut.causeCode);

                }

                sessOut.hangup();

                session.hangup();

    console_log("notice", "*********************** CALL ENDED");

 

}

 

 


_________________________________________________________________________
Professional FreeSWITCH Services
sales at freeswitch.com <mailto:sales at freeswitch.com> 
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org> 
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180619/6125f9f4/attachment-0001.html>


More information about the FreeSWITCH-users mailing list