CCXML 1.0-W3C Development GuideHome  |  Frameset Home

  Dialog Extension: x-senddtmf  |  TOC  |  E: Client Side Scripting  

Dialog extension: "x-recordaudio"

As an extra-special dialog type, the Prophecy CCXML 1.0 implementation is capable of recording the incoming audio stream of a current, active call leg. Targets can be any '.wav' or '.vox' file residing on HTTP or FTP servers. Also be aware that both relative and fiully qualified URLs are considered acceptable. For HTTP the upload method is "GET", which may require special configurations on some webservers. A variety of URL parameters allow the fine-tuning of such a recording. The parameters supported are:


For the inevitable sample code that illustrates this dialog extension in action, look no further:



<?xml version="1.0" encoding="UTF-8"?>
<ccxml version="1.0" xmlns:voxeo="http://community.voxeo.com/xmlns/ccxml">

<var name="initState" expr="'state_1'"/>
<var name="MyCallID"/>

<eventprocessor statevariable="initState">

  <transition event="connection.alerting" state="state_1">
    <assign name="MyCallID" expr="event$.connectionid"/>
    <send data="'MyEvent'" target="session.id"/>
  </transition>

  <transition event="MyEvent">
      <accept connectionid="MyCallID"/>       
  </transition>

  <transition event="connection.connected" state="state_1">
    <log expr="'***** CALL WAS ANSWERED *****'"/>     
      <dialogstart src="'ftp://[username]:[password]@[FTP server]/myRecording.wav&amp;termdigits=*#'"
                        type="'application/x-recordaudio'"/>

  </transition>

  <transition event="error.dialog.notstarted'" state="state_1">
      <log expr="'****** ERROR.DIALOGNOTSTARTED.NAME = ' + event$.name"/>
  </transition>


  <transition event="dialog.exit">
    <log expr="'***** CALL EXITING *****'"/>
    <exit/>
  </transition>

  <transition event="error.*">
    <log expr="'Error: ' + event$.reason"/>
  </transition>
    </eventprocessor>
</ccxml>


Note that you may also download the complete code for testing by clicking here. Copy and paste is SO last-century....


  ANNOTATIONS: EXISTING POSTS
SSA_PBSJ
11/28/2008 5:48 PM (EST)
I had problems getting it to work using the example given in the syntax above.  The term digit value wasn't functioning.  I eventually got it to work by using the following:

src="'ftp://[uname]:[pword]@[ftpserver]/myRecording.wav?termdigits=#'"

With the difference being using a question mark instead of the &amp; as shown above.

voxeoJohn
11/28/2008 6:18 PM (EST)
Hi there,

Looks like you have uncovered a minor type-o in our documentation.  I had to test it just to make sure and you are correct.  This correct string should be as follows:

src="'ftp://[uname]:[pword]@[ftpserver]/myRecording.wav?termdigits=#'"

I will make sure the keepers of the 'docs' are notified of this and this is corrected in our next documentation update!

Please let us know if there are any additional questions here, as we are always standing by to offer any assistance out developers may require!


Regards,

John D.
Customer Engineer
Voxeo Support

login
  Dialog Extension: x-senddtmf  |  TOC  |  E: Client Side Scripting  

© 2008 Voxeo Corporation  |  Voxeo IVR  |  VoiceXML & CCXML IVR Developer Site