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

Renaming the NAME of the <record> tag

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
metroscript
Posts: 78
Joined: Mon Sep 25, 2006 6:52 am
Contact:

Renaming the NAME of the <record> tag

Post 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.

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

IVR code that demonstrates use of <var> tag

Post 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.

Post Reply