Page 1 of 1

Transfer call setup during an entire course of converstation

Posted: Wed May 08, 2013 4:21 pm
by bhairav
Hi,
I need to have a global setup configured in such a way that, during the entire course of conversation between the client and IVR, if user presses say zero, the call has to be transferred.

Please advise.

Re: Transfer call setup during an entire course of conversta

Posted: Thu May 09, 2013 2:15 pm
by support
Hi,

You can use the <link> element to have the IVR perform a transfer upon reading a DTMF-0 input. In the example below, pressing 0 on your keypad during both forms will transfer you:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<link next="#zero">
  <grammar type="application/x-jsgf" mode="dtmf">
    "0"
  </grammar>
</link>

<form id = "onetwothree">
  <field name="1digit">
    <grammar type="application/x-jsgf" mode="dtmf">
      ( 1 | 2 | 3)
    </grammar>
    <prompt>
      Press 1 for one.
      Press 2 for two.
      Press 3 for three.
    </prompt>
    <filled>
      <prompt>You have entered one, two, or three.</prompt>
      <goto next="#nextform"/>
    </filled>
  </field>
</form>

<form id="nextform">
  <field name="2digits" type="digits?length=2">
    <prompt>
      Please enter two digits and press #.
    </prompt>
    <filled>
      You entered two digits. Bye.
      <disconnect />
    </filled>
  </field>
</form>

<form id="zero">
  <block>
    <prompt>You pressed zero. Transferring.</prompt>
  </block>
  <transfer name="operator" dest="tel:+1234567890"></transfer>
</form>
</vxml>
If you wish to have this behavior across multiple VXML documents, you may place the <link> element within a root document.