Make plans now to attend XMPP integration with CVP 2012/06/14 @ 10:00 AM at Cisco Live! in San Diego. ...Read More

 



Cisco Developer Network will be presenting a CDN Developer Track at Cisco Live! London the week of January 31, 2011.

We are presenting technical sessions which highlight Application Programming interfaces (APIs) and Software Developer Kits (SDKs) for Cisco technologies such as Unified Communications, IOS, and Access Routing Technologies ¿ including the new Cisco Cius ...Read More

 

Recently noticed that there have been repeated questions from our developer community complaining that they can't seem to get the beep to work with <record>. They have set the beep attribute to "true" alright, and the reference guide even says this is supported but why doesn't it work?
...Read More

 

August 01, 2006
Earlier today, as I was typing a comment in our internal issuing-tracking system, I hit backspace to correct a typo. WHAM! I go back to the previous page, and my long-winded comment is gone. Apparently I somehow left the context of the text area (did I tab, or spuriously click, or??), which causes backspace to act as a hotkey for "Back". The web browser was not very forgiving of my mistake.

Are your IVR applications forgiving? They should be.
...Read More

 

Mark Gibbs over at Network World has put together a spiffy little scoring system for customer service systems (including many criteria for IVR systems). How would callers score your IVR using Mark's guidelines? Place a call and find out, you may be surprised.
...Read More

 

If you're using JNDI to connect to your database through Tomcat, then it's possible you've had to deal with database connection pool leaks. Your code tests fine, it's been reviewed, but in load tests or in production your app is unable to acquire database connections, the pool is empty!

Fear not, there are some handy parameters which can be set in your application's XML configuration file (in tomcat/conf/Catalina/YOUR_IP/YOUR_APP.xml):
...Read More

 

Showing 6 results.
Items per Page 50
of 1

CVP Forum

« Back to General Discussion

How to use local variables in decision/action elements?

Combination View Flat View Tree View
Threads [ Previous | Next ]
We are writing decision/action elements and developer found that they cannot use instance variables because they are kind of "static", but they also cannot use scratch data (not exposed in DecisionData/ElementAPI).

Right now there are a couple of options: use session data, or use parameters. Neither is convenient.

Questions are:

1) is there a third way?
2) can scratch data be offered in later release of Audium API?

Chin,

Scratch data exists for voice elements only because only voice elements need a place to store information from page to page. Since actions and decisions execute immediately, there is no need for scratch data. Even if it were introduced, it would be deleted once the action or decision element ended.

Is the purpose to store information somewhere in memory that stays alive for the duration of the call? If so, that is what Session Data is designed for.

If the purpose is to retain the data across calls, and possibly across applications, then there are various solutions.

1) Use a file or database. This is not very desireable due to the overhead involved.

2) Use static variables in classes. We recommend against this because of the cosequences: if you run the update script the static variables are reset, any call to the application can change its value, and most importantly, that value is not replicated using Resin session replication so would be lost if a failover event occurred. If this is desireable behavior, it will work.

3) Use a singelton class. This has very much the same limitations as option 2, though you can build into it the ability to resolve some of those issues (like potentially preventing all but a certain call from changing its data). There would still be a problem in the case of a failover event.

4) Separate the data on a separate thread, servlet, or machine and use RMI to get the information back and forth. While this is slower than direct memory access, it should be faster than accessing a database. A brief aside: we had an internal application building contest within the company a while back and one team built a submarine game in which callers simultaneously called into the system could shoot at eachother. Their game engine existed as a separate process that the voice application accessed via RMI. That was how they were able to have data created by one caller get shared with other callers and persist even if certain callers hung up.

Hope this helps!