[Freeswitch-users] Method getVariable cause error on FS 1.0.2 in javascript

shehzad p pmhshz at gmail.com
Tue Jan 20 23:10:38 PST 2009


Hi all, 

I am using the javascript for call termination, and after call complete, I
use getVariable mehtod to get some values like PDD.
Below is my javascript that perform this:
============================================================
                dialstr="sofia/outbound/1111 at xxx.xxx.xx.xx";
                newsession.originate(session, dialstr);
                if(session.ready() && newsession.ready())
                        bridge(session, newsession);

                if(newsession.getVariable("progressmsec") != false)
 //in FS 1.0.2 and SVN version SCRIPT TERMINATES on above line
                        pdd = newsession.getVariable("progressmsec");
                else
                        pdd = 0;
                  .................<other code>
==========================================================

Above script works fine in FS 1.0.1.

Now I am testing FS 1.0.2, It also works fine when call is being ANSWERED,
PDD is correctly collected, 
BUT when Call is not routed successfully due to some network problem, or
User No-Answer / Busy, then below error occurs:
-------------------------------------------------------------------------------------------------------------------------------------------------------
2009-01-19 19:40:43 [ERR] inline:1 mod_spidermonkey()  You must call the
session.originate method before calling this method!
--------------------------------------------------------------------------------------------------------------------------------------------------------
And after this error, script DOES NOT continue execution and TERMINATES.
I also tested SVN version (revision 11266), but same error occurs there too.

What should be the cause here, so this behavior of FS is changed from 1.0.1
to 1.0.2.

Thanks.
msp



-- 
View this message in context: http://www.nabble.com/Method-getVariable-cause-error-on-FS-1.0.2-in-javascript-tp21578116p21578116.html
Sent from the Freeswitch-users mailing list archive at Nabble.com.





More information about the FreeSWITCH-users mailing list