|
Author
|
Topic: End Recording with Pound Sign
|
agatlin
Junior Member
Member # 3417
Rate Member
|
posted March 15, 2006 09:43 AM
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
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:
|
posted March 15, 2006 12:38 PM
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
|
|
|