VoiceXML Forum Community Message Board


Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» VoiceXML Forum Community Message Board   » Newbies   » log statement between two prompts

 - UBBFriend: Email this page to someone!    
Author Topic: log statement between two prompts
smart_sagittarian
Junior Member
Member # 3369

Rate Member
Icon 11 posted April 20, 2006 12:05 PM      Profile for smart_sagittarian   Email smart_sagittarian   Send New Private Message       Edit/Delete Post   Reply With Quote 
Is it possible to have a log statement played between two prompts? Or more specifically, there are a set of prompts which play one after the other, and I need a log statement put in after one of the prompts is played. Is this possible?
Posts: 4 | Registered: Feb 2006  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted April 21, 2006 12:52 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
Since <prompt> and <log> are both legal children of the <block> element, you should be able to do this by enclosing everything between <block> tags.

code:
<?xml version = "1.0"?>
<vxml version = "2.0" xmlns="http://www.w3.org/2001/vxml">
<form id="test">
<block>
<prompt>This is the first prompt.</prompt>
<prompt>This is the second prompt</prompt>
<prompt>This is the third prompt</prompt>
<log>*** The third prompt was played ***</log>
<prompt>This is the last prompt.</prompt>
</block>
</form>
</vxml>

Unfortunately, your VoiceXML interpreter is likely to queue up the prompts before they are played, meaning that the log will get written even if the caller hangs up and the TTS engine doesn't output the prompt your interested in.

If your interpreter supports the VoiceXML 2.1 spec, you may want to explore using the <mark> tag to detect when certain prompts are played.

Hope this helps.

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 55 | Registered: Jun 2005  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted June 12, 2006 06:54 AM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
If your interested, I now have a short tutorial on using the <mark> element up on my site. Sample code is also provided.

Hope this helps.

--------------------
Mark
VoiceinGov.org
http://www.voiceingov.org

Posts: 55 | Registered: Jun 2005  |  IP: Logged


All times are Eastern  
Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | VoiceXML Forum



Powered by Infopop Corporation
UBB.classicTM 6.3.1.2