GET/Voicemail

Function


The GET/voicemail method returns a list of voicemail messages for a particular mailbox. 


Each listed message includes the following fields of information:


  • ID - a particular number identifying the message.
  • time - the time the message was recorded (in Unix timestamp format).
  • duration - its duration (in seconds).
  • mailbox - the number of the mailbox the message was left on.
  • caller - the number of the caller.
  • callerid - the caller ID of the caller.
  • callerid_ext - the extension of the caller (if call was internal).
  • name - the file name of the voicemail - this name is generated by the system and is important for the get/voicemail/file method.
  • dir - the directory of the message (either INBOX or SENT).
  • read_by - the name of the user who read ( (listened to) the message, if any.


Parameters


All parameters go in the header.


ParameterTypeOperation
mailboxstringIndicate the number for the mailbox for which you want to have messages listed.
descending
BooleanUse this to sort the list in descending order
dirstringThe directory for which the messages will be listed, either INBOX or SENT
*startintegerThe  starting time for displaying the messages in Unix time.
*end
integer
The ending time for displaying the messages in Unix time.
limit
integer
Specify the number of voicemails to be returned by the request.
offset
integer
Specify the first voicemails to display. For example an offset of 3 will start the list on the 3rd voicemails. If left empty the default will be the first record.


*Use start=0 and end=-1 to display all voicemails.


Example


To show all messages for mailbox 113840 in a descending order use this syntax:


HTTP method: GET


webserv.telebroad.com/api/teleconsole/rest/voicemail?descending=1&end=-1&mailbox=1113840&start=0


Response:


{"error": null,
    "result": [
            {"id": "5958165",
            "time": "1505418688",
            "duration": "3",
            "mailbox": "1113840",
            "caller": "MATTS PIZZA",
            "callerid": "16314738423",
            "callerid_ext": "16314738423",
            "name": "voicemail_1505418688_

            150541868614908555_28702_16314738423_3",
            "dir": "INBOX",
            "read_by": ""
        },
        {
            "id": "5669393",
            "time": "1503057081",
            "duration": "107",
            "mailbox": "1113840",
            "caller": "1113839",
            "callerid": "1113839",
            "callerid_ext": "16466991356",
            "name": "voicemail_1503057081_

            150305707213249452_20513_1113839_107",
            "dir": "INBOX",
            "read_by": ""
        }   

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.