We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

Record Tag and dtmf grammars

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Record Tag and dtmf grammars

Post by agfa »

Hi

I am a little confused with how to handle the telephone key presses during a <record>. I suspect I have something wrong somewhere.

Basically, I have a set grammar. I only want users to be able to press those keys during a record (to stop recording); any other keypresses are to be ignored and recording continue. What currently happens is that any key pressed stops my recording.

Here is a general outline of my vxml.

<record name="recording" beep="true" modal="false" dtmfterm="true" type="audio/x-wav">
<grammar>(1|4|6|"*"|"#")</grammar>
<prompt/>
<filled>
</filled>
</record>

I tried placing the grammar above the <record> tag but that didn't seem to make a difference. I have no <catch> events, since I don't want to catch invalid inputs, I just want the recording to continue as if nothing happened.

Perhaps somebody could advise me as to what I am doing wrong.

Thanks.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Recording with IVR platform

Post by support »

Hello,

The Plum VoiceXML Platform does not support the behavior you are describing. If the dtmfterm attribute is set to true it forces the IVR platform to allow all keypresses to terminate the recording. If the attribute is set to false the IVR system will ignore the key presses and continue recording until finalsilence is reached. In both cases after the recording is complete the IVR system will attempt to perform a match based on any DTMF input that occurred in during the record.

Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 5:28 pm, edited 3 times in total.

agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Post by agfa »

Thank you for the reply.

I was wondering then, based on your reply, what the 'modal' attribute of the <record> tag does. In the programmers description it says:
modal: (defaults to true) If this is false, all active dtmf grammars are turned on while recording, if the recording is terminated by dtmf and it has a match with an active grammar, then the appropiate filled action is taken

Can I not just specify a grammar with a limited match? If not, then I am bit a confused what this is for and how it works; and how do the <catch> events work inside the <record>; If I hit a <catch nomatch> then can I immediately re-record?

Thanks for your help.
Regards.

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

IVR code using non-modal <record> with active <link

Post by support »

Hello,

The modal attribute of the <record> tag is used to disable any global grammars when the IVR system is listening for input. Global grammars are defined as any IVR grammar that is defined outside the scope of the current form. Normally these IVR grammars are defined in <link> tags. Link tags allow you to define global key presses that trigger an action, such as pressing "0" to reach an operator. Here is an IVR code sample that uses a non-modal <record> with an active <link> grammar:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
	<link next="#operator>0</link>
	<form id="record">
		<record name="rec1" beep="true" modal="false" dtmfterm="true" type="audio/x-wav">
			<prompt>Please say something after the beep, or press 0 at any time to be transferred to an operator</prompt>
			<filled>
				You said <value expr="rec1"/>
			</filled>
		</record>
	</form>

	<form id="operator">
		<!-- PERFORM TRANSFER HERE -->
		<block>
			<prompt>Please wait while you are transferred</prompt>
		</block>
	</form>
</vxml>
If the caller presses 0 during the recording the following takes place:
1. The recording is stopped.
2. The system attempts to match the terminating character against any active grammars.
3. The global <link> grammar matches the termchar and triggers a transition to the "operator" <form>.
If the caller presses any other key during the recording the following takes place:
1. The recording is stopped.
2. The system attempts to match the terminating character against any active grammars.
3. No match is found so the <record> tag is filled with the audio data and the <filled> block is executed.

If the modal attribute of the <record> tag were set to "true" the system would not have any IVR grammars to match and would always execute the <filled> block.

A <record> can only be "filled" with a recording, never DTMF input. That is why the name$.termchar shadow variable is provided. Since the only allowed "input" is audio, it is not possible to trigger a <nomatch> within a record. There is nothing a user can say that does not qualify as a recording. However, if the caller fails to say anything at all the system will trigger a <noinput> event.

Regards,
Plum Support
Last edited by support on Sat Feb 20, 2010 2:33 pm, edited 5 times in total.

agfa
Posts: 40
Joined: Thu Jun 15, 2006 12:56 pm

Post by agfa »

Thank you for the reply, that was most helpful.

Much appreciated.

Post Reply