User Tools

Site Tools


api:pbx:musiconhold:downloadfile

API : PBX : Music on hold Get/Download file

Introduction

This request will download a song from a music on hold playlist or play it in the browser.

When downloading - make sure to download the correct version.

Supported versions are: alaw, ulaw, gsm, g722, sln16, mp3, low.mp3, high.mp3, m4a, ogg, wav.

Request

URL https://audio.telecomx.dk/FILE_ID.VERSION?token=TOKEN
URL https://audio.telecomx.dk/FILE_ID/my-file-name.VERSION?token=TOKEN
Method GET
Access level MANAGER or OWNER if user belongs to the customer that owns the music on hold playlist.
RESELLER if customer belongs to the reseller.
ADMIN.
Params FILE_ID String Id of the song to download.
Version String Version of song: alaw, ulaw, gsm, g722, sln16, mp3, low.mp3, high.mp3, m4a, ogg, wav.

Token is only required for files that are protected.

The my-file-name version, forces download as the filename specified.

Request example

http://audio.telecomx.dk/12345678901234567890ABCD.mp3?token=y92yfuhdjvb298hubvibeiugiufbiubweiubbdi
http://audio.telecomx.dk/12345678901234567890ABCD/my-favorite-song.gsm?token=y92yfuhdjvb298hubvibeiugiufbiubweiubbdi

Response

Binary data - the song in the selected version.

Example

N/A

Errors

Error code Message Description
404 id Music on hold not found
404 file File not found
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/pbx/musiconhold/downloadfile.txt · Last modified: 2018/06/30 11:42 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki