I need to use the VXML disconnect element to disconnect from a call

57 views Asked by At

I need to be able to simulate a call disconnect using vxml.

I have attempted to implement this following along with the development guide here: https://help.voxeo.com/go/vxml/elements.disconnect

<vxml>
<prompt mode="recording" delay="500">./audio/agent.wav</prompt>
    <form id="F1">
    <block>
        <prompt>
            Getting ready to disconnect the call, which will throw a connection dot disconnect event.
        </prompt>
     </block>
    <block>
        <disconnect/>
    </block>
</form>
<prompt mode="voice" delay="6100">Hello?</prompt>
<prompt mode="voice" delay="5000">You owe us money. How would you like to pay?</prompt>
<prompt mode="voice" delay="6500">What is your credit card?</prompt>
<prompt mode="voice" delay="20000">Thank you.  And expiration date?</prompt>
<prompt mode="voice" delay="9200">And security code?</prompt>
<prompt mode="voice" delay="9500"> And ZIP code of your billing address.</prompt>
<prompt mode="voice" delay="10200">Your payment will be processed.</prompt>
<afterprompt_action mode="wait_before_hangup_ms">20000</afterprompt_action>

When I run this call however, it appears that the disconnect is completely ignored and the entire call proceeds as normal.

1

There are 1 answers

0
Jim Rush On

You might want to try and put everything within a form. The VoiceXML syntax (defined by the DTD) does not support prompts directly within a vxml block. The unexpected content could be impacting the flow.

<!ENTITY % event.handler "catch | help | noinput | nomatch | error">
<!ELEMENT vxml (%event.handler; | form | link | menu | meta | metadata | property | script | var)+>