我試圖用VoiceXML(Nexmo)記錄整個電話。VoiceXML記錄整個通話,包括菜單選項
我可以做一個錄音或給菜單提示並單獨轉發一個電話,但我無法弄清楚如何在一起做這兩件事。我想記錄從開始到結束的通話,包括轉接的通話部分。
我會想象VoiceXML看起來像這樣,但這不是有效的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>