voicexmlvonage

VoiceXML Record whole call, including menu options


I'm trying to record a whole phone call using VoiceXML (on Nexmo).

I can make a recording or give menu prompts and forward a call seperately, but I can't work out how to do both together. I'd like to record the call from start to finish, including the forwarded call part.

I would imagine the VoiceXML would look something like this, but this isn't valid VoiceXML.

<?xml version="1.0" encoding="UTF-8"?>
<vxml version = "2.1" >
<var name="callerid" expr="123" />
<form>

    <record name="recording" beep="true" dtmfterm="true" maxtime="100s">   
        <menu dtmf="true">
            <property name="inputmodes" value="dtmf"/>
            <audio src="server/forwardingnow.mp3"/>
            <choice dtmf="10" next="#sales"/>
            <choice dtmf="30" next="#support"/>
        </menu>
        <form id="sales">               
            <transfer name="MyCall" dest="tel:123123123" bridge="true" connecttimeout="20s"/>
        </form>
        <form id="support">  
            <transfer name="MyCall" dest="tel:123123123" bridge="true" connecttimeout="20s"/>
        </form>

        <catch event="connection.disconnect.hangup">
            <submit next="server/voice/savecall" method="post" namelist="recording callerid" enctype="multipart/form-data"/>
        </catch>

    </record>

</form>


Solution

  • It is not possible to do this using standard VoiceXML, you either have to use vendor extensions or put your call in conference with a recording application (a single document with a single for the whole call).