1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - GET Requests
Open navigation

GET/voicemail/file

Function


The GET/voicemail/file method returns a particular voicemail file as an Asci string encoded in Base64 format.


The returned response Include the following fields of information:


  • name - the name the voicemail's audio file.
  • data - the actual audio of the voicemail delivered as a text string encoded in base64 format.
  • mimetype - the format of the audio file. This is always defined as "audio\/x-wav"

You can convert the data into actual audio with any online base64 to wav convertor, such as this one:


http://www.motobit.com/util/base64-decoder-encoder.asp


Choose "decode" and enter the output file as ".wav"


Parameters


All parameters go in the header. 


Parameter
Type
Operation
dir
string
The directory for which the messages will be listed, either INBOX or SENT
mailbox
string
Indicate the number for the mailbox from which you want to obtain the voicemail file from.
voicemail
string
The file name of the voicemail for which you want to obtain the audio data.

You get the file name from the get/voicemail method as explained here.

Example


To get the audio for a file "1500371176_15003711625275027_10142__9" from mailbox 1113840 use this syntax:


HTTPS method: GET


webserv.telebroad.com/api/teleconsole/rest/voicemail/file?dir=INBOX&file=voicemail_1500371176_15003711625275027_10142__9&&mailbox=1113840


Response:


  The data field may be dozens of pages long. Shown here is a truncated version.


{

        error":null,

        "result":{"name":"voicemail_20170718054616.wav",
                        "data":"UklGRmQnAgBXQVZFZm10IBAAAAABAAEAQ

                        B8AAIA+AAACABAAZGF0YUAnAgAIAOj\/mP+o\/\

                        /j\/SABYAEgASAA4AFgAWAAYAOj\/CAAYANj\/

                        XP8c\/zz\/2P8oADgASACEAIQAKAAIAPj\/

                        +P\/4\/+j\/CAA4ACgA2P+o\/5j\/yP8IABgA

                        CADY\/9j\/CAAYADgASAA4APj\/yP\/I\/\/j\

                        /KABoAFgAKAAIANj\/uP\/I\/+j\/GAAYAPj\/

                        6P8oADgACADo\/\/j\/GAD4\/6j\/qP\/I\/\/j\/

                        KAB4AIQAeAA4AOj\/mP+I\/7j\/uP\/I\/wgASAA

                        oAPj\/KABYADgACACo\/5j\/uP\/I\/7j\/2P8IAHg

                        AhABYADgACADY\/6j\/6P9IAEgAKAAYAAgA6P\

                        /I\/7j\/6P\/Y\/8j\/uP\/I\/\/j\/OACUAIQAKAD4\/x

                        gA6P98\/1z\/iP\/o\/8j\/qP\/Y\/xgAWABo

                        AGgAaACEAKQAeAAYAMj\/yP\/I\/9j\/6P+

                        4\/+j\/SAB4AEgA+P\/Y\/+j\/2P8IACgA2P+

                        4\/6j\/2P+4\/5j\/yP\/4\/wgAOAA4ABgACAD4\

                        /\/j\/GAAYACgA+P\/o\/ygAaABIAEgASAAYANj\

                        /fP9M\/0z\/mP\/o\/0gAhACUAFgAOAAYAOj\

                        /2P\/Y\/wgAKAAIAPj\/KAAIANj\/2P\/4\/\/j\/GADo

.

.

.

                        gASAD4\/5j\/iP\/I\/+j\/6P\/o\/\/j\/+P\/4\/\/j\/uP\/Y\/=",
"mimetype":"audio\/x-wav"
   }

 }