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

subdialog problem

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

subdialog problem

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

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

IVR code for <subdialog> tag

Post 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
Last edited by support on Wed Feb 24, 2010 2:57 pm, edited 5 times in total.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

Post by soso »

Ok. Thansk for your answer. I'll try it.

soso
Posts: 62
Joined: Tue Apr 22, 2008 8:11 am

Post by soso »

Hi,

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

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

IVR code uses <subdialog> tag

Post 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

Post Reply