I have a Plum Developer Account.
My voice application "Callcenter", which is hosted under this account was working O.K, but suddenly it stopped working. When I checked the call log, I found that it had given following error:
errno: 999 message logic error GrammarManager::GetEnclosedTexterrno: 209 message Fatal exception
Could anyone kindly tell me what this message logic error means and what could be the source of this error?
We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Message Logic Error
Re: Message Logic Error
Hi mfibb,
Could you please provide us with the snippet of code that is producing this grammar error? This will allow us to troubleshoot on why you are getting that error.
If your code contains any sensitive information, you can private message it to us.
Regards,
Plum Support
Could you please provide us with the snippet of code that is producing this grammar error? This will allow us to troubleshoot on why you are getting that error.
If your code contains any sensitive information, you can private message it to us.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: Message Logic Error
Hi,
Thanks for sending over your code. However, is there a specific section in all of that code that is encountering this grammar error? Your code had made mention of inline grammars and external grammars (http://www.xxxxxxxxxxxxxxxx.com/voice/yesno.jsgf).
Could you please let us know which specific section in your code is experiencing this error?
Regards,
Plum Support
Thanks for sending over your code. However, is there a specific section in all of that code that is encountering this grammar error? Your code had made mention of inline grammars and external grammars (http://www.xxxxxxxxxxxxxxxx.com/voice/yesno.jsgf).
Could you please let us know which specific section in your code is experiencing this error?
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: Message Logic Error
Hello,
I have isolated the module which is causing error by removing all the modules and then adding one by one.
All remote grammars and modules except <form id="test3"> are working fine.
Module <form id="test3"> has 2 grammars,
Remote grammar <grammar src="http://www.xxxx.com/voice/yesno.jsgf"/> is used in other modules as well, it is working fine there.
and
2 inline grammars
<choice next="#yep">
<grammar version="1.0" mode="voice">[yes]</grammar>
</choice>
<choice next="#bye">
<grammar version="1.0" mode="voice">[no]</grammar>
</choice>
I suspect that one of these is the root cause of error.
Here is the call log for erroronous call:
=================================
Fri 27 May 2011 07:48:20 AM EDT:
Call Start Event: ANII 7500112247 DNIS 02070810766 VURL http://uk.popproxy.plumgroup.com/plumvp ... callcenter
DocumentParser::FetchDocument()
DocumentParser::FetchDocument(http://uk.popproxy.plumgroup.com/plumvp ... callcenter)
Cache Miss: http://uk.popproxy.plumgroup.com/plumvp ... callcenter
Attempting to fetch http://uk.popproxy.plumgroup.com/plumvp ... callcenter
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="voice">
0
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
0
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[one]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>1</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[two]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>2</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[three]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>3</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[four]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>4</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[five]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>5</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[one]
</grammar>
---------
Fri 27 May 2011 07:48:21 AM EDT:
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>1</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[two]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>2</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[three]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>3</item>
</rule>
</grammar>
---------
Cache Miss: http://www.xxxxx.com/voice/tdirg.jsgf
Attempting to fetch http://www.xxxxx.com/voice/tdirg.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxxx.com/voice/tdirg.jsgf
Cache Miss: http://www.sxxxxx.com/voice/tdirg.jsgf
Attempting to fetch http://www.xxxxx.com/voice/tdirg.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxx.com/voice/tdirg.jsgf
Cache Miss: http://www.softwarexxxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Fri 27 May 2011 07:48:22 AM EDT:
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarecxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxxxk.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Fri 27 May 2011 07:48:23 AM EDT:
Finished loading remote grammar from http://www.softwarexxxk.com/voice/yesno.jsgf
Cache Miss: http://www.softwarecxxxxk.com/voice/digram.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/digram.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxxxxx.com/voice/digram.jsgf
Cache Miss: http://www.xxxxxx.com/voice/digram.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/digram.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/digram.jsgf
Cache Miss: http://www.softwarexxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Fri 27 May 2011 07:48:24 AM EDT:
Finished loading remote grammar from http://www.softwarexxxx.com/voice/yesno.jsgf
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[yes]
</grammar>
---------
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
Fri 27 May 2011 07:48:25 AM EDT:
Call End Event
Ending session
Ending Session On Channel 7
=================================
It seems that loading of
<grammar version="1.0" mode="voice">[yes]</grammar>
or
<grammar version="1.0" mode="voice">[no]</grammar>
resulted in
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
Why?
I have isolated the module which is causing error by removing all the modules and then adding one by one.
All remote grammars and modules except <form id="test3"> are working fine.
Module <form id="test3"> has 2 grammars,
Remote grammar <grammar src="http://www.xxxx.com/voice/yesno.jsgf"/> is used in other modules as well, it is working fine there.
and
2 inline grammars
<choice next="#yep">
<grammar version="1.0" mode="voice">[yes]</grammar>
</choice>
<choice next="#bye">
<grammar version="1.0" mode="voice">[no]</grammar>
</choice>
I suspect that one of these is the root cause of error.
Here is the call log for erroronous call:
=================================
Fri 27 May 2011 07:48:20 AM EDT:
Call Start Event: ANII 7500112247 DNIS 02070810766 VURL http://uk.popproxy.plumgroup.com/plumvp ... callcenter
DocumentParser::FetchDocument()
DocumentParser::FetchDocument(http://uk.popproxy.plumgroup.com/plumvp ... callcenter)
Cache Miss: http://uk.popproxy.plumgroup.com/plumvp ... callcenter
Attempting to fetch http://uk.popproxy.plumgroup.com/plumvp ... callcenter
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="voice">
0
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" mode="dtmf">
0
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[one]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>1</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[two]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>2</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[three]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>3</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[four]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>4</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[five]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>5</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[one]
</grammar>
---------
Fri 27 May 2011 07:48:21 AM EDT:
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>1</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[two]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>2</item>
</rule>
</grammar>
---------
GrammarManager::CreateGrammarFromString():
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[three]
</grammar>
---------
GrammarManager::CreateGrammarFromString(application/srgs+xml):
---------
<?xml version='1.0'?>
<grammar xml:lang="en-us" type="application/srgs+xml" root="CHOICE" mode="dtmf">
<rule id="CHOICE">
<item>3</item>
</rule>
</grammar>
---------
Cache Miss: http://www.xxxxx.com/voice/tdirg.jsgf
Attempting to fetch http://www.xxxxx.com/voice/tdirg.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxxx.com/voice/tdirg.jsgf
Cache Miss: http://www.sxxxxx.com/voice/tdirg.jsgf
Attempting to fetch http://www.xxxxx.com/voice/tdirg.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxx.com/voice/tdirg.jsgf
Cache Miss: http://www.softwarexxxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Fri 27 May 2011 07:48:22 AM EDT:
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarecxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxxxk.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Fri 27 May 2011 07:48:23 AM EDT:
Finished loading remote grammar from http://www.softwarexxxk.com/voice/yesno.jsgf
Cache Miss: http://www.softwarecxxxxk.com/voice/digram.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/digram.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.xxxxxxx.com/voice/digram.jsgf
Cache Miss: http://www.xxxxxx.com/voice/digram.jsgf
Attempting to fetch http://www.softwarexxxxx.com/voice/digram.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/digram.jsgf
Cache Miss: http://www.softwarexxxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Finished loading remote grammar from http://www.softwarexxxxx.com/voice/yesno.jsgf
Cache Miss: http://www.softwarexxxx.com/voice/yesno.jsgf
Attempting to fetch http://www.softwarexxxx.com/voice/yesno.jsgf
Unsupported grammar mime-type 'text/plain' defaulting to 'application/x-jsgf'
Fri 27 May 2011 07:48:24 AM EDT:
Finished loading remote grammar from http://www.softwarexxxx.com/voice/yesno.jsgf
GrammarManager::CreateGrammarFromString(application/x-jsgf):
---------
<?xml version='1.0'?>
<grammar version="1.0" xml:lang="en-us" mode="voice">
[yes]
</grammar>
---------
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
Fri 27 May 2011 07:48:25 AM EDT:
Call End Event
Ending session
Ending Session On Channel 7
=================================
It seems that loading of
<grammar version="1.0" mode="voice">[yes]</grammar>
or
<grammar version="1.0" mode="voice">[no]</grammar>
resulted in
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
Why?
Re: Message Logic Error
Hi mfibb,
We've looked into this issue and the reason you are receiving the error:
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
is because of the following line within your <menu> tags:
<choice next="#yep"><grammar version="1.0" mode="voice">[no]</grammar></choice>
We've tested this using the following test code:
To correct this issue, you should change the block of code above to the following:
Hope this helps.
Regards,
Plum Support
We've looked into this issue and the reason you are receiving the error:
errno: 999 message logic error GrammarManager::GetEnclosedText
errno: 209 message Fatal exception
is because of the following line within your <menu> tags:
<choice next="#yep"><grammar version="1.0" mode="voice">[no]</grammar></choice>
We've tested this using the following test code:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<menu id="login">
<choice next="#nope"><grammar version="1.0" mode="voice">[no]</grammar></choice>
<prompt>
Please say no.
</prompt>
</menu>
<form id="nope">
<block>
<prompt>
You said no.
</prompt>
</block>
</form>
</vxml>
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form>
<field name="grammartest">
<grammar version="1.0" mode="voice">[no]</grammar>
<prompt>
Please say no.
</prompt>
<filled>
<prompt>
You said <value expr="grammartest"/>.
</prompt>
<goto next="#nextform"/>
</filled>
</field>
</form>
</vxml>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Re: Message Logic Error
Hello,
Thanks for your reply.
Unfortunately it did not solve my problem i.e using element <choice> as recommended in http://www.w3.org/TR/voicexml20/#dml2.2.2
======================================
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd">
<menu>
<choice next="http://www.sports.example.com/vxml/start.vxml">
<grammar src="sports.grxml" type="application/srgs+xml"/>
Sports
</choice>
<choice next="http://www.weather.example.com/intro.vxml">
<grammar src="weather.grxml" type="application/srgs+xml"/>
Weather
</choice>
<choice next="http://www.stargazer.example.com/voice/astronews.vxml">
<grammar src="astronews.grxml" type="application/srgs+xml"/>
Stargazer astrophysics
</choice>
</menu>
</vxml>
====================
I tried following module:
<?xml version="1.0"?>
<vxml version="2.0">
<form id="welcome">
<block>
<prompt>
Welcome to the Grammar test.
</prompt>
<goto next="#choicemenu" />
</block>
</form>
<menu id="choicemenu">
<choice next="#yep">
<grammar src="http://www.xxxxuk.com/voice/yesno.jsgf" type="application/x-jsgf"/>
yes
</choice>
<choice next="#nope">
<grammar src="http://www.xxxxuk.com/voice/yesno.jsgf" type="application/x-jsgf"/>
no
</choice>
<prompt>
Please say yes or no.
</prompt>
</menu>
<form id="yep">
<block>
<prompt>
You said yes.
<break />
Good Bye!
</prompt>
</block>
</form>
<form id="nope">
<block>
<prompt>
You said no.
<break />
Good Bye!
</prompt>
</block>
</form>
</vxml>
It gave the same Message Logic Error
but when I chnged this module to:
<?xml version="1.0"?>
<vxml version="2.0">
<form id="welcome">
<block>
<prompt>
Welcome to the Grammar test.
</prompt>
<goto next="#choicemenu" />
</block>
</form>
<menu id="choicemenu">
<choice accept="exact" next="#yep">
yes
</choice>
<choice accept="exact" next="#nope">
no
</choice>
<prompt>
Please say yes or no.
</prompt>
</menu>
<form id="yep">
<block>
<prompt>
You said yes.
<break />
Good Bye!
</prompt>
</block>
</form>
<form id="nope">
<block>
<prompt>
You said no.
<break />
Good Bye!
</prompt>
</block>
</form>
</vxml>
It started working fine.
I am sure that both of these modules follow the http://www.w3.org/TR/voicexml20 recommendations, but unfortunately only one of them is working.....Why?
Is it a voicexml 2.0 error or is it an implementation problem on your platform?
Thanks for your reply.
Unfortunately it did not solve my problem i.e using element <choice> as recommended in http://www.w3.org/TR/voicexml20/#dml2.2.2
======================================
<?xml version="1.0" encoding="UTF-8"?>
<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2001/vxml
http://www.w3.org/TR/voicexml20/vxml.xsd">
<menu>
<choice next="http://www.sports.example.com/vxml/start.vxml">
<grammar src="sports.grxml" type="application/srgs+xml"/>
Sports
</choice>
<choice next="http://www.weather.example.com/intro.vxml">
<grammar src="weather.grxml" type="application/srgs+xml"/>
Weather
</choice>
<choice next="http://www.stargazer.example.com/voice/astronews.vxml">
<grammar src="astronews.grxml" type="application/srgs+xml"/>
Stargazer astrophysics
</choice>
</menu>
</vxml>
====================
I tried following module:
<?xml version="1.0"?>
<vxml version="2.0">
<form id="welcome">
<block>
<prompt>
Welcome to the Grammar test.
</prompt>
<goto next="#choicemenu" />
</block>
</form>
<menu id="choicemenu">
<choice next="#yep">
<grammar src="http://www.xxxxuk.com/voice/yesno.jsgf" type="application/x-jsgf"/>
yes
</choice>
<choice next="#nope">
<grammar src="http://www.xxxxuk.com/voice/yesno.jsgf" type="application/x-jsgf"/>
no
</choice>
<prompt>
Please say yes or no.
</prompt>
</menu>
<form id="yep">
<block>
<prompt>
You said yes.
<break />
Good Bye!
</prompt>
</block>
</form>
<form id="nope">
<block>
<prompt>
You said no.
<break />
Good Bye!
</prompt>
</block>
</form>
</vxml>
It gave the same Message Logic Error
but when I chnged this module to:
<?xml version="1.0"?>
<vxml version="2.0">
<form id="welcome">
<block>
<prompt>
Welcome to the Grammar test.
</prompt>
<goto next="#choicemenu" />
</block>
</form>
<menu id="choicemenu">
<choice accept="exact" next="#yep">
yes
</choice>
<choice accept="exact" next="#nope">
no
</choice>
<prompt>
Please say yes or no.
</prompt>
</menu>
<form id="yep">
<block>
<prompt>
You said yes.
<break />
Good Bye!
</prompt>
</block>
</form>
<form id="nope">
<block>
<prompt>
You said no.
<break />
Good Bye!
</prompt>
</block>
</form>
</vxml>
It started working fine.
I am sure that both of these modules follow the http://www.w3.org/TR/voicexml20 recommendations, but unfortunately only one of them is working.....Why?
Is it a voicexml 2.0 error or is it an implementation problem on your platform?
Re: Message Logic Error
Hi mfibb,
Thanks for your inquiry.
We have noted this bug to our engineering department to look into regarding that particular use of an external grammar (http://www.xxxxuk.com/voice/yesno.jsgf) within your <choice> tags.
Also, regarding your revised code in using the <choice> tag without the grammar, that is correct; however, regarding best code practices, we strongly recommend that you change your code to use a <field> and <if> conditionals based on the user's input.
For example:
From this example, when the user is prompted to say "yes" or "no", if the user says "yes", they would hear the prompt, "You said yes. Goodbye!"; if the user says "no", they would hear the prompt, "You said no. Goodbye!"
Please let us know if you need any further assistance with your code.
Regards,
Plum Support
Thanks for your inquiry.
We have noted this bug to our engineering department to look into regarding that particular use of an external grammar (http://www.xxxxuk.com/voice/yesno.jsgf) within your <choice> tags.
Also, regarding your revised code in using the <choice> tag without the grammar, that is correct; however, regarding best code practices, we strongly recommend that you change your code to use a <field> and <if> conditionals based on the user's input.
For example:
Code: Select all
<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
<form id="welcome">
<block>
<prompt>
Welcome to the Grammar test.
</prompt>
<goto next="#grammartest"/>
</block>
</form>
<form id="grammartest">
<field name="yesorno">
<grammar type="application/x-jsgf" mode="voice">
yes | no
</grammar>
<prompt>
Say yes or no.
</prompt>
<filled>
<if cond="yesorno=='yes'">
<prompt>
You said yes. Goodbye!
</prompt>
<else/>
<prompt>
You said no. Goodbye!
</prompt>
</if>
</filled>
</field>
</form>
Please let us know if you need any further assistance with your code.
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com