[Freeswitch-users] Cant get Disposition status in Javascript
Anthony Minessale
anthony.minessale at gmail.com
Thu Feb 26 06:11:55 PST 2009
both of your set lines are wrong:
session.cause and session.causecode are attributes
session.setVariable("session.causecode", "discause: " + session.causecode+
"\n);
session.setVariable("notice", "Disconnect cause: " + session.cause + "\n");
session.setVariable("cause_code", session.causecode);
session.setVariable("cause_name", session.cause);
would be more appropriate.
Also originate_disposition is only on outgoing legs.
Doing this sort of thing in the same script is not a good plan.
You should really be doing it in the CDR engine where you can get records
for both legs of the call in a relaxed environment.
On Thu, Feb 26, 2009 at 6:44 AM, Baskar <yudha2008 at gmail.com> wrote:
> Hi,
> One thing i forget to tell i can able to get this Disconnection causeand Disconnection
> code in Freeswitch console but when i set in the variable i did not get
> the cause or cause code in javascript.
>
> I use these line in Javascript i get the output in the Freeswitch console.
>
> console_log("notice", "Disconnect cause: " + session.cause + "\n");
> console_log("notice", "Disconnect cause: " + session.causecode + "\n");
>
> OUTPUT: (For the Above line)
>
> 2009-02-26 18:08:57 [NOTICE] odbc1.js:1 console_log() Disconnect cause:
> NORMAL_CLEARING
> 2009-02-26 18:08:57 [NOTICE] odbc1.js:1 console_log() Disconnect cause: 16
>
> But same session cause and code if i set in the variable i did not get
> output
>
> session.setVariable("session.causecode", "discause: " + session.causecode+
> "\n);
> session.setVariable("notice", "Disconnect cause: " + session.cause + "\n");
>
> OUTPUT:
>
> variable_session.causecode: [discause: 0]
> variable_notice: [Disconnect cause: NONE]
>
> Correct me where i am wrong how can i get the disconnection cause in
> variable.
>
> Please help to solve the problem.
>
>
>
> --
> Warm Regards,
> N.Baskar
>
>
> _______________________________________________
> 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
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090226/75a71d97/attachment-0002.html
More information about the FreeSWITCH-users
mailing list