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@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Baskar
Sent: 26 February 2009 14:56
To: freeswitch-users@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