Search code examples
vxml

VXML audio tag didn't work


I have some troubles with my vxml.

<?xml version="1.0" ?>
<vxml version="2.1" xmlns="http://www.w3.org/2001/vxml" xml:lang="fr-FR">
  <form id="welcome">
    <field name="choice">
      <prompt>
        Bienvenue au test Raccrocher. Que voulez-vous faire? Raccrocher Taper 1, Redire ce message Taper 2, ou Revenir au menu principal taper 3
      </prompt>
      <grammar mode="dtmf" version="1.0" root="top">
        <rule id="top"><one-of><item>1</item><item>2</item><item>3</item></one-of></rule>
      </grammar>
      <filled>
        <if cond="choice == '1'">
          <audio src="SOME_URL" />
          <exit />
        <elseif cond="choice == '2'" />
          <clear namelist="choice" />
        <elseif cond="choice == '3'" />
          <goto next="SOME_URL" />
        </if>
      </filled>
    </field>
  </form>

</vxml>

This is my code and i can't play my song and I don't know why. I need your help !


Solution

  • The audio element must be inside a prompt element. See the specification.