cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
678
Views
0
Helpful
0
Replies

UCCX Scripting: uploading recorded prompt to another webserver

detho9000
Level 1
Level 1

I have a script that records a prompt and saves the resulting WAV to a folder in UCCX.  Very basic and it works.  Saving the prompt as a WAV file is secondary, what I really want to do with the recorded audio is send it, as a WAV, to another web server.

But, as I said, recording the prompt and saving it as a WAV to UCCX works great.  I can download the WAV file from the CCX Administration site and it plays fine.

Now when I try to send that same WAV, or the audio from the "Recording" prompt, to the other webserver using the "Make REST Call" step the resulting file is not playable.  When I open the WAV from UCCX and the resulting WAV that was transferred to the webserver side by side in a text editor it's clear that the transferred WAV is in a different encoding than the original.  It's also a very different filesize.

But I'm out of ideas as to what I'm doing wrong since the "Make REST Call" it shouldn't be imposing any sort of encoding on the data unless it was told too in a header, which it's not.

Here's the relevant "SET" command that creates the body of the "Make REST Call" step (which is a Multipart POST):

"--boundary1"+CRLF+
"Content-Disposition: form-data; name="+'\"'+"file"+'\"'+"; filename="+'\"'+UID+".wav"+'\"'+CRLF+
"Content-Type: audio/wav"+CRLF+CRLF+
recordedMessage+CRLF+
"--boundary1--"

The "recordedMessage" is the recorded audio document from the "Recording" step. 

 

Any suggestions would be appreciated - thanks!

0 Replies 0