We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

<menu> and <catch> elements

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

<menu> and <catch> elements

Post by averlan »

Hi,

We are having an issue with combining <menu> and <catch> elements, please check the error and code sample below. We are currently using this code with another provider without having any issues. Please let us know what will be the possible solution.

ERROR:
DocumentParser::FetchDocument - Parse error in file "authentication.aspx?Mode=ConfirmLogin", line 23, column 16 - Element 'catch' is not valid for content model: '(#PCDATA|grammar)*'
errno: 205 uri authentication.aspx?Mode=ConfirmLogin

CODE SAMPLE:
<menu id="ConfirmInput">
<prompt>
<AutoScribe:AutoScribeTTS maxage="0" MessageType="<%=MessageTypes.GenericYouHaveEntered%>" id="AutoScribeTTS7" runat="server"></AutoScribe:AutoScribeTTS>
<say-as interpret-as="number" format="digits"> <%=objUtility.sayNumberasString(ConfirmValue)%>
</say-as>
<AutoScribe:AutoScribeTTS maxage="0" MessageType="<%=MessageTypes.GenericConfirm%>" id="AutoScribeTTS8" runat="server"></AutoScribe:AutoScribeTTS>
</prompt>
<choice event="correctValue" dtmf="1" />

<catch event="correctValue"> <submit namelist="fldSession <%=ConfirmValueKey%>"
next="<%=NextPage%>" fetchaudio="audio/hold_music.wav"/>
</catch>
<choice event="incorrectValue" dtmf="2" />
<catch event="incorrectValue"> <goto next="<%=PreviousPage%>" />
</catch>

</menu>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

We are PHP shop here, ie. we do not support ASP.NET. Could you post the VXML generated with this code?

We tried running a version with the ASP.NET code stripped out/replaced, and it ran without issues here:

Code: Select all

<menu id="ConfirmInput">
  <prompt>
    <say-as interpret-as="number" format="digits"> 123 </say-as>
  </prompt>
  
  <choice event="correctValue" dtmf="1" />
  <catch event="correctValue"> 
    <submit namelist="fldSession" next="next.vxml" fetchaudio="audio/hold_music.wav"/>
  </catch>
  
  <choice event="incorrectValue" dtmf="2" />
  <catch event="incorrectValue">
    <goto next="next.vxml" />
  </catch>
</menu>
As for the error you are receiving, it's saying that you have a <catch> tag within an improper tag, but based on the code you posted, you are using the <catch> tag in a valid way. Please make sure that this is the code where the error was thrown from.

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Hello,

