Mixed Intutive Grammer - Getting Syntax error while calling
Posted: Thu Mar 26, 2009 6:22 am
I'm getting the following error. Can youplease help me to resolve this
dtmf input: 1
Found grammar match
hypothesis #0: {choice: 1} {appointmentId: 121} {subject: Surgery} {location: New Delhi} {organizationName: Apollo} {organizationPhone: 123-456-7890} {organizationAddress: delhi} (0.9990)
missing name after . operator line 1
SyntaxError: missing name after . operator line 1
received event: error.semantic.ecmascript:
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
A serious error of type </speak>
---------
<?xml version='1.0'?><speak>error.semantic.ecmascript</speak>
---------
Here is the vxml
-----------------------------------
<vxml version="2.0">
<form id="checkin_main_frm">
<property name="timeout" value="15s"/>
<grammar type="application/x-jsgf" mode="voice">
( repeat {choice=repeat;} )
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(
1 {choice=1;
appointmentId=121;
subject=Surgery;
location=New Delhi;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=delhi;} |
2 {choice=2;
appointmentId=141;
subject=Tooth Decay;
location=New York;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=london;} |
3 {choice=3;
appointmentId=332;
subject=leg pluster;
location=cambridge;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=cambridge;} | 4 {choice=4;} )
</grammar>
<initial>
<prompt>
What do you want to do?
Press 1 for check in to Surgery at New Delhi
Press 2 for check in to Tooth Decay at New York
Press 3 for check in to leg pluster at cambridge
Press 4 to repeat the menu.
Say repeat to go to main menu.
</prompt>
</initial>
<field name="choice"/>
<field name="appointmentId"/>
<field name="subject"/>
<field name="location"/>
<field name="organizationName"/>
<field name="organizationPhone"/>
<field name="organizationAddress"/>
<filled>
<if cond="choice=='4'">
<goto next="#menurepromt"/>
<elseif cond="choice=='repeat'" />
<submit next="/ivr/welcome.action"/>
<else/>
<goto next="#checkIn"/>
</if>
</filled>
<noinput>
Please make a selection.
<reprompt/>
</noinput>
<nomatch>
Sorry, I didn't understand.
Please make a correct selection.
<clear namelist="appointmentId subject location organizationName organizationPhone organizationAddress"/>
<reprompt/>
</nomatch>
</form>
<form id="checkIn">
<property name="timeout" value="7s"/>
<field name="confirm">
<grammar type="application/x-jsgf" mode="dtmf">
( 1 | "#" )+
</grammar>
<prompt bargein="true">
You selected to check in into appointment with
id <value expr="appointmentId"/>
subject <value expr="subject"/>
location <value expr="location"/>
organization name is <value expr="organizationName"/>
phone number is <value expr="organizationPhone"/>
address is <value expr="organizationAddress"/>
Press one to confirm.
Press pound key to cancel and go back to previous menu.
</prompt>
</field>
<filled>
<if cond="confirm==1">
<submit namelist="appointmentId" next="/ivr/confirmCheckin.action"/>
<elseif cond="confirm=='#'" />
<goto next="#checkin_main_frm"/>
</if>
</filled>
<noinput>
<reprompt/>
</noinput>
<nomatch>
Sorry, I didn't understand.
Please make a correct selection.
<reprompt/>
</nomatch>
</form>
<form id="menurepromt">
<block>
<clear namelist="confirm"/>
<reprompt/>
</block>
</form>
</vxml>
dtmf input: 1
Found grammar match
hypothesis #0: {choice: 1} {appointmentId: 121} {subject: Surgery} {location: New Delhi} {organizationName: Apollo} {organizationPhone: 123-456-7890} {organizationAddress: delhi} (0.9990)
missing name after . operator line 1
SyntaxError: missing name after . operator line 1
received event: error.semantic.ecmascript:
bargein set to true
INPUTMODES set to "DTMF VOICE"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
A serious error of type </speak>
---------
<?xml version='1.0'?><speak>error.semantic.ecmascript</speak>
---------
Here is the vxml
-----------------------------------
<vxml version="2.0">
<form id="checkin_main_frm">
<property name="timeout" value="15s"/>
<grammar type="application/x-jsgf" mode="voice">
( repeat {choice=repeat;} )
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(
1 {choice=1;
appointmentId=121;
subject=Surgery;
location=New Delhi;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=delhi;} |
2 {choice=2;
appointmentId=141;
subject=Tooth Decay;
location=New York;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=london;} |
3 {choice=3;
appointmentId=332;
subject=leg pluster;
location=cambridge;
organizationName=Apollo;
organizationPhone=123-456-7890;
organizationAddress=cambridge;} | 4 {choice=4;} )
</grammar>
<initial>
<prompt>
What do you want to do?
Press 1 for check in to Surgery at New Delhi
Press 2 for check in to Tooth Decay at New York
Press 3 for check in to leg pluster at cambridge
Press 4 to repeat the menu.
Say repeat to go to main menu.
</prompt>
</initial>
<field name="choice"/>
<field name="appointmentId"/>
<field name="subject"/>
<field name="location"/>
<field name="organizationName"/>
<field name="organizationPhone"/>
<field name="organizationAddress"/>
<filled>
<if cond="choice=='4'">
<goto next="#menurepromt"/>
<elseif cond="choice=='repeat'" />
<submit next="/ivr/welcome.action"/>
<else/>
<goto next="#checkIn"/>
</if>
</filled>
<noinput>
Please make a selection.
<reprompt/>
</noinput>
<nomatch>
Sorry, I didn't understand.
Please make a correct selection.
<clear namelist="appointmentId subject location organizationName organizationPhone organizationAddress"/>
<reprompt/>
</nomatch>
</form>
<form id="checkIn">
<property name="timeout" value="7s"/>
<field name="confirm">
<grammar type="application/x-jsgf" mode="dtmf">
( 1 | "#" )+
</grammar>
<prompt bargein="true">
You selected to check in into appointment with
id <value expr="appointmentId"/>
subject <value expr="subject"/>
location <value expr="location"/>
organization name is <value expr="organizationName"/>
phone number is <value expr="organizationPhone"/>
address is <value expr="organizationAddress"/>
Press one to confirm.
Press pound key to cancel and go back to previous menu.
</prompt>
</field>
<filled>
<if cond="confirm==1">
<submit namelist="appointmentId" next="/ivr/confirmCheckin.action"/>
<elseif cond="confirm=='#'" />
<goto next="#checkin_main_frm"/>
</if>
</filled>
<noinput>
<reprompt/>
</noinput>
<nomatch>
Sorry, I didn't understand.
Please make a correct selection.
<reprompt/>
</nomatch>
</form>
<form id="menurepromt">
<block>
<clear namelist="confirm"/>
<reprompt/>
</block>
</form>
</vxml>