Topic: Fetch URL to REST service

Hello Support

Please do look at our only App.

We are trying to figure out how to send the recording of 5 seconds to our web service via your framework.

It already works with web sites and native mobile applications.

So, take a look at enrollExistingUser object

Here is what we are trying to POST:

We are having issues with sending the sound data. Please note it does not have to be wave data.

type: 'POST',
                url: ' … nrollments',
                contentType: 'audio/wav',
                data: wav,
                processData: false,
                headers: {
                    'VsitEmail': email,
                    'VsitPassword': CryptoJS.SHA256(password),
                    'VsitDeveloperId': developerId

Thanks for your time,

Re: Fetch URL to REST service

Hi Noel,

Fuse cannot send send audio data. Instead, when you save a recording, it saves the URL for the audio file. You can then POST that URL to your webservice, and your webservice is responsible for downloading the audio from the URL.

Fuse also does not support custom headers. All data you send must be within the POST data.

Re: Fetch URL to REST service

Thanks Support.

Ok, can you please answer these questions below:

Is it saved automatically?
and to where?
and what is the URL?


Re: Fetch URL to REST service

Hi Noel,

Yes, the URL is saved automatically. It is saved with the same name as whatever you named your Voice Recording module. So for example, if you named your Voice Recording module "recording," you would use the variable named "recording"  to play the recording, but you could also send that variable to your webservice. It gets sent as a URL, not the audio data. The URL is different for each recording.

You can read more about the Voice Recording module by clicking "Help on this module" under the Voice Recording module's menu.

Re: Fetch URL to REST service

Hello Support,

We have added new post method to our REST service.

You have bugs in your system.

1) Please look at our app on the POST call. The value of VsitWavURL is passed the URL of the voice recording. It does not work. As the value is not passed properly. You can test by just hard coding the actual mp3 URL and the POST works.

2) Please look at calllog database. Variable and enrollexistinguserrecording should be the same value but they are not. The mp3 URL value changes.

Please review your system logs and look at why the voice recording URL is not passed correctly. Again, we can hardcore the VsitWavURL header the actual mp3 URL value from calllog database and it works.

This truly is not a issue with our test app or REST service and something we can not fix.

Thanks for your time on this,

Re: Fetch URL to REST service

Hi Noel,

Could you please share your application  and the callLog database to this admin account so we can further investigate? Please make sure we get all the abilities.

The Fuse Team

Re: Fetch URL to REST service

Hi Support,

Ok, I have shared the app and calllog db

Please call me to explain more if you need to understand the bugs..


Re: Fetch URL to REST service

Hi Noel,

Our apologies, our initial explanation was missing a step. To get a URL for your voice recording, you need to first insert it into the Simple Database. Then you can query the Simple DB for your recording URL. We've shared an example application to you.

As for why the URLs are different for enrollexistinguserrecording and variable, when you assign variable = enrollexistinguserrecording, we create a copy of enrollexistinguserrecording and assign it to variable. That's why the URLs are different. If you listen to the audio, they are the same.

Plum Support

Re: Fetch URL to REST service

I am having the same issue here is the original post. When trying to pass the variable recording variable to my REST service, it fails. If I pass plain text, it posts fine. Can you please clarify the exact steps need to record a voice response, pass the variable to a REST service, and retrieve the recording? Also, how long are the recordings kept for?

Re: Fetch URL to REST service

Here's step by step what to do:

1. After recording, insert your recording into Simple DB.
2. You must then fetch the file from Simple DB to get a URL to your recording.
3. Pass the recording to your REST service. You are responsible for downloading the audio to your own servers.

We have shared an application to you, showing you this example.

Re: Fetch URL to REST service

Thank you, I appreciate you supplying the sample app. I'm still having a problem retrieving the recording URL though. When trying to pass the variable back to my REST service, I receive a 500 error. To try to debug, I retrieve the record from the database and have it speak back the variable. It plays the recording, not the url. Am I doing something wrong?

Re: Fetch URL to REST service

Well, I got it to work. The 500 error was on my end, not yours. When I pass the result back to my webservice, it is properly passing the recording URL.

One point that I would like for you to clarify though, does the recording persist even if the Simple DB is deleted? So as long as I save the URL in my local database, it doesn't matter what happens to the Simple DB, correct?

Re: Fetch URL to REST service

We'll need more details, can you share the application you're having trouble with to us? Please also tell us step by step how to get to the recording portion of your app.

Re: Fetch URL to REST service

I actually got it to work yesterday, but I did have a question regarding the recordings themselves. If I am passing the recording to the my REST service and storing it on my server's database, can I safely delete the record from the Simple DB without affecting the actual recording? Deleting the record in the Simple DB does not actually delete the recording, correct?

Re: Fetch URL to REST service

That's correct, deleting the Simple DB row does not delete the recording. However, we do recommend downloading the audio so you have your own copy.