Get/Voicemail

Function


The 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 the message, if any.


Parameters:


Parameter Type Operation
mailbox string Indicate the number for the mailbox for which you want to have messages listed.
descending
boolean Use this to sort the list in descending order
dir string The directory for which the messages will be listed, either INBOX or SENT
start integer The  starting time for displaying the messages in Unix timestamp.
end
integer
The ending time for displaying the messages in Unix timestamp.


Unix timestamp is a system for describing a point in time, defined as the number of seconds that have elapsed since January 1st, 1970.


You can convert dates to Unix time stamps using an online calculator such as:


 https://www.unixtimestamp.com/


If you want to have all messages shown use start=0 and end=-1, meaning the start time will be January 1st, 1970 and the end time will be one second ago from the present. 


Example


To show all messages for mailox 113840 in a desending order use this syntext:


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


Result:

.

.

.

    {
        "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.