Certified Tech Tip: Prophecy 8 CCXML 1.0 Call Recording
March 6th, 2008 by voxeojeff
Last week’s tech tip delved into the world of SSML and CallXML. This week, we take a different route, and take a look at Call Recording in CCXML 1.0 — a highly sought-after feature. While it is relatively new, our Engineers are constantly working on ways to improve it. It should be noted that this will only work in Prophecy 8.
First, though, I’d like to introduce myself, as this is my first posting to the Voxeo Developers Corner blog. My name is Jeff Menkel, and I’ve been a Supporteon at Voxeo since December 2006. I attained my VoiceXML certification back in November 2007, with expertise on advanced CCXML concepts.
As it stands now, we can record VoiceXML dialogs, and interactions within. Now, you’re probably asking yourself, I’d like to test this out, how can I get started? Here’s the scoop. Call Recording in CCXML 1.0 starts with a simple variable declaration and assignation:
<var name=”filename” expr=”"/>
…
<assign name=”filename” expr=”event$.connection._RecordCall(100,’TestRecording’)”/>
Now, you may be wondering what exactly these parameters mean. Lets have a look at the basic “equation” if you will:
z = _RecordCall(x,y)
The ‘z’ variable is equal to the file name being used. In the above example, this is the “filename” variable.
The value of ‘x’ is equal to a number between 0 and 100. This is the probability that the call will be recorded. Setting this to 0 means call recording is turned off. Setting this to 100 means all calls are recorded. Setting this to 10 means 10 percent of calls will be recorded.
The ‘y’ value will be used to add any additional text to the file name. In this case, the additional text is “TestRecording”.
And now, for the sample code…
<?xml version=”1.0″ encoding=”UTF-8″?>
<ccxml version=”1.0″ xmlns:voxeo=”http://community.voxeo.com/xmlns/ccxml”>
<var name=”state0″ expr=”‘init’”/>
<var name=”connid”/>
<var name=”filename”/>
<eventprocessor statevariable=”state0″>
<transition event=”connection.alerting”>
<accept/>
</transition>
<transition event=”connection.connected”>
<assign name=”state0″ expr=”‘tts’”/>
<assign name=”connid” expr=”event$.connectionid”/>
<assign name=”filename” expr=”event$.connection._RecordCall(100,’TestRecording’)”/>
<log expr=”‘Recording to filename ‘+filename”/>
<dialogstart src=”‘null://?text=Hello and welcome to Vox Ayo CCXML re cord call tutorial.’”
type=”‘application/x-texttospeech’”/>
</transition>
<transition event=”connection.disconnected”>
</transition>
<transition event=”dialog.exit” state=”tts”>
<assign name=”state0″ expr=”‘vxml’”/>
<dialogstart src=”‘any_audio_file.wav’” type=”‘audio/wav’” connectionid=”connid”/>
</transition>
<transition event=”dialog.exit” state=”vxml”>
<log expr=”‘***** SUCCESS *****’”/>
<exit/>
</transition>
<transition event=”dialog.exit”>
<log expr=”‘***** FAILED *****’”/>
</transition>
<transition event=”error.*”>
<log expr=”‘Houston, we have a problem: (’ + event$.reason + ‘)’”/>
<exit/>
</transition>
</eventprocessor>
</ccxml>
In a nutshell, this records a TTS string launched via <dialogstart>, then transitions to the dialog.exit event, which in turn launches a second dialog, which is also recorded, and is a simple audio file in .wav format. But hey, don’t take my word for it, try it out for yourself, and be sure to check out next week’s certified tech tip by Jeremy McCall, who will be talking about how to automate phone calls.
Stay tuned,
Jeff Menkel
Voxeo Corporation
RSS Feed
March 31st, 2008 at 4:16 pm
[...] Over on our Voxeo Developer’s Corner blog, you can see what we are trying to do with posts like this one. We want to include snippets of XML code, complete with angle brackets, etc. Obviously this can be [...]
April 14th, 2008 at 10:40 pm
[...] posting the query &8216out there to the Universe&8217?http://kmi.open.ac.uk/people/marc/2004/11/Certified Tech Tip: Prophecy 8 CCXML 1.0 Call Recording Last week??s tech tip delved into the world of SSML and CallXML. This week, we take a different [...]