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   » End Recording with Pound Sign

 - UBBFriend: Email this page to someone!    
Author Topic: End Recording with Pound Sign
agatlin
Junior Member
Member # 3417

Rate Member
Icon 1 posted March 15, 2006 09:43 AM      Profile for agatlin   Email agatlin   Send New Private Message       Edit/Delete Post   Reply With Quote 
I'm recording a callers first name and last name via the <record> tag. Once they are finished stating their name I want them to be able to press the # sign to end the recording (or wait until the finalsilence limit is reached). My question is this, since the "dtmfterm" attribute is set to true, how can ONLY allow the user to press the # sign (disregarding all other keypresses) to end the recording? Do I need to define a special grammars to allow this? I tried playing with some grammars (see below) on this but i got nowhere fast...not too knowledable on grammars...YET [Smile]

Here's the code:

<record name="BuyerName" modal="false" beep="true" type="audio/x-wav" dtmfterm="true" maxtime="10s" finalsilence="5s">

<!-- Test inline grammers
<grammar version="1.0" mode="dtmf" root="rulPound">
<rule id="rulPound">
<one-of>
<item>#</item>
</one-of>
</rule>
</grammar>

</record>

Posts: 3 | Registered: Mar 2006  |  IP: Logged
mheadd
Member
Member # 3181

Member Rated:
4
Icon 1 posted March 15, 2006 12:38 PM      Profile for mheadd   Author's Homepage   Email mheadd   Send New Private Message       Edit/Delete Post   Reply With Quote 
I think you can use one approach or the other, but not both.

According to the VXML 2.0 spec, "[a] recording ends when an event is thrown, DTMF or speech input matches an active grammar, or the maxtime interval is exceeded."

Using the "dtmfterm" attribute set to 'true' is like having a local grammar defined for any DTMF input -- any DTMF input that is entered will match the grammar and terminate the recording. You can also terminate recording by defining an explicit local grammar, as you've done in your example, but the implicit grammar created by the "dtmfterm" attribute will always have precedence over other local DTMF grammars.

So, if you use an explicit grammar with only one token -- the pound key -- AND you have the "dtmfterm" attribute set to 'true' then the implicit grammar will have precedence and any DTMF input will be recognized, terminating your recording.

You may want to try setting the "dtmfterm" attribute to false and using your explicit grammar for the pound sign to terminate recording.

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