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

3 VXML Questions (menu's, wait audio, variable scope)

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
rayishome
Posts: 23
Joined: Mon Aug 13, 2007 7:12 am

3 VXML Questions (menu's, wait audio, variable scope)

Post by rayishome »

Question 1) I have been creating variables at the root and can't seem to access them within menu's or forms. even under document.name

question 2) can i play audio while the remote web app is processing. If so How?

question 3) I have a multi level tree menu and looking for some best practice also looking to process a list and let the user move forward and backward through the list. also stop the list in the middle and move to another list and do the same.

Thanks for any help you can provide. Thanks

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

IVR Questions (menu's, wait audio, variable scope)

Post by support »

Hi,

For question 1, could you provide us with a snippet of IVR code? We need more information to help you with this IVR issue.

For question 2, if you are using the <submit> tag, you can use the "fetchaudio" attribute to play audio while your remote web app is processing data.

For question 3, you can use the "id" attribute to name your menus and submenus and then use the <goto> tag to move forward and backward through your menus. Please provide us with an small example of IVR code if this does not help you.

Hope this helps.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 4:55 pm, edited 4 times in total.

rayishome
Posts: 23
Joined: Mon Aug 13, 2007 7:12 am

code for issue 1

Post by rayishome »

issue #1: code: neither item seems to work uri or document.uri

<vxml version="2.0" xmlns="http://www.w3.org/2001/vxml">
<var name="uri" expr="'PhoneProcessReqTest.asp'" />
<catch event="connection.disconnect.hangup">
<goto next="HangUp.asp" />
</catch>
<form>
<block>
<prompt>
Welcome
</prompt>
<goto next="#mainmenu"/>
</block>
</form>

<menu id="mainmenu">
<prompt>
Please choose a function:
<enumerate/>
</prompt>
<choice dtmf="1" next="#buying">
buy</choice>
<choice dtmf="3" next="#exit">
exit</choice>

</menu>

<form id="buying">
<block>

<var name="req" expr="'Buying'"/>

<submit expr="uri" namelist="req" method="post"/>
<goto next=""/>
</block>

</form>

<form id="reminders">
<block>

<var name="req" expr="'Reminders'"/>

<submit expr="document.uri" namelist="req" method="post"/>
<goto next=""/>
</block>

</form>

rayishome
Posts: 23
Joined: Mon Aug 13, 2007 7:12 am

issue #3

Post by rayishome »

above you will also see issue #1 documented:

the flow is like this:

List 1:
apples
peaches
robots

List 2:
balls
toys
radios

I want the user to be able to select a list then hear the first item. after hearing the first item I want them to select one of 4 options. 1) Go forward to the next item 2) Go back 3) Submit to server 4) exit to previous menu to pick a new list.

IVR: Pick a list (list1 or List2)
User: list1 (or enters 1)
IVR: Apples (pause and waits 3 seconds)
IVR: (after 3 seconds) Please select an option (list out the 4 options)
User: Next (or 1)
IVR: Peaches (Puase and waits)
User: exit
IVR: Pick a list (list1 or List2)

what about after 10 seconds can I exit automatically?

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

IVR call log needed to help better understand problem

Post by support »

Hi,

For issue #1, could you post an IVR call log for when you test this IVR application? This would make it clear as to why "uri" is not working. Also, what is "document.uri"? It isn't declared in your IVR application.

Regards,
Plum Support
Last edited by support on Fri Feb 19, 2010 4:56 pm, edited 2 times in total.

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

IVR code to move back and forth between menus

Post by support »

Hi,

Here is a small snippet of IVR code that will allow you to move back and forth between your <menu>s and allow you to return to your main menu is the user does not say anything after 10 seconds:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">

<property name="sensitivity"  value="0.3"/>
<property name="timeout" value="10s"/>

<catch event="noinput">
  You will be sent back to the mainmenu.
  <goto next="#mainmenu"/>
</catch>

<form>
  <block>
    <prompt>
      Welcome
    </prompt>
    <goto next="#mainmenu"/>
  </block>
</form>

<menu id="mainmenu">
  <prompt>
    Please choose a function:
    <enumerate/>
  </prompt>
  <choice dtmf="1" next="#buying">
    buy
  </choice>
  <choice dtmf="2" next="#selling">
    sell
  </choice>
</menu>

<menu id="buying">
  <prompt>
    Please choose a function:
    <enumerate/>
  </prompt>
  <choice dtmf="1" next="#finish">
    done
  </choice>
  <choice dtmf="2" next="#mainmenu">
    mainmenu
  </choice>
 </menu>

<menu id="selling">
  <prompt>
    Please choose a function:
    <enumerate/>
  </prompt>
  <choice dtmf="1" next="#finish">
    done
  </choice>
  <choice dtmf="2" next="#mainmenu">
    mainmenu
  </choice>
</menu>

<form id="finish">
  <block>
    <prompt>
      Thanks for calling.
    </prompt>
  </block>
</form>
</vxml>
By using the "id" attribute for the IVR tags, menu and form, I can go to whichever menu or form I want for each of my choices. As for exiting back to the main menu automatically, I first set up the IVR property, timeout, to be 10 seconds and then use a catch handler to return you to the main menu after the user has not entered anything after 10 seconds.

Hope this helps.

Regards,
Plum Support

Post Reply