Page 1 of 1

Accepting date from a caller & making him listen the sam

Posted: Mon Nov 20, 2006 1:27 am
by awaneeshp
Hi,

Will you please let us know the VXML syntax so that we can accept date of birth either entered or spoken by a caller i.e (DTMF & Voice both) in the format MM/DD/YYYY (US format)?

Once caller inputs the date, do we have some inbuilt grammar to verify his entry by speaking out date for his confirmation?

Thanks,
-Awaneesh

no IVR built-in grammars that can accept date via DTMF

Posted: Mon Nov 20, 2006 9:40 am
by support
Hello,

There are no IVR built-in grammars that can accept date via DTMF. You would have to build a set of custom fields that would collect the month, day and year seperately. You can use the built-in "date" grammar to collect a date via speech input. The output of the date from the built-in IVR grammar will be of the format YYYYMMDD. You will have to either POST this collected data to your IVR application server to process it or you can perform standard javacript string manipulation on the result store it and play it back. For an IVR example:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form>
	<field name="dob" type="date">
		<prompt>Please say your birthday</prompt>
		<filled>
			<!-- reformat the date and play it back -->
			<assign name="dob" value="dob.substr(4,2)+'/'+dob.substr(6,2)+'/'+dob.substr(0,4)"/>
			<prompt bargein="false">
				You said <say-as type="date"><value expr="dob"/></say-as>
			</prompt>
		</filled>
	</field>
</form>

</vxml>
Regards,
Plum Support