| VoiceXML 2.1 Development Guide | Home | Frameset Home |
|
<dtmf> element and define your DTMF grammars within the <grammar> element in order to be prepared for the VoiceXML 2.1 standard, as the dtmf element is deprecated in the VoiceXML 2.1 environments:
<grammar type="text/gsl">
<![CDATA[
[
[(dtmf-1)] {<F_1 "one">}
[(dtmf-2) ] {<F_1 "two">}
[(dtmf-3) ] {<F_1 "three">}
]
]]>
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1">
<meta name="maintainer" content="your_email_address@wherever.com"/>
<form id="guessNumber">
<field name="F_1" slot="MySlot">
<prompt>
Please punch in a number on your keypad.
</prompt>
<grammar type="text/gsl">
<![CDATA[[
[(dtmf-1)] {<mySlot "one">}
[(dtmf-2) ] {<mySlot "two">}
[(dtmf-3) ] {<mySlot "three">}
[(dtmf-4) ] {<mySlot "four">}
[(dtmf-5) ] {<mySlot "five">}
[(dtmf-6) ] {<mySlot "six">}
[(dtmf-7) ] {<mySlot "seven">}
[(dtmf-8) ] {<mySlot "eight">}
[(dtmf-9) ] {<mySlot "nine">}
[(dtmf-0) ] {<mySlot "zero">}
]
]]>
</grammar>
<noinput>
<log expr="'****no input'"/>
<prompt>
I did not hear you. Please try again.
</prompt>
<reprompt/>
</noinput>
<nomatch>
<log expr="'****no match'"/>
<prompt>
Is that a number? Please try again.
</prompt>
<reprompt/>
</nomatch>
<filled>
<prompt>
You chose <value expr="F_1$.interpretation.mySlot"/>
</prompt>
<exit/>
</filled>
</field>
</form>
</vxml>
| ANNOTATIONS: EXISTING POSTS |
kaje
|
|
| please help me!!!!! i want to connect mysql with VXML.if u konw any one please send me follwing mail address "kajenden2006@yahoo.co.uk"
<?xml version="1.0"?> <vxml version = "2.1"> <meta name="maintainer" content="YOUREMAILADDRESS@HERE.com"/> <form id="costomerNumber"> <field name="guess"> <grammar type="text/gsl"> [dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-6 dtmf-7 dtmf-8 dtmf-9 dtmf-0] </grammar> <prompt> Well come to our voice mail services! Please type your mail ID. </prompt> <noinput> <prompt> I did not hear you. Please try again. </prompt> <reprompt/> </noinput> <nomatch> <prompt> Is that a number? Please try again. </prompt> <reprompt/> </nomatch> </field> <filled namelist="guess" mode="all"> <prompt> We accepted your ID! <value expr="guess" /> </prompt> <goto next="#playAgain" /> </filled> </form> <form id="playAgain" > <field name="AOrB"> <grammar type="text/gsl"> <![CDATA[[ [ dtmf-1] { <AOrB "A"> } [ dtmf-2] { <AOrB "B"> } ]]]> </grammar> <prompt bargein="false"> Do you want to read your message!please press one?. if you no! please press two. </prompt> </field> <filled name="AOrB" mode="all"> <if cond="AOrB == 'A'"> <goto next="#A"/> <elseif cond="AOrB == 'B'" /> <goto next="#B"/> </if> </filled> </form> <form id="A"> <field name="lost"> <prompt> hi ravi this is text message. </prompt> </field> <filled> <if cond="lost=='1'"> <goto next="#playAgain"/> </if> </filled> </form> <form id="B"> <field name="BackToMain"> <prompt> No message. </prompt> </field> <filled> <if cond="B=='1'"> <goto next="#playAgain"/> </if> </filled> </form> </vxml> |
|
voxeoJeffK
|
|
| Hi,
What you will need to do is use server-side logic such as PHP or JSP to connect to your database. Your VXML can transfer data to the server-side logic by way of the <submit> or <data> elements. We have an outline of the basics available here: http://docs.voxeo.com/voicexml/2.0/intro_serverside.htm And a tutorial is here: http://docs.voxeo.com/voicexml/2.0/qs_vars.htm Hope that helps, Jeff K. Voxeo Support |
|
shiran
|
|
| i found a DTMF capture code(using grammar).
<grammar type="text/gsl"> <![CDATA[ [ [(dtmf-1)] {<F_1 "one">} [(dtmf-2) ] {<F_1 "two">} [(dtmf-3) ] {<F_1 "three">} ] ]]> </grammar> tell me where i should put this to implement DTMF capturing. |
|
voxeoJeffK
|
|
| Hi,
You will want to include the grammar in the scope of the relevant input item. For instance for <field name="F_1"> the grammar will match the user's input of DTMF-1,2 or 3 and fill the F_1 variable: <field name="F_1"> <prompt> Please punch in a number on your keypad. </prompt> <grammar type="text/gsl"> <![CDATA[[ [(dtmf-1)] {<F_1 "one">} [(dtmf-2) ] {<F_1 "two">} [(dtmf-3) ] {<F_1 "three">} ] ]]> </grammar> <filled> <prompt> You chose <value expr="F_1$.interpretation.F_1"/> </prompt> <exit/> </filled> </field> hope that helps, Jeff K. Voxeo Support |
| login |
|