Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
pmhshz at gmail.com
Guest





PostPosted: Wed Jan 21, 2009 2:13 am    Post subject: [Freeswitch-users] Method getVariable cause error on FS 1.0. Reply with quote

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@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.


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
pmhshz at gmail.com
Guest





PostPosted: Wed Jan 28, 2009 6:47 am    Post subject: [Freeswitch-users] Method getVariable cause error on FS 1.0. Reply with quote

Hi again,

How can i resolve this error,
Does it require to modify my js code, Or any freeswitch settings (dialplan
or profile related etc.) can solve this?
I am waiting for your response.

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


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
brian at freeswitch.org
Guest





PostPosted: Wed Jan 28, 2009 6:55 am    Post subject: [Freeswitch-users] Method getVariable cause error on FS 1.0. Reply with quote

You really shouldn't be using the originate method. You're doing more
by hand then you should. Care to post a little more detail about how
you're using this?

/b

On Jan 21, 2009, at 1:10 AM, shehzad p wrote:

Quote:
newsession.originate(session, dialstr);


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Jan 28, 2009 8:55 am    Post subject: [Freeswitch-users] Method getVariable cause error on FS 1.0. Reply with quote

You *never* could get vars from channels that did not successfully originate.
Unless originate was a success there is nothing to get variables from.

What you probably did was get the variable from the existing session when a failure occurs because pdd time from a failed
call is copied across to the A leg.

So try session.getVariable not newsession.getVariable


On Wed, Jan 28, 2009 at 5:54 AM, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote:
You really shouldn't be using the originate method. You're doing more
by hand then you should. Care to post a little more detail about how
you're using this?

/b

On Jan 21, 2009, at 1:10 AM, shehzad p wrote:

Quote:
newsession.originate(session, dialstr);



_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services