I'm very new to VXML, and I have built one file that authenticates a user based on their name and user id...and I made another one which is just a basic menu...now, how do I integrate them? I'm completely lost...and have been working on this for days. Could someone please help me?
Thank in advance!
here's the code for the first one:
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="
<meta name="description" content="menu example"/>
<menu dtmf="true">
<prompt>
Welcome to Santa Cruz Callers. Please say the name of the menu item or
<enumerate>
press <value expr="_dtmf"/> for <value expr="_prompt"/>
</enumerate>
</prompt>
<choice next="#retrieve">
retrieve schedule
</choice>
<choice next="#update">
update schedule
</choice>
<choice next="#weather foreskin">
weather foreskin
</choice>
<noinput> Please say one of <enumerate/> </noinput>
<nomatch> I don't understand you. Please say one of <enumerate/> </nomatch>
</menu>
<form id="retrieve">
<block> Welcome to schedule retrieval. one. dinner with Pink Floyd. two. breakfast with Tiffany. </block>
</form>
<form id="update">
<block> Welcome to update schedule. Nothing is here for now. </block>
</form>
<form id="weather">
<block> Welcome to weather forecast. Weather will be either good or bad. </block>
</form>
</vxml>
-----------------------------
and here's the second:
<?xml version="1.0"?>
<vxml version="2.0" xmlns="
<link next="project7.vxml">
<grammar>(start over)</grammar>
</link>
<var name="confirmedReporterId"/>
<var name="nameOfRecording"/>
<form id="validation">
<!-- VARIABLES -->
<var name="phoneNumber"
expr="session.telephone.ani"/>
<var name="phoneType"
expr="session.telephone.iidigits"/>
<var name="accessAttempts" expr="1"/>
<!-- REPORTER NAME -->
<field name="reporterName">
<grammar>
<![CDATA[
[
[(mark ?miller)] {<reporterName A1234>}
[(tim ?chandler)] {<reporterName B4321>}
]
]]>
</grammar>
<!-- PROMPT -->
<audio src="speak-your-name.wav">
Please speak your name.
</audio>
<filled/>
<!-- ERROR CHECKING -->
<catch event="nomatch noinput" count="1">
<prompt>I missed that.</prompt>
<reprompt/>
</catch>
<catch event="nomatch noinput" count="2">
<prompt>
There seems to be a problem with your log in.
Please contact your system administrator.
</prompt>
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber phoneType"/>
</catch>
</field>
<!-- REPORTER ID -->
<field name="reporterId">
<grammar>
<![CDATA[
[
[(hawaii)] {<reporterId A1234>}; Mark Miller
[california] {<reporterId B4321>}; Tim Chandler
]
]]>
</grammar>
<audio src="enterid.wav">
Employee Identification number?
</audio>
<!-- CATCH ERRORS -->
<catch event="nomatch noinput" count="1">
<prompt>I cannot hear you.</prompt>
<reprompt/>
</catch>
<catch event="nomatch noinput" count="2">
<prompt>
There seems to be a problem with your log in.
Please contact the systems administrator.
</prompt>
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber phoneType"/>
</catch>
<!-- AUTHENTICATION -->
<filled>
<!-- VALID COMBINATION -->
<if cond="reporterName == reporterId">
<assign name="confirmedReporterId" expr="reporterId"/>
<audio src="welcome-back.wav">
Welcome back, <value expr="reporterName$.utterance"/>.
</audio>
<!-- INVALID COMBINATION -->
<elseif cond="accessAttempts > 1"/>
Please contact the system admin
to confirm you should
have access to this system.
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber
phoneType
reporterName
reporterId"/>
<else/>
<audio src="invalid-login.wav">
That Reporter Name and ID combination
were not valid. Try it again.
</audio>
<assign name="accessAttempts"
expr="accessAttempts+1"/>
<clear namelist="reporterName reporterId"/>
</if>
</filled>
</field>
</form>
</vxml>
any help would be greatly appreciated!
Thank in advance!
here's the code for the first one:
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="
<meta name="description" content="menu example"/>
<menu dtmf="true">
<prompt>
Welcome to Santa Cruz Callers. Please say the name of the menu item or
<enumerate>
press <value expr="_dtmf"/> for <value expr="_prompt"/>
</enumerate>
</prompt>
<choice next="#retrieve">
retrieve schedule
</choice>
<choice next="#update">
update schedule
</choice>
<choice next="#weather foreskin">
weather foreskin
</choice>
<noinput> Please say one of <enumerate/> </noinput>
<nomatch> I don't understand you. Please say one of <enumerate/> </nomatch>
</menu>
<form id="retrieve">
<block> Welcome to schedule retrieval. one. dinner with Pink Floyd. two. breakfast with Tiffany. </block>
</form>
<form id="update">
<block> Welcome to update schedule. Nothing is here for now. </block>
</form>
<form id="weather">
<block> Welcome to weather forecast. Weather will be either good or bad. </block>
</form>
</vxml>
-----------------------------
and here's the second:
<?xml version="1.0"?>
<vxml version="2.0" xmlns="
<link next="project7.vxml">
<grammar>(start over)</grammar>
</link>
<var name="confirmedReporterId"/>
<var name="nameOfRecording"/>
<form id="validation">
<!-- VARIABLES -->
<var name="phoneNumber"
expr="session.telephone.ani"/>
<var name="phoneType"
expr="session.telephone.iidigits"/>
<var name="accessAttempts" expr="1"/>
<!-- REPORTER NAME -->
<field name="reporterName">
<grammar>
<![CDATA[
[
[(mark ?miller)] {<reporterName A1234>}
[(tim ?chandler)] {<reporterName B4321>}
]
]]>
</grammar>
<!-- PROMPT -->
<audio src="speak-your-name.wav">
Please speak your name.
</audio>
<filled/>
<!-- ERROR CHECKING -->
<catch event="nomatch noinput" count="1">
<prompt>I missed that.</prompt>
<reprompt/>
</catch>
<catch event="nomatch noinput" count="2">
<prompt>
There seems to be a problem with your log in.
Please contact your system administrator.
</prompt>
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber phoneType"/>
</catch>
</field>
<!-- REPORTER ID -->
<field name="reporterId">
<grammar>
<![CDATA[
[
[(hawaii)] {<reporterId A1234>}; Mark Miller
[california] {<reporterId B4321>}; Tim Chandler
]
]]>
</grammar>
<audio src="enterid.wav">
Employee Identification number?
</audio>
<!-- CATCH ERRORS -->
<catch event="nomatch noinput" count="1">
<prompt>I cannot hear you.</prompt>
<reprompt/>
</catch>
<catch event="nomatch noinput" count="2">
<prompt>
There seems to be a problem with your log in.
Please contact the systems administrator.
</prompt>
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber phoneType"/>
</catch>
<!-- AUTHENTICATION -->
<filled>
<!-- VALID COMBINATION -->
<if cond="reporterName == reporterId">
<assign name="confirmedReporterId" expr="reporterId"/>
<audio src="welcome-back.wav">
Welcome back, <value expr="reporterName$.utterance"/>.
</audio>
<!-- INVALID COMBINATION -->
<elseif cond="accessAttempts > 1"/>
Please contact the system admin
to confirm you should
have access to this system.
<disconnect/>
<submit next="securityLog.cgi"
namelist="phoneNumber
phoneType
reporterName
reporterId"/>
<else/>
<audio src="invalid-login.wav">
That Reporter Name and ID combination
were not valid. Try it again.
</audio>
<assign name="accessAttempts"
expr="accessAttempts+1"/>
<clear namelist="reporterName reporterId"/>
</if>
</filled>
</field>
</form>
</vxml>
any help would be greatly appreciated!