Callisto Knowledge Base

This page is optimized for desktop computers and tablets. To access it, try one of the following points:

  • Access this page from a different device.
  • If you’re on a tablet, rotate it.
  • Check the “Desktop site” option in your browser settings.
Return to CTModule homepage
Knowledge Base

File management functions

Table of Contents

Info: All examples shown here use the following placeholders. Replace these placeholders with the appropriate data:

  • <user> and <password>: Credentials of a Callisto user with REST Authentication privilege.
  • <callisto>: The base domain name or IP address of the Callisto server.
  • <MAGroup>: The name of the ManagerAssistant Group application instance to call.

All functions used for file management are called by URLs containing the following path:

http://<callisto>/Applications/inbound/<MAGroup>/rest/files

getMP3s

HTTP request method: GET

Returns a list of all MP3 files that are uploaded to this application instance. These files can be used for call notifications.

Response

The <Response> element contains an <MP3File> element for every MP3 file uploaded to the application instance. The content of each element is the file name.

If an error occurs, the <Response> element contains the status of the executed action. The following four statuses are possible:

FOLDER_MISSING: No folder named mp3 exists for the application instance.
ERROR: Unknown error.

Example: Get a list of all MP3 files that are uploaded to this ManagerAssistant Group instance.

Request

curl --user <user>:<password> http://<callisto>/Applications/inbound/<MAGroup>/rest/files/getMP3s.asp

Response

<Callisto>
    <Request>addAnnouncements</Request>
    <Response>
        <MP3File>Analog1.mp3</MP3File>
        <MP3File>Analog2.mp3</MP3File>
        <MP3File>AreYouThere.mp3</MP3File>
        <MP3File>Chime.mp3</MP3File>
        <MP3File>CiscoStandard.mp3</MP3File>
        <MP3File>CiscoSymphonic.mp3</MP3File>
        <MP3File>CiscoSynth.mp3</MP3File>
        <MP3File>MusicBox.mp3</MP3File>
        <MP3File>newCall.mp3</MP3File>
        <MP3File>Piano1.mp3</MP3File>
        <MP3File>Piano2.mp3</MP3File>
    </Response>
</Callisto>

getWAVs

HTTP request method: GET

Returns a list of all WAV files that are uploaded to this application instance. These files can be used for announcements and greetings.

Response

The <Response> element contains an <WAVFile> element for every WAVfile uploaded to the application instance. The content of each element is the file name.

If an error occurs, the <Response> element contains the status of the executed action. The following four statuses are possible:

FOLDER_MISSING: No folder named PCM exists for the application instance.
ERROR: Unknown error.

Example: Get a list of all WAV files that are uploaded to this ManagerAssistant Group instance.

Request

curl --user <user>:<password> http://<callisto>/Applications/inbound/<MAGroup>/rest/files/getWAVs.asp

Response

<Callisto>
    <Request>addAnnouncements</Request>
    <Response>
        <WAVFile>Music_01.wav</WAVFile>
        <WAVFile>Music_02.wav</WAVFile>
        <WAVFile>Music_03.wav</WAVFile>
        <WAVFile>Music_04.wav</WAVFile>
        <WAVFile>Welcome.wav</WAVFile>
        <WAVFile>Willkommen.wav</WAVFile>
    </Response>
</Callisto>

uploadMP3

HTTP request method: POST

Upload an MP3 file to the application instance’s mp3 folder.

Parameter

uploadMandatory. File or array of files to upload.

Response

The <Response> element contains the status of the executed action. The following four statuses are possible:

OK: The file was uploaded successfully.
FOLDER_MISSING: No folder named mp3 exists for the application instance.
ERROR: Unknown error.

Example: Upload the file Alert.mp3 to the application instance.

Example data

  • upload=@home/myfiles/Alert.mp3: Path of the file to upload

Request

curl --user <user>:<password> -F "upload=@home/myfiles/Alert.mp3" http://<callisto>/Applications/inbound/<MAGroup>/rest/files/uploadMP3.asp

Response

<Callisto>
    <Request>uploadMP3</Request>
    <Response>OK</Response>
</Callisto>

uploadWAV

HTTP request method: POST

Upload a WAV file to the application instance’s PCM folder.

Parameter

uploadMandatory. File or array of files to upload.

Response

The <Response> element contains the status of the executed action. The following four statuses are possible:

OK: The file was uploaded successfully.
FOLDER_MISSING: No folder named PCM exists for the application instance.
ERROR: Unknown error.

Example: Upload the file music_piano.wav to the application instance.

Example data

  • upload=@home/myfiles/Music_Piano.wav: Path of the file to upload

Request

curl --user <user>:<password> -F "upload=@home/myfiles/Music_Piano.wav" http://<callisto>/Applications/inbound/<MAGroup>/rest/files/uploadWAV.asp

Response

<Callisto>
    <Request>uploadWAV</Request>
    <Response>OK</Response>
</Callisto>