|
Author
|
Topic: Handling timer In VoiceXML
|
bharath1947
Junior Member
Member # 3295
|
posted November 15, 2005 01:00 PM
Hi,
Any idea on how to implement Application level timer at VXML side. For example, i need to allow the user to use my vxml application for not more than 5 minutes.
Thanks, Bharath N
Posts: 3 | Registered: Nov 2005
| IP: Logged
|
|
mheadd
Member
Member # 3181
Member Rated:
|
posted November 15, 2005 08:34 PM
There aren't any standard session variables in VoiceXML to time the length of a call.
Some platforms have their own extensions to provide this. For example, the BeVocal platform has a session variable called "session.bevocal.timeincall" that stores the amount of time a call has lasted. This won't help you if you want to make your application portable to other platforms.
You may want to use some JavaScript in your VoiceXML dialog to keep track of the length of a call. Check out the JavaScript date object for more on this.
Hope this helps.
-------------------- Mark VoiceinGov.org http://www.voiceingov.org
Posts: 55 | Registered: Jun 2005
| IP: Logged
|
|
RaxitSheth
Member
Member # 3142
Member Rated:
|
posted November 16, 2005 12:07 AM
GENERALLY Application level Timer may not be a Good Dialog Design Idea.
( But in some case when developer want to put some HARD Constraint due to some CRITICAL TIMING/SECURITY policy this may be the only option.)
You can have Timer in field element so that you can control input timeout, but here you want to control application level timer, If your requirenment is much specific then only you should do this type of design
how to do was explained by Mheadd in previous reply
Regards Raxit Sheth
Posts: 34 | From: India | Registered: May 2005
| IP: Logged
|
|
mheadd
Member
Member # 3181
Member Rated:
|
posted November 16, 2005 07:17 AM
You may be able to use JavaScript to create an application-level timer by instantiating a variable with the current time, and then checking against that variable at certain points in the call flow.
After thinking about this a bit, it would probably require repeated calls to a function when the user interacts with the dialog in order to work. This may not be what you want.
You may also want to have a look at the CCXML specification, specifically the <send> element. The <send> element allows you to time user defined events (by using the "delay" attribute). A CCXML script could pass a caller off to a VoiceXML dialog, and then simultaneously send and event for processing at some time in the future (e.g., within 5 minutes). When the delay is up, the CCXML script could pull the caller back, or disconnect the call.
There is an example of this approach on the Voxeo web site.
Hope this helps.
-------------------- Mark VoiceinGov.org http://www.voiceingov.org
Posts: 55 | Registered: Jun 2005
| IP: Logged
|
|
bharath1947
Junior Member
Member # 3295
|
posted December 02, 2005 06:54 PM
Hi All,
CCXML "<send delay" solved this issue.
Thanks Bharath N
Posts: 3 | Registered: Nov 2005
| IP: Logged
|
|
|