Page 1 of 1

subdialog problem

Posted: Thu Dec 11, 2008 10:34 am
by soso
Hi,

On my voicexml application, I want to write the confirmation option. To do this, I'll make a subdialog. But I've a problem.

I would like to :

enter a phone number, and confirm by press #. Another begin another choice.

Can you help me?

Thanks by advance.

[/code]

IVR code for <subdialog> tag

Posted: Thu Dec 11, 2008 11:50 am
by support
Hi,

Here is some documentation on how you would use the IVR tag, <subdialog>:

Here is some sample IVR code that demonstrates how to have a user enter a phone number and confirm by pressing the "#" key:

phonenumber.php

Code: Select all

<?php
header("Content-type: text/xml");
echo("<?xml version=\"1.0\"?>\n");
?>
<vxml version="2.0">
  <form id="phonenumber">
    <field name="targetnumber" type="digits">
      <prompt>
        What phone number would you like to dial?
      </prompt>
      <filled>
        <prompt>
          You entered
          <say-as type="acronym">
            <value expr="targetnumber"/>
          </say-as>.
        </prompt>
        <goto next="#confirmphonenumber"/>
      </filled>
    </field>
  </form>
  <form id="confirmphonenumber">
    <field name="confirm">
      <grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
        <rule id="ROOT">
          <one-of>
            <item>"#"</item>
            <item>2</item>
          </one-of>
        </rule>
      </grammar>
      <prompt>
        Is this correct? Press # for yes or 2 for no.
      </prompt>
      <filled>
        <if cond="confirm=='#'">
          <prompt>You have confirmed the phone number.</prompt>
        <else/>
          <prompt>You have not confirmed the phone number.</prompt>
          <goto next="#phonenumber"/>
        </if>
      </filled>
    </field>
  </form>
</vxml>
Hope this helps.

Regards,
Plum Support

Posted: Thu Dec 11, 2008 11:54 am
by soso
Ok. Thansk for your answer. I'll try it.

Posted: Fri Dec 12, 2008 4:00 am
by soso
Hi,

Thans, but is it's possible to use a subdialog? The <goto> element can't send a variable (namelist).

IVR code uses <subdialog> tag

Posted: Fri Dec 12, 2008 9:49 am
by support
Yes, you can use a <subdialog> if you want to send a variable.

If you have any IVR issues implementing this, please clarify further for us what you would like to do.

Regards,
Plum Support