Page 1 of 1

Renaming the NAME of the <record> tag

Posted: Thu Mar 06, 2008 9:31 am
by metroscript
Good morning to all,

Ok. Say I have the following to create a recording:

Code: Select all

<record name="phone_file_1vox" beep="true" dtmfterm="true" maxtime="720s" finalsilence="300s" type="audio/basic">
Now, I get a failure when trying to submit the recording later down in the page. I would like to RENAME the name of the record tag, from phone_file_1vox to error_processing_recoring_yyyymmdd.vox and then submit this to a different page via my error.badfetch. So, the question is:

How do a rename phone_file_1vox to error_processing_recoring_yyyymmdd.vox?

Thanks!!

Mike C.

IVR code that demonstrates use of <var> tag

Posted: Thu Mar 06, 2008 10:11 am
by support
Hi,

It is possible to rename the name of the <record> tag by using the <var> tag. For an example of IVR code:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<form>
<var name="error_processing_recoring_yyyymmdd" expr=""/>

<record name="phone_file_1vox" beep="true" dtmfterm="true" maxtime="720s" finalsilence="300s" type="audio/basic">
  <prompt>
    Please record a message after the beep.
  </prompt>

  <filled>
    <var name="error_processing_recoring_yyyymmdd" expr="phone_file_1vox"/>
    You just recorded the following message: <value expr="error_processing_recoring_yyyymmdd"/>
  </filled>
</record>

</form>
</vxml>
However, it is not possible to rename "phone_file_1vox" to "error_processing_recoring_yyyymmdd.vox" since "vox" would refer to a member variable of the object "error_processing_recoring_yyyymmdd". In short, you cannot assign variables with file extension names in them (i.e. .doc, .wav, .txt, .vox) since these would refer to member variables.