Upload an Audio Recording to Storage
Last updated
Last updated
Plum Fuse makes it easy to generate audio recordings from phone calls. Using the Call Recording module you can record specific segments of a phone call or simply record all audio that occurs during a call. Using the Record module you can record specific caller input, similar to voicemail.
Regardless of how you utilize Fuse's call recording capabilities, the question of how to save those recordings remains.
For security and compliance reasons, Fuse does not save any recording data. All recordings are the client's responsibility and, therefore, are held in temporary memory until the call disconnects. At that point, the audio recording gets erased.
If you want to save one or more audio recordings made during a phone call, you must send the recorded audio to your own web server. Once the audio is on your web server, you can do anything with it you want to do.
In short, the basic workflow for call recording is as follows:
Fuse captures call audio.
Client uses a REST module to send audio to their web server.
This step repeats within a given call if you're capturing more than one continuous recording during a call. (See Reminder below)
Fuse disconnects the call and deletes all call recording data generated during that call.
Your call recording now resides on your web server.
The example below outlines the entire process in simplified terms. It shows how you can collect a call recording, save it via REST API to Amazon S3, and use the file URL returned by the API in an e-mail module. The primary steps are as follows:
A javascript module sets a custom filename for the call recording.
The call recording begins.
The caller hears two prompts.
A Menu module prompts the caller to take action; the caller makes a selection.
The call recording ends.
A REST module uploads the audio file to the client's web server.
A compare module checks the status of the REST call.
Email modules notify the client of the success or failure of the file upload.
Note: If you anticipate the caller hanging up before they get to the end of the call-flow, send the generated audio file using a post-call web service instead of a REST module.
Once your audio recording gets uploaded to your web server, you can do whatever you want with the audio file(s). If you want to upload call recording audio from your web server to storage, you can use the SDK for your cloud servers or modify the following PHP sample code to run on your web server so it works with your system(s).
The Call Recording module allows you to record specific sections of a call. However, if you want to record multiple, non-consecutive segments in your voice app, you need to follow the process above for each recording.
For example, if you want to record audio on the first and third pages of your Fuse app, you need to upload the recording from the first page before the recording on the third page can start. Therefore, you need to start, stop, and upload the recording on page one. Then follow the same process for page three.
Each non-contiguous segment of recorded audio needs its own REST upload.
If you intend to capture more than one separate audio file in a single call, be sure to plan for multiple REST calls to send recorded audio when building your application.