both of your set lines are wrong:<br><br>session.cause and session.causecode are attributes<br><br><div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">session.setVariable(&quot;session.causecode&quot;, &quot;discause: &quot; + session.causecode+ &quot;\n);</span></span></div>

<div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">session.setVariable(&quot;notice&quot;, &quot;Disconnect cause: &quot; + session.cause + &quot;\n&quot;);</span></span></div><br>session.setVariable(&quot;cause_code&quot;, session.causecode);<br>
session.setVariable(&quot;cause_name&quot;, session.cause);<br> 
<br>would be more appropriate.<br><br>Also originate_disposition is only on outgoing legs. <br><br>Doing this sort of thing in the same script is not a good plan.  <br>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.<br>
<br><br><br><div class="gmail_quote">On Thu, Feb 26, 2009 at 6:44 AM, Baskar <span dir="ltr">&lt;<a href="mailto:yudha2008@gmail.com">yudha2008@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span style="color: rgb(255, 0, 0);"><span style="font-weight: bold;">Hi,</span></span><div><span style="color: rgb(255, 0, 0);"><span style="font-weight: bold;"><br>
</span></span></div><div><span style="color: rgb(255, 0, 0);"><span style="font-weight: bold;">     One thing i forget to tell i can able to get this </span></span><span style="font-weight: bold;">Disconnection cause</span><span style="color: rgb(255, 0, 0);"><span style="font-weight: bold;"> and </span></span><span style="font-weight: bold;">Disconnection code</span><span style="color: rgb(255, 0, 0);"><span style="font-weight: bold;"> in Freeswitch console but when i set in the variable i did not get the cause or cause code in javascript.</span></span></div>

<div><br></div><div><span style="font-weight: bold;">I use these line in Javascript i get the output in the Freeswitch console.</span></div><div><br></div><div><div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">console_log(&quot;notice&quot;, &quot;Disconnect cause: &quot; + session.cause + &quot;\n&quot;);</span></span></div>

<div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">console_log(&quot;notice&quot;, &quot;Disconnect cause: &quot; + session.causecode + &quot;\n&quot;);</span></span></div>
<div><br></div><div><span style="font-weight: bold;">OUTPUT: (For the Above line)</span></div><div><br></div><div><div><span style="color: rgb(204, 0, 0);"><span style="font-weight: bold;">2009-02-26 18:08:57 [NOTICE] odbc1.js:1 console_log() Disconnect cause: <span style="color: rgb(0, 0, 0);">NORMAL_CLEARING</span></span></span></div>

<div><span style="color: rgb(204, 0, 0);"><span style="font-weight: bold;">2009-02-26 18:08:57 [NOTICE] odbc1.js:1 console_log() Disconnect cause: <span style="color: rgb(0, 0, 0);">16</span></span></span></div>
<div><br></div></div><div><span style="font-weight: bold;">But same session cause and code if i set in the variable i did not get output</span></div><div><br></div><div><div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">session.setVariable(&quot;session.causecode&quot;, &quot;discause: &quot; + session.causecode+ &quot;\n);</span></span></div>

<div><span style="font-weight: bold;"><span style="color: rgb(51, 51, 255);">session.setVariable(&quot;notice&quot;, &quot;Disconnect cause: &quot; + session.cause + &quot;\n&quot;);</span></span></div>
<div><br></div></div></div><div><span style="font-weight: bold;">OUTPUT:</span></div><div><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);"><br>
</span></span></div><div><div><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">variable_session.causecode: </span>[discause: 0]</span></div><div><span style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">variable_notice: </span>[Disconnect cause: NONE]</span></div>

<div><span style="font-weight: bold;"><br></span></div><div><span style="font-weight: bold;">Correct me where i am wrong how can i get the disconnection cause in variable.</span></div>
<div><span style="font-weight: bold;"><br></span></div><div><span style="font-weight: bold;">Please help to solve the problem.</span></div></div><div><br></div><font color="#888888"><div><br></div>
<div><br><span style="font-weight: bold;">-- <br>Warm Regards,<br>N.Baskar<br></span><br>
</div>
</font><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>