I log by calling a subdialog which submits data into a database. I want to use subdialog rather than submit because I would like the existing vxml to continue after the logging is done. Unfortunately the subdialog tag can only occur in a form tag and this is what I'm having trouble working around.
Consider the following vxml snippet
Code: Select all
<form id="form_1">
<field name="yn" type="boolean">
<prompt>Say yes or no.</prompt>
<error>
<assign name="log_next" expr="'#form_1'" />
<assign name="log_type" expr="'error'" />
<assign name="log_name" expr="???" />
<assign name="log_value" expr="???" />
<goto next="#log" />
</error>
<filled>
<assign name="log_next" expr="'#form_2'" />
<assign name="log_type" expr="'normal'" />
<assign name="log_name" expr="'yn'" />
<assign name="log_value" expr="yn" />
<goto next="#log" />
</filled>
</field>
</form>
<form id="form_2">
...
</form>
<form id="log">
<subdialog .... />
<goto expr="log_next" />
</form>
Secondly, this approach to logging errors doesn't really work since the event count will be reset when I leave form_1 to call the log form. If I could put a subdialog tag in the error tag that would be awesome... but since I can't I have to think of another way to do this.
I could maintain my own variables for event counts but I'd rather not duplicate that work. Is there a better way to go about this?
TIA
-Jonathan