u:p:
Paid Services > Name & Address Capture


Usage

The following code shows how you can use the name and address capture subdialog in your VoiceXML application.

You can customize the application by setting a root directory for all audio files and by setting the maximum number of rejections for all prompts. Click here to view a list of all audio prompts.



<?xml version="1.0" encoding="UTF-8" ?>
<vxml version="2.0">
<property name="nuance.core.tts.ResourceName" value="en-US.F019" />

<!--
Replace the username and password with your Voxeo community login.  Your account must be 
enabled with Targus name and address capture access in order for the following script 
to work.  Contact support@voxeo.com to get access for your account.
-->

<form>
    <subdialog name="sd" src="http://targus-internal/targus/vxml/start.xml">

        <param name="username" expr="'your_username'"/>
        <param name="password" expr="'your_password'"/>
        
        <param name="method" expr="'getAllInfo'"/>
        
        <!--optional customizations-->
        <assign name="audioDirURI" expr="'http://targus-internal/targus/vxml/prompts'" />
        <assign name="maxRejections" expr="'5'" />

        <!--add appRootURI to the namelist below if you want to use a custom root document-->
        <assign name="appRootURI" expr="'http://yourserver.com/path_to_root.xml'" />

    </subdialog>

    <block>
        
        <if cond="sd.status=='FAILED'">
            <prompt>we failed to collect your information</prompt>
        <elseif cond="sd.status=='SUCCESS'" /> 
            <prompt>we successfully collected your information</prompt>
        <elseif cond="sd.status=='ERROR_ACCESS'" /> 
            <prompt>Sorry, but access was denied</prompt>
        <elseif cond="sd.status=='ERROR_SYSTEM'" /> 
            <prompt>Sorry, but this system is currently unavailable</prompt>
        </if>
        
        <!--lets read back the results-->
        <prompt>your first name is <value expr="sd.firstname" /> </prompt>
        <prompt>your last name is <value expr="sd.lastname" /> </prompt>
        <prompt>your street is <say-as interpret-as="address"> <value expr="sd.street" /></say-as></prompt>
        <prompt>your city is <value expr="sd.city" /> </prompt>
        <prompt>your state is <value expr="sd.state" /> </prompt>
        <prompt>your zip code is <say-as interpret-as="digits"><value expr="sd.zipcode" /></say-as> </prompt>
        <prompt>your zip code plus four is <say-as interpret-as="digits"><value expr="sd.zipPlus4" /></say-as> </prompt>
    </block>
    
</form>
</vxml>


©2002-2008 Voxeo Corporation  -  VoiceXML Hosting  -  VoiceXML Servers  -  Site Map  -  Terms of Use  -  Privacy Policy  -  Covered by U.S. Patent No. 6,922,411