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

Announcement 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 related to announcements are called by URLs containing the following path:

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

addAnnouncement

HTTP request methods: POST; GET

Add an announcement to a group. Announcements are played to callers while waiting for a group member to answer the call.

Parameters

gr_id Mandatory. The ID of the group.
an_wave Mandatory. The file name of the wave file to use as announcement.
an_priority The priority index of the announcement. This index determines the order in which the announcements will be played. A lower index means higher priority. If not set, the announcement will have lowest priority.

Response

The <Response> element contains two child elements:

The <id> element contains the ID of the group to which the addAnouncement action was applied.

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

OK: The new announcement was added to the group successfully.
PARAMETER_MISSING: One or both mandatory parameters are missing.
INVALID_GROUP_ID: No group with the given ID exists.
ERROR: Unknown error.

Example: Upload the file welcome.wav to the announcements of the group with the ID 2504. Omitting the an_priority parameter will append the new announcement to the bottom of the announcements list.

Example data

gr_id=2504: ID of the group
an_wave=Welcome.wav: Name of the audio file

Request

curl --user <user>:<password> --data "gr_id=2504&an_wave=Welcome.wav" http://<callisto>/Applications/inbound/<MAGroup>/rest/announcements/addAnnouncement.asp

Response

<Callisto>
    <Request>addAnnouncements</Request>
    <Response>
        <id>2504</id>
        <status>OK</status>
    </Response>
</Callisto>

deleteAnnouncement

HTTP request methods: POST; GET

Delete an announcement from a group.

Parameter

an_id Mandatory. The ID of the announcement.

Response

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

OK: The announcement was deleted successfully.
PARAMETER_MISSING: The mandatory parameter is missing.
INVALID_ANNOUNCEMENT_ID: No announcement with the given ID exists.
ERROR: Unknown error.

Example: Delete the announcement with the ID 634.

Example data

  • an_id=634: ID of the announcement

Request

curl --user <user>:<password> --data "an_id=634" http://<callisto>/Applications/inbound/<MAGroup>/rest/announcements/deleteAnnouncement.asp

Response

<Callisto>
    <Request>deleteAnnouncements</Request>
    <Response>OK</Response>
</Callisto>

editAnnouncement

HTTP request methods: POST; GET

Edit the file name of a present announcement.

Parameters

an_id Mandatory. The ID of the announcement.
an_wave Mandatory. New file name to apply.

Response

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

OK: The announcement was edited successfully.
PARAMETER_MISSING: One or both mandatory parameters are missing.
INVALID_ANNOUNCEMENT_ID: No announcement with the given ID exists.
ERROR: Unknown error.

Example: Rename the announcement with the ID 634 to welcome.wav

Example data

an_id=634: ID of the announcement
an_wave=welcome.wav: New file name to use

Request

curl --user <user>:<password> --data "an_id=634&an_wave=welcome.wav" http://<callisto>/Applications/inbound/<MAGroup>/rest/announcements/editAnnouncement.asp

Response

<Callisto>
    <Request>editAnnouncements</Request>
    <Response>OK</Response>
</Callisto>

getAnnouncements

HTTP request methods: POST; GET

Retrieve all announcements of a group.

Parameters

gr_id Mandatory. The ID of the group.

Response

The <Response> element contains an <announcement> element for every available announcement. Each <announcement> element contains the following three child elements:

<id>: The ID of the announcement.
<wave>: The file name of the associated wave file.
<priority>: The priority assigned to the announcement.

If no data can be retreived, the <Response> element contains the status of the executed action. The following three statuses are possible:

PARAMETER_MISSING: The mandatory parameter is missing.
INVALID_GROUP_ID: No group with the given ID exists.
ERROR: Unknown error.

Example: Retrieve the metadata of all announcements saved in the group with the ID 2504.

Example data

  • gr_id=2504: ID of the group

Request

curl --user <user>:<password> --data "gr_id=2504" http://<callisto>/Applications/inbound/<MAGroup>/rest/announcements/getAnnouncements.asp

Response

<Callisto>
    <Request>getAnnouncements</Request>
    <Response>
        <announcement>
            <id>19</id>
            <wave>welcome.wav</wave>
            <priority>1</priority>
        </announcement>
        <announcement>
            <id>22</id>
            <wave>music_synth.wav</wave>
            <priority>3</priority>
        </announcement>
        <announcement>
            <id>23</id>
            <wave>busy.wav</wave>
            <priority>2</priority>
        </announcement>
        <announcement>
            <id>24</id>
            <wave>music_folk.wav</wave>
            <priority>4</priority>
        </announcement>
    </Response>
</Callisto>

reorderAnnouncements

HTTP request methods: POST; GET

Change the order/priority of an announcement.

Parameters

an_id Mandatory. The ID of the announcement to reorder.
move Mandatory. The priority of the announcement is increased or decreased based on this value. Takes the values up or down.

Response

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

OK: The announcement was reordered successfully.
PARAMETER_MISSING: The mandatory parameter is missing.
INVALID_ANNOUNCEMENT_ID: No announcement with the given ID exists.
ERROR: Unknown error.

Example: Move the announcement with the ID 634 up in the announcements list.

Example data

an_id=634: ID of the announcement
move=up: Command to increase the announcement’s priority

Request

curl --user <user>:<password> --data "an_id=634&move=up" http://<callisto>/Applications/inbound/<MAGroup>/rest/announcements/reorderAnnouncements.asp

Response

<Callisto>
    <Request>reorderAnnouncements</Request>
    <Response>OK</Response>
</Callisto>