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

Problems with audio recording repository API

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
sheadley
Posts: 2
Joined: Wed Aug 11, 2004 9:48 am

Problems with audio recording repository API

Post by sheadley »

Hello all,
I have gone through the manual on how to save audio files via vxml. The manual provides the following example application which is incorrect.

Code: Select all

 <vxml version="2.0">
    <var name="pin" value="'12345678'"/>
    <form>
        <record name="recording" beep="true" type="audio/basic">
            <prompt bargein="false">
                Please record your message after the beep.
            </prompt>
            <catch event="nomatch noinput"/>
                <reprompt/>
            </catch>
        </record>

        <!-- The subdialog takes a namelist "pin recording" -->
        <!-- and returns success(bool), fileid, and fileurl -->
        <subdialog next="http://audio.plumgroup.com/vxml/file_upload_subdialog.php"
          namelist="pin recording" method="post">
            <filled>
                <if cond="success">
                    <prompt>
                        File uploaded successfully.
                        The file ID is <value expr="fileid"/>.
                        Your message was <audio srcexpr="fileurl"/>.
                    </prompt>
                <else/>
                    <prompt>
                        File upload failed.
                    </prompt>
                </if>
            </filled>
        </subdialog>
    </form>
</vxml>
I subsequently did research and changed the preceeding vxml script to this:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
    <var name="pin" expr="'12345678'"/>
    <form>
        <record name="recording" beep="true" type="audio/basic">
            <prompt bargein="false">
                Please record your message after the beep.
            </prompt>
            <catch event="nomatch noinput">
                <reprompt/>
            </catch>
        </record>

        <!-- The subdialog takes a namelist "pin recording" -->
        <!-- and returns success(bool), fileid, and fileurl -->
        <subdialog name="oResult" src="http://audio.plumgroup.com/vxml/file_upload_subdialog.php" namelist="pin recording" method="post">
            <filled>
                <if cond="oResult.success">
                    <prompt>
                        File uploaded successfully.
                        The file ID is <value expr="oResult.fileid"/>.
                        Your message was <audio expr="oResult.fileurl"/>.
                    </prompt>
                <else/>
                    <prompt>
                        File upload failed.
                    </prompt>
                </if>
            </filled>
        </subdialog>
    </form>
</vxml>
but this also dosen't work. The error message that I receive back from the system is as follows:

error no_ani 2 [11/Aug/2004:11:13:28 -0400] 3845 000000;002;1092237172 errmsg ReferenceError: status is not defined line 1 linetxt tokentxt

This is not very discriptive. Can you please tell me what I am doing wrong?

Thanks in advance

Steve H.

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

IVR code that works for audio repository feature

Post by support »

Hi:

There were several mistakes in the IVR audio repository developers guide (note the difference with the <if> tag). They have not been corrected yet, but here is the updated IVR code that does work (I verified it myself)

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
    <var name="pin" expr="'12345678'"/>
    <form>
        <record name="recording" beep="true" type="audio/basic">
            <prompt bargein="false">
                Please record your message after the beep.
            </prompt>
            <catch event="nomatch noinput">
                <reprompt/>
            </catch>
        </record>

        <!-- The subdialog takes a namelist "pin recording" -->
        <!-- and returns success(bool), fileid, and fileurl -->
        <subdialog name="test" src="http://audio.plumgroup.com/vxml/file_upload_subdialog.php"
          namelist="pin recording" method="post">
            <filled>
                <if cond="test.success">
                    <prompt>
                        File uploaded successfully.
                        The file ID is <value expr="test.fileid"/>.
                        Your message was <audio expr="test.fileurl"/>.
                    </prompt>
                <else/>
                    <prompt>
                        File upload failed.
                    </prompt>
                </if>
            </filled>
        </subdialog>
    </form>
</vxml>
Thank you for bringing this to our attention! The IVR audio repository is a new feature for our developers, so thanks for helping us fix some preliminary mistakes.

hope this helps!

Plum Support Team
Last edited by support on Thu Feb 25, 2010 4:28 pm, edited 5 times in total.

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

developers guide for IVR outbound has been updated

Post by support »

*Update*

The developers guide for IVR outbound has been updated to incorporate the mistakes you found... thanks again! :)


Sincerely,

Plum Support

Post Reply