We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics
Element assign is not declared in field list of possible chi
Element assign is not declared in field list of possible chi
Element assign is not declared in field list of possible children in Entity, line: 56
I just can't figure out what the problem is, let alone how to fix it.
Can you help?
Thanks
<?xml version="1.0"?>
2 <!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
3 <vxml version="2.0" application="e01_Enrollment.vxml">
4 <!-- e06_Call_Frequency.vxml -->
5 <meta name="author" content="Nobo Kim, et al."/>
6
7
8
9 <property name="caching" value="safe"/>
10 <property name="interdigittimeout" value="3s"/>
11 <property name="sensitivity" value="0.3"/>
12
13 <!-- /////////////////////// GET CALL FREQUENCY /////////////////////// -->
14
15 <form id="EnterfrequencyGreeting">
16 <block >Now, how often would you like me to call you?
17 <goto next="#Enterfrequency"/></block>
18 </form>
19
20 <form id="Enterfrequency">
21 <field name="call_frequency">
22
23
24
25
26
27
28
29 <grammar type="text/gsl">
30 <![CDATA[[
31 [daily day dtmf-1] { <call_frequency "daily"> }
32 [weekly week dtmf-2] { <call_frequency "weekly"> }
33 [monthly month dtmf-3] { <call_frequency "monthly"> }
34 ]]]>
35 </grammar>
36
37 <prompt bargein="false" timeout="3s">
38 Every day? - Press 1, or say "daily".
39 Once a week? - Press 2, or say "weekly".
40 <!-- Every other week? - Press 2, or say "every other week". -->
41 Once a month? - Press 3, or say "monthly".
42 </prompt>
43
44 <catch event="nomatch noinput">
45 <reprompt />
46 </catch>
47
48 <assign name="call_frequency" expr="true"/>
49 <goto next="#VerifyCallFrequency"/>
50
51
52 <prompt>
53 Okay, so you want to be called <value expr="call_frequency"/>
54 </prompt>
55
56 </field>
57 </form>
58
59 <menu id="VerifyCallFrequency">
60 <prompt bargein="false" timeout="2s">
61 If that's correct, press 1.
62 If that's wrong, press 2.
63 </prompt>
64 <choice dtmf="1" next="#Day_To_Call"/>
65 <choice dtmf="2" next="#Enterfrequency"/>
66
67 </menu>
68
69 <catch event="noinput">
70 Sorry, I did not hear anything.
71 <reprompt />
72 </catch>
73
74
75
76 <!-- /////////////////////////// SUBMIT ALL DATA ///////////////////////// -->
77
78 <form id="SubmitPatientDATA">
79 <block>
80 <prompt>
81 Please wait while I memorize your information.
82 </prompt>
83 <submit method="post" namelist="call_frequency " next="AddToDB/enter_VXML_data.php"/>
84 </block>
85 </form>
86 </vxml>
I just can't figure out what the problem is, let alone how to fix it.
Can you help?
Thanks
<?xml version="1.0"?>
2 <!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
3 <vxml version="2.0" application="e01_Enrollment.vxml">
4 <!-- e06_Call_Frequency.vxml -->
5 <meta name="author" content="Nobo Kim, et al."/>
6
7
8
9 <property name="caching" value="safe"/>
10 <property name="interdigittimeout" value="3s"/>
11 <property name="sensitivity" value="0.3"/>
12
13 <!-- /////////////////////// GET CALL FREQUENCY /////////////////////// -->
14
15 <form id="EnterfrequencyGreeting">
16 <block >Now, how often would you like me to call you?
17 <goto next="#Enterfrequency"/></block>
18 </form>
19
20 <form id="Enterfrequency">
21 <field name="call_frequency">
22
23
24
25
26
27
28
29 <grammar type="text/gsl">
30 <![CDATA[[
31 [daily day dtmf-1] { <call_frequency "daily"> }
32 [weekly week dtmf-2] { <call_frequency "weekly"> }
33 [monthly month dtmf-3] { <call_frequency "monthly"> }
34 ]]]>
35 </grammar>
36
37 <prompt bargein="false" timeout="3s">
38 Every day? - Press 1, or say "daily".
39 Once a week? - Press 2, or say "weekly".
40 <!-- Every other week? - Press 2, or say "every other week". -->
41 Once a month? - Press 3, or say "monthly".
42 </prompt>
43
44 <catch event="nomatch noinput">
45 <reprompt />
46 </catch>
47
48 <assign name="call_frequency" expr="true"/>
49 <goto next="#VerifyCallFrequency"/>
50
51
52 <prompt>
53 Okay, so you want to be called <value expr="call_frequency"/>
54 </prompt>
55
56 </field>
57 </form>
58
59 <menu id="VerifyCallFrequency">
60 <prompt bargein="false" timeout="2s">
61 If that's correct, press 1.
62 If that's wrong, press 2.
63 </prompt>
64 <choice dtmf="1" next="#Day_To_Call"/>
65 <choice dtmf="2" next="#Enterfrequency"/>
66
67 </menu>
68
69 <catch event="noinput">
70 Sorry, I did not hear anything.
71 <reprompt />
72 </catch>
73
74
75
76 <!-- /////////////////////////// SUBMIT ALL DATA ///////////////////////// -->
77
78 <form id="SubmitPatientDATA">
79 <block>
80 <prompt>
81 Please wait while I memorize your information.
82 </prompt>
83 <submit method="post" namelist="call_frequency " next="AddToDB/enter_VXML_data.php"/>
84 </block>
85 </form>
86 </vxml>
Thanks,
Chris
Chris
IVR code fix for element assign is not declared error
Hi Chris,
The reason why you are getting this specific IVR error is because <assign> is not a child tag of <field>. The <field> tag can only have the following as IVR children tags:
<audio>, <catch>, <enumerate>, <error>, <filled>, <grammar>, <help>, <link>, <noinput>, <nomatch>, <option>, <prompt>, <property>, <value>
And <assign> can only have the following as IVR parent tags:
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
Also, looking through your IVR code, we noticed this:
However, we do not support gsl grammars. We only support JSGF and ABNF(SRGS) grammars, which are documented in the VoiceXML Specification:
http://www.w3.org/TR/speech-grammar/
So, you should replace your gsl grammar with this:
So, overall, you'd want to adjust your IVR code to this:
Regards,
Plum Support
The reason why you are getting this specific IVR error is because <assign> is not a child tag of <field>. The <field> tag can only have the following as IVR children tags:
<audio>, <catch>, <enumerate>, <error>, <filled>, <grammar>, <help>, <link>, <noinput>, <nomatch>, <option>, <prompt>, <property>, <value>
And <assign> can only have the following as IVR parent tags:
<block>, <catch>, <error>, <filled>, <foreach>, <help>, <if>, <noinput>, <nomatch>
Also, looking through your IVR code, we noticed this:
Code: Select all
<grammar type="text/gsl">
<![CDATA[[
[daily day dtmf-1] { <call_frequency "daily"> }
[weekly week dtmf-2] { <call_frequency "weekly"> }
[monthly month dtmf-3] { <call_frequency "monthly"> }
]]]>
</grammar>
http://www.w3.org/TR/speech-grammar/
So, you should replace your gsl grammar with this:
Code: Select all
<grammar type="application/x-jsgf" mode="voice">
([Daily | Day] {Daily}
[Weekly | Week] {Weekly}
[Monthly | Month] {Monthly})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Daily} | 2 {Weekly} | 3 {Monthly})
</grammar>
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
<vxml version="2.0" application="e01_Enrollment.vxml">
<!-- e06_Call_Frequency.vxml -->
<meta name="author" content="Nobo Kim, et al."/>
<property name="caching" value="safe"/>
<property name="interdigittimeout" value="3s"/>
<property name="sensitivity" value="0.3"/>
<!-- /////////////////////// GET CALL FREQUENCY /////////////////////// -->
<form id="EnterfrequencyGreeting">
<block >Now, how often would you like me to call you?
<goto next="#Enterfrequency"/></block>
</form>
<form id="Enterfrequency">
<field name="call_frequency">
<grammar type="application/x-jsgf" mode="voice">
(Daily | Day {Daily}
Weekly | Week {Weekly}
Monthly | Month {Monthly})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Daily} | 2 {Weekly} | 3 {Monthly})
</grammar>
<!--grammar type="text/gsl">
<![CDATA[[
[daily day dtmf-1] { <call_frequency "daily"> }
[weekly week dtmf-2] { <call_frequency "weekly"> }
[monthly month dtmf-3] { <call_frequency "monthly"> }
]]]>
</grammar-->
<prompt bargein="false" timeout="3s">
Every day? - Press 1, or say "daily".
Once a week? - Press 2, or say "weekly".
<!-- Every other week? - Press 2, or say "every other week". -->
Once a month? - Press 3, or say "monthly".
</prompt>
<catch event="nomatch noinput">
<reprompt />
</catch>
<filled>
<prompt>
Okay, so you want to be called <value expr="call_frequency"/>
</prompt>
<!--assign name="call_frequency" expr="true"/-->
<goto next="#VerifyCallFrequency"/>
</filled>
</field>
</form>
<menu id="VerifyCallFrequency">
<prompt bargein="false" timeout="2s">
If that's correct, press 1.
If that's wrong, press 2.
</prompt>
<choice dtmf="1" next="#Day_To_Call"/>
<choice dtmf="2" next="#Enterfrequency"/>
</menu>
<catch event="noinput">
Sorry, I did not hear anything.
<reprompt />
</catch>
<!-- /////////////////////////// SUBMIT ALL DATA ///////////////////////// -->
<form id="SubmitPatientDATA">
<block>
<prompt>
Please wait while I memorize your information.
</prompt>
<submit method="post" namelist="call_frequency " next="AddToDB/enter_VXML_data.php"/>
</block>
</form>
</vxml>
Plum Support
Last edited by support on Thu Feb 18, 2010 4:12 pm, edited 4 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
<!--assign name="call_frequency" expr="tru
Thanks for fixing the code, and importantly for the lesson.
I noticed that after putting it within a <filled> parent, you deactivated assign name with the following:
<!--assign name="call_frequency" expr="true"/-->
Does that prevent me from sending it to my MySQL with the following:
<submit method="post" namelist="call_frequency " next="AddToDB/enter_VXML_data.php"/>
Or does (namelist="call_frequency') come from <field name="call_frequency"> ???
As you can tell, I'm a little confused here. Can you straignten me out? Thanks.
I noticed that after putting it within a <filled> parent, you deactivated assign name with the following:
<!--assign name="call_frequency" expr="true"/-->
Does that prevent me from sending it to my MySQL with the following:
<submit method="post" namelist="call_frequency " next="AddToDB/enter_VXML_data.php"/>
Or does (namelist="call_frequency') come from <field name="call_frequency"> ???
As you can tell, I'm a little confused here. Can you straignten me out? Thanks.
Thanks,
Chris
Chris
Clarification of IVR post for element assign is not declared
Hi Chris,
Yes, the assign seemed unnecessary since your field, "call_frequency", is already filled once the user gives an appropriate response (daily, weekly, or monthly). Also, this won't prevent you from sending data to your MySQL.
Just out of curiosity, why did you want to assign "call_frequency" with the value of "true"? Shouldn't it be filled with either "daily", "weekly", or "monthly"?
With the current IVR example from the last IVR post, if a user says "daily", then the field "call_frequency" gets filled with the value, "daily", and this would get submitted to enter_VXML_data.php.
Hope this clarifies things.
Regards,
Plum Support
Yes, the assign seemed unnecessary since your field, "call_frequency", is already filled once the user gives an appropriate response (daily, weekly, or monthly). Also, this won't prevent you from sending data to your MySQL.
Just out of curiosity, why did you want to assign "call_frequency" with the value of "true"? Shouldn't it be filled with either "daily", "weekly", or "monthly"?
With the current IVR example from the last IVR post, if a user says "daily", then the field "call_frequency" gets filled with the value, "daily", and this would get submitted to enter_VXML_data.php.
Hope this clarifies things.
Regards,
Plum Support
Last edited by support on Wed Feb 24, 2010 3:32 pm, edited 2 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
<field name="anything">
So basically if I'm using a <field name="anything">
I don't ever need to use<assign name="call_frequency" expr="true"/>
To answer your question, the reason I used (exp="true"/>) was because I thought (maybe erroniously) that the value had to contain something: daily - weekly - monthly.
In order to <goto next="#VerifyCallFrequency"/> True or False?
I don't ever need to use<assign name="call_frequency" expr="true"/>
To answer your question, the reason I used (exp="true"/>) was because I thought (maybe erroniously) that the value had to contain something: daily - weekly - monthly.
In order to <goto next="#VerifyCallFrequency"/> True or False?
Thanks,
Chris
Chris
IVR link for form interpretation algorithm
Yes, that's correct. You don't need to use <assign> since you're already using it as the field name.
For more information on this IVR topic, you can go here:
http://www.plumvoice.com/docs/dev/devel ... _algorithm
Regards,
Plum Support
For more information on this IVR topic, you can go here:
http://www.plumvoice.com/docs/dev/devel ... _algorithm
Regards,
Plum Support
Last edited by support on Mon Jan 11, 2010 3:54 pm, edited 3 times in total.
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com
Okay, I've got one for you. The fixes you wrote for "e06_Call_Frequency.vxml" above work very well. Thanks.
This is the change you made:
<form id="Enterfrequency">
<field name="call_frequency">
<grammar type="application/x-jsgf" mode="voice">
(Daily | Day {Daily}
Weekly | Week {Weekly}
Monthly | Month {Monthly})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Daily} | 2 {Weekly} | 3 {Monthly})
</grammar>
<prompt bargein="false" timeout="3s">
Every day? - Press 1, or say "daily".
Once a week? - Press 2, or say "weekly".
<!-- Every other week? - Press 2, or say "every other week". -->
Once a month? - Press 3, or say "monthly".
</prompt>
<catch event="nomatch noinput">
<reprompt />
</catch>
But when I make some minor changes to collect different data using the exact same method, it does not recognize the spoken word and either reprompts or gets it wrong.
Did I do something wrong?
<form id="Day_To_Call">
<field name="call_day">
<grammar type="application/x-jsgf" mode="voice">
(Sun | Sunday {Sunday}
Mon | Monday {Monday}
Tues | Tuesday {Tuesday}
Wens | Wednesday {Wednesday}
Thurs | Thursday {Thursday}
Fri | Friday {Friday}
Sat | Saturday {Saturday})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Sunday} | 2 {Monday} | 3 {Tuesday} | 4 {Wednesday} | 5 {Thursday} | 6 {Friday} | 7 {Saturday})
</grammar>
<prompt bargein="true" timeout="2s">
Just say the day you want to be called or use your keypad. For -
Sunday - Press 1, or say "Sunday".
Monday - Press 2, or say "Monday".
Tuesday - Press 3, or say "Tuesday".
Wednesday - Press 4, or say "Wednesday".
Thursday - Press 5, or say "Thursday".
Friday - Press 6, or say "Friday".
Saturday - Press 7, or say "Saturday".
</prompt>
<catch event="nomatch noinput">
<reprompt />
</catch>
This is the change you made:
<form id="Enterfrequency">
<field name="call_frequency">
<grammar type="application/x-jsgf" mode="voice">
(Daily | Day {Daily}
Weekly | Week {Weekly}
Monthly | Month {Monthly})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Daily} | 2 {Weekly} | 3 {Monthly})
</grammar>
<prompt bargein="false" timeout="3s">
Every day? - Press 1, or say "daily".
Once a week? - Press 2, or say "weekly".
<!-- Every other week? - Press 2, or say "every other week". -->
Once a month? - Press 3, or say "monthly".
</prompt>
<catch event="nomatch noinput">
<reprompt />
</catch>
But when I make some minor changes to collect different data using the exact same method, it does not recognize the spoken word and either reprompts or gets it wrong.
Did I do something wrong?
<form id="Day_To_Call">
<field name="call_day">
<grammar type="application/x-jsgf" mode="voice">
(Sun | Sunday {Sunday}
Mon | Monday {Monday}
Tues | Tuesday {Tuesday}
Wens | Wednesday {Wednesday}
Thurs | Thursday {Thursday}
Fri | Friday {Friday}
Sat | Saturday {Saturday})
</grammar>
<grammar type="application/x-jsgf" mode="dtmf">
(1 {Sunday} | 2 {Monday} | 3 {Tuesday} | 4 {Wednesday} | 5 {Thursday} | 6 {Friday} | 7 {Saturday})
</grammar>
<prompt bargein="true" timeout="2s">
Just say the day you want to be called or use your keypad. For -
Sunday - Press 1, or say "Sunday".
Monday - Press 2, or say "Monday".
Tuesday - Press 3, or say "Tuesday".
Wednesday - Press 4, or say "Wednesday".
Thursday - Press 5, or say "Thursday".
Friday - Press 6, or say "Friday".
Saturday - Press 7, or say "Saturday".
</prompt>
<catch event="nomatch noinput">
<reprompt />
</catch>
Thanks,
Chris
Chris
Wait!
I take that back.
Neither one of them recognizes the voice input very well.
With the first one, if I say "weekly" it comes back asking me to verify "daily weekly"
Keypad input works flawlessly on both. So why the problem with voice?
Neither one of them recognizes the voice input very well.
With the first one, if I say "weekly" it comes back asking me to verify "daily weekly"
Keypad input works flawlessly on both. So why the problem with voice?
Thanks,
Chris
Chris
IVR code for grammar fix
Hi Chris,
You should adjust your IVR grammar to this for your days of the week grammar:
As for your call_frequency grammar, that should be adjusted to this:
Sorry for not providing this earlier.
Regards,
Plum Support
You should adjust your IVR grammar to this for your days of the week grammar:
Code: Select all
<grammar type="application/x-jsgf" mode="voice">
( ((Sun | Sunday) {Sunday}) |
((Mon | Monday) {Monday}) |
((Tues | Tuesday) {Tuesday}) |
((Wens | Wednesday) {Wednesday}) |
((Thurs | Thursday) {Thursday}) |
((Fri | Friday) {Friday}) |
((Sat | Saturday) {Saturday}) )
</grammar>
Code: Select all
<grammar type="application/x-jsgf" mode="voice">
( ((Daily | Day) {Daily}) |
((Weekly | Week) {Weekly}) |
((Monthly | Month) {Monthly}) )
</grammar>
Regards,
Plum Support
Plum Support
http://www.plumvoice.com
http://www.plumvoice.com