ARI provides recording without audio file type extension


(Bartvt21) #1

Hello friends,

I am working with the ARI rest-api from Asterisk, and I am running in to some problems. With the api I can get the recording files via the following
GET request: /recordings/stored/{recordingName}/file

But the url of the download location does not end with the .wav extension (see example below). This is causing me a lot of problems, because I need to stream the audio file via directly from the url, which is not possible right now.

I hope someone could help me out trying to get a response that has the .wav extension at the end of the url.

I am new to Asterisk so please keep it simple.

Thank you!

Bart

URL example:


#2

In general, when using mixmon recordings, the code should also react to the variable {MIXMON_FORMAT}


(Joshua C. Colp) #3

Directly from ARI there’s no way to do it without code modifications and changing things. If you are expecting to download and play it in a browser, that’s not really what ARI was designed for.


(Bartvt21) #4

Hmm, is there an other way to get the audio files directly?


(Joshua C. Colp) #5

I’ve never done it, so don’t really know off the top of my head.


(Bartvt21) #6

I am thinking about building my own rest-api, that reponse with the recordings.


(Joshua C. Colp) #7

That would be in line with how ARI is expected to be used. It’s meant to be accessed by applications, not directly by end users.


(Bartvt21) #8

Yes, but the ARI API does not let me play the recording files in my Swift application. And I don’t know any other way ;(


(Joshua C. Colp) #9

When I say application I’m referring to a server side telephony application. This server side telephony application could then present its own API with its own authentication for client applications such as one running on a mobile device. That is how ARI is designed to be used.


(Bartvt21) #10

Alright, is there a list of applications that are available to use? I am new to voip and Asterisk so I still need to learn a lot.


(Joshua C. Colp) #11

Asterisk doesn’t include any ARI applications. We provide the foundation to let other people create and develop such things in ARI.

What exactly are you trying to do?


(Bartvt21) #12

Currently I am trying to get every stored recording by a unique id (maybe callerid, phonenumber) and I need to get the audio file in my IOS application. So when a call hang up, I send a request from my ios application to a rest-api, that will respond with the audio file.


(system) closed #13

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.