Thanks for your response. Please see below the VXML and the error from Plum Dev Validator (https://www.screencast.com/t/08y7fyn8)

Validate URL: http://63.88.109.202/DebugIVRSessionsLo ... 2797/4.xml

This document is not valid VoiceXML!
Element catch is not declared in choice list of possible children in Entity, line: 24

<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
<vxml application="VoiceXMLGlobal.aspx" version="2.0" xml:lang="en-US">
<property value ="Julie" name ="TTSENGINE" />

<menu id="ConfirmInput">
<prompt>
<audio maxage="0" src = "audio\F_E_GenericYouHaveEntered.wav">
<sentence>You have entered</sentence>
</audio>
<say-as interpret-as="number" format="digits"> 7, 7
</say-as>
<audio maxage="0" src = "audio\F_E_GenericConfirm.wav">
<sentence>If this is correct, please press 1. If this is not correct, please press 2</sentence>
</audio>
</prompt>
<choice event="correctValue" dtmf="1">

<catch event="correctValue"> <submit namelist="fldSession fldUserID"
next="authentication.aspx?validate=Login" fetchaudio="audio/hold_music.wav"/>
</catch>
</choice>
<choice event="incorrectValue" dtmf="2">
<catch event="incorrectValue"> <goto next="" />
</catch>
</choice>
</menu>
</vxml>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

The <catch> tag must be inside the <menu> tag. Your latest code example has it inside the <choice> tag. Make sure to close your <choice> tag before starting the <catch> tag.

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Thanks. Got fixed the issue. However, please check below the error I'm getting now...

DocumentParser::FetchDocument - Parse error in file "authentication.aspx?Mode=ConfirmLogin", line 24, column 54 - <goto> tag: exactly one of next, expr, nextitem or expritem must be specified
errno: 205 uri authentication.aspx?Mode=ConfirmLogin

I've noticed that 'goto next' (a string variable that we generate from the code behind) is empty when plum voice is used. Please review below the VXML generated samples:


vxml when Plum Voice was used:
<menu id="ConfirmInput">
<prompt>
<audio maxage="0" src = "audio\F_E_GenericYouHaveEntered.wav">
<sentence>You have entered</sentence>
</audio>
<say-as interpret-as="number" format="digits"> 7, 7
</say-as>
<audio maxage="0" src = "audio\F_E_GenericConfirm.wav">
<sentence>If this is correct, please press 1. If this is not correct, please press 2</sentence>
</audio>
</prompt>
<choice event="correctValue" dtmf="1" />
<catch event="correctValue"> <submit namelist="fldSession fldUserID" next="authentication.aspx?validate=Login" fetchaudio="audio/hold_music.wav"/>
</catch>
<choice event="incorrectValue" dtmf="2" />
<catch event="incorrectValue"> <goto next="" />
</catch>

</menu>

vxml when Voxeo was used:

<menu id="ConfirmInput">
<prompt>
<audio maxage="0" src = "audio\F_E_GenericYouHaveEntered.wav">
<sentence>You have entered</sentence>
</audio>
<say-as interpret-as="number" format="digits"> 7, 7
</say-as>
<audio maxage="0" src = "audio\F_E_GenericConfirm.wav">
<sentence>If this is correct, please press 1. If this is not correct, please press 2</sentence>
</audio>
</prompt>
<choice event="correctValue" dtmf="1" />
<catch event="correctValue"> <submit namelist="fldSession fldUserID" next="authentication.aspx?validate=Login" fetchaudio="audio/hold_music.wav"/>
</catch>
<choice event="incorrectValue" dtmf="2" />
<catch event="incorrectValue"> <goto next="/CollectAccountLogin.aspx" />
</catch>

</menu>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

That error is being thrown because the <goto> next attribute is not defined. We recommend looking into why it is not defined.

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Can you please elaborate your suggestion? Do you have any specific recommendation where to look for the reason why the <goto> next attribute is not defined? As I mentioned in my previous post it works fine with Voxeo. Thanks!

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

If you are using ASP.NET code to generate the VXML, please review the specific snippet of code that generates the <goto> next attribute. Particularly if there is any difference between the code and/or test data you are using with Voxeo vs. with Plum. While we do not use ASP.NET code here, please feel free to post the specific code that is generating this portion of your VXML and we can take a look.

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

We use the same code that we have in our production to test with Plum. Can't think of any difference in the code and/or test data we are using with Voxeo vs. with Plum. Thanks

Please see below:

protected string PreviousPage;
PreviousPage = Request.UrlReferrer.LocalPath;

--aspx page

<menu id="ConfirmInput">
<prompt>
<AutoScribe:AutoScribeTTS maxage="0" MessageType="<%=MessageTypes.GenericYouHaveEntered%>" id="AutoScribeTTS7" runat="server"></AutoScribe:AutoScribeTTS>
<say-as interpret-as="number" format="digits"> <%=objUtility.sayNumberasString(ConfirmValue)%>
</say-as>
<AutoScribe:AutoScribeTTS maxage="0" MessageType="<%=MessageTypes.GenericConfirm%>" id="AutoScribeTTS8" runat="server"></AutoScribe:AutoScribeTTS>
</prompt>
<choice event="correctValue" dtmf="1" />

<catch event="correctValue"> <submit namelist="fldSession <%=ConfirmValueKey%>"
next="<%=NextPage%>" fetchaudio="audio/hold_music.wav"/>
</catch>
<choice event="incorrectValue" dtmf="2" />
<catch event="incorrectValue"> <goto next="<%=PreviousPage%>" />
</catch>
</menu>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

While we do not have any ASP.NET experience in house the issue appears to be with the following line:

Code: Select all

PreviousPage = Request.UrlReferrer.LocalPath;
Assuming that this is attempt to pull the HTTP "Referer" header that is likely the source of the problem. There is no standard for setting an HTTP Referer header in VoiceXML and our platform does not ever send that header value. This is likely why your code is generating a blank value for the next attribute in your <goto> tag:

Code: Select all

<goto next="<%=PreviousPage%>" />
You will need to update your code and find another means for injecting the %PreviousPage% that is not based on the Referer. You could pass in a GET or POST parameter from the previous page that provides the same value as the Referer value.

Regards,
Plum Support

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Hello again,

Thanks for your response. I'm not sure what do you mean by " There is no standard for setting an HTTP Referer header in VoiceXML and our platform does not ever send that header value"? I thought you just have to read the Referer HTTP header value from the request? Please check below that we assign the value in the header.

AllKeys: {string[10]}
Count: 10
IsReadOnly: true
Keys: {System.Collections.Specialized.NameObjectCollectionBase.KeysCollection}
Results View: Expanding the Results View will enumerate the IEnumerable
?Request.Headers.GetValues(1)
{string[1]}
[0]: "Keep-Alive"
?Request.Headers.GetValues("Referer")
{string[1]}
[0]: "http://Autoscribe.PayIVR/CollectAccount ... 34e75c12ad"
?Request.Headers.GetValues("Referer")
{string[1]}
[0]: "http://Autoscribe.PayIVR/CollectAccount ... aae38b3e65"

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

Hello,

HTTP Referer headers are specifically set by the client when making requests to the server. In this case the client is our VoiceXML browser and the server is your web server. Within the VoiceXML specification (https://www.w3.org/TR/voicexml20/) there is no requirement for VoiceXML browsers to send a Referer header in any request. Our platform does not send a Referer header when making web requests to your web server. There are straight forward ways to accomplish the same result without using a Referer header (cookies, sessions, GET / POST variables). If you have a specific use case that you would like help coding around please let us know and we would be happy to help.

Regards,
Plum Support

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Hi,

Thanks for your response. We don't need any help to make this change. However, we were trying to avoid any code changes since our IVR application performs well with Voxeo as it is.

We are getting another issue please check below. Let me know if you want me to open a separate ticket for it.

Validate URL: http://63.88.109.202/DebugIVRSessionsLo ... 4889/5.xml

This document is not valid VoiceXML!
Value "POST" for attribute method of submit is not among the enumerated set in Entity, line: 20


<?xml version="1.0" ?>
<!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
<vxml application="VoiceXMLGlobal.aspx" version="2.0" xml:lang="en-US">
<property value ="Julie" name ="TTSENGINE" />

<form id="CollectAccountPassword">
<field type="digits" name="fldPassword">
<prompt>
<audio maxage="0" src = "audio\MMF\MMF_2ndtoken_EN.wav">
<sentence>Please enter your password.</sentence>
</audio>
</prompt>
<filled>


<if cond="(fldPassword.length >=2 && fldPassword.length <=4) || fldPassword.length == 1">

<assign name="application.fldPassword" expr="fldPassword" />

<submit namelist="fldPassword fldUserID fldSession" next="authentication.aspx?mode=ConfirmPassword" method="POST" fetchaudio="audio/hold_music.wav"/>

<else />
<throw event="invalidinput" />
</if>
</filled>
</field>

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: <menu> and <catch> elements

Post by support »

Hello,

The issue is that the VoiceXML standard specifically only supports "get" or "post" as the acceptable strings for the method attribute and it is evaluated in a case sensitive manner. Our platform has a strict adherence to the standard on this rule and so "POST" is not a supported method. If you make it lower case it should work without issue.

Regards,
Plum Support

averlan
Posts: 30
Joined: Thu Sep 21, 2017 8:24 pm

Re: <menu> and <catch> elements

Post by averlan »

Thanks. Changed and It worked without issue.

Please check another error below.

Validate URL: http://63.88.109.202/DebugIVRSessionsLo ... 6778/8.xml

This document is valid VoiceXML

ERROR in the log:

DocumentParser::FetchDocument - Parse error in file "authentication.aspx?validate=Password", line 9, column 16 - <audio> tag: One of the following attributes must be specified: src, expr or stream
errno: 205 uri authentication.aspx?validate=Password
received event: error.badfetch:
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>
A serious error of type </speak>
---------
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak>error.badfetch</speak>
---------
bargein set to true
INPUTMODES set to "DTMF"
Audio segment added to prompt queue from TTS application/synthesis+ssml for:
---------
<?xml version='1.0'?><speak> has occurred. Exiting. </speak>
---------

Post Reply