[Freeswitch-users] Cant get Disposition status in Javascript

Nik Middleton nik.middleton at noblesolutions.co.uk
Thu Feb 26 13:09:46 PST 2009


Works for me, see snippet below

 

var first_session = new Session(dial_string);

            

            // Trap for call failure

            if (!first_session.ready()) {

                        consoleLog("err", "Disposition: " +
first_session.cause + "\n");

                        if (first_session.cause == "USER_BUSY") {

                                                            Disposition
= "BUSY";

                                    } 

                                    else if (first_session.cause ==
"NO_ROUTE_DESTINATION") {

                                                            Disposition
= "DCN";

                                    }

 


                                    else if (first_session.cause ==
"NO_ANSWER") {

                                                            Disposition
= "NA";

                                    }

 

                                                

                                                exit();  

            }

 

________________________________

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of
Baskar
Sent: 26 February 2009 14:56
To: freeswitch-users at lists.freeswitch.org
Subject: Re: [Freeswitch-users] Cant get Disposition status in
Javascript

 

Hi Anthony Minessale,

I have added these lines in my javascript with your guidance. But still
i did not get any status like  busy , no answer, etc .

 

session.setVariable("cause_code", session.causecode);

session.setVariable("cause_name", session.cause);

 

I Get this output only for all the call:

 

variable_cause_code: [0]

variable_cause_name: [NONE]

 


-- 
Warm Regards,
N.Baskar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090226/0cd4cb79/attachment-0002.html 


More information about the FreeSWITCH-users mailing list