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

Accepting date from a caller & making him listen the sam

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
awaneeshp
Posts: 29
Joined: Fri Nov 17, 2006 1:48 am

Accepting date from a caller & making him listen the sam

Post 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

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

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

Post 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

Post Reply