Voice Mail (/voicemail/)

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

If the call forwarding rule is finished, but the call has not been answered, it is possible to redirect the call to the voice mail. The voice mail resource allows you to: 

  • Get a list of client voicemail messages, extension number or group of extension numbers for a certain period, 

  • Get message files directly, 

  • Delete voice mail messages. 

Description of Data Structures 

The fields of the resource "Voicemail" are the same as the fields of the resource "Call Date Record (/cdr/)", but, unlike CDRs, the fields record_uuid and record_file_size may never be null

Name 

Type 

Description 

Name 

Type 

Description 

ani_number  

string 

Number from the list of incoming client numbers 

application  

string 

Application describing the call type. May have value callcenter, callback, intercept, or null 

call_uuid  

string 

Unique call identifier 

client_owner_id 

long 

Identifier of the client that is the message owner 

dest_domain 

string 

Call destination domain 

dest_number 

string 

Call destination number 

did_domain 

string 

External number domain 

did_number 

string 

External number 

duration 

long 

Call duration 

ext_number_reg 

string 

Registered external number 

extension_group_owner_id 

long 

Identifier of the extension number group that owns the message 

extension_id 

long 

Identifier of extension number 

extension_name 

string 

Extension number name 

extension_type 

string 

Extension number type 

flow 

string 

Call direction. May take the value in or out 

from_domain 

string 

Caller original domain 

from_screen_name 

string 

Caller original display name 

from_username 

string 

Caller original username 

hangup_cause 

string 

Call end reason 

hangup_disposition  

string 

Used to determine the disconnection initiator:  
callee_bye: the callee hung up; 
callee_bye: the caller hung up; 
caller_cancel: the caller refused to wait for an answer; 
callee_refuse: the callee refused to answer (was busy, there was no registration, etc.); 
internal_cancel: the call was terminated by the server (usually due to call timeout or if the call was answered by another extension number);  
'' (empty): failed to determine 

hangup_time_gmt 

string 

Call end time 

init_time_gmt 

string 

Call initialization time 

record_file_size 

long 

Message file size in bytes 

record_uuid 

string 

Identifier of the voice mail message 

result 

string 

Call result 

source_domain 

string 

Call source domain 

source_number 

string 

Call source number 

start_time_gmt 

string 

Call start time 

to_domain 

string 

Destination original domain 

to_username 

string 

Destination original username 

storage_url

string

Link to voicemail file

Retrieving Voice Message List 

The interval to get and to delete a list of voice mail messages is specified by the request options start_datetime and end_datetime. The time interval should be within two months. To obtain data for a longer period, you should make several requests. When getting the list, you can specify the request parameter order that specifies the direction to sort the resulting list by the field init_time_gmt

Request options 

Name 

Type 

Mandatory 

Default Value 

Name 

Type 

Mandatory 

Default Value 

start_datetime 

YYYY-MM-DD HH:MM:SS 

yes 

 

end_datetime 

YYYY-MM-DD HH:MM:SS 

yes 

 

order 

asc or desc 

no 

desc 

Example 

Let's get a list of the client voice messages for a period: 

System response: 

[] 

"Client" Section Resources 

GET /client/{client_id}/voicemail/ 

Get list of the client voice messages for the period: 

URL Options 

Name 

Type 

Name 

Type 

client_id 

string 

Request Options 

Name 

Type 

Name 

Type 

start_datetime 

string 

end_datetime 

string 

extension_group_id 

integer 

order 

string 

extension_id 

integer 

Response Fields 

Name 

Type 

Name 

Type 

ani_number  

string 

application  

string 

call_uuid  

string 

client_owner_id 

long 

dest_domain 

string 

dest_number 

string 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition  

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

record_file_size 

long 

record_uuid 

string 

result 

string 

source_domain 

string 

source_number 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string 

storage_url

string

GET /client/{client_id}/voicemail/{record_uuid} 

Get the voice message file 

URL Options 

Name 

Type 

Name 

Type 

record_uuid 

string 

client_id 

string 

DELETE /client/{client_id}/voicemail/{record_uuid} 

Delete the voice message 

URL Options 

Name 

Type 

Name 

Type 

record_uuid 

string 

client_id 

string 

"Extension Number Group" Section Resources 

GET /extension_group/{ext_group_id}/voicemail/ 

Get list of the client voice messages for the period: 

URL Options 

Name 

Type 

Name 

Type 

ext_group_id 

string 

Request Options 

Name 

Type 

Name 

Type 

end_datetime 

string 

start_datetime 

string 

order 

string 

extension_id 

integer 

Response Fields 

Name 

Type 

Name 

Type 

ani_number  

string 

application  

string 

call_uuid  

string 

client_owner_id 

long 

dest_domain 

string 

dest_number 

string 

did_domain 

string 

did_number 

string 

duration 

long 

ext_number_reg 

string 

extension_group_owner_id 

long 

extension_id 

long 

extension_name 

string 

extension_type 

string 

flow 

string 

from_domain 

string 

from_screen_name 

string 

from_username 

string 

hangup_cause 

string 

hangup_disposition  

string 

hangup_time_gmt 

string 

init_time_gmt 

string 

record_file_size 

long 

record_uuid 

string 

result 

string 

source_domain 

string 

source_number 

string 

start_time_gmt 

string 

to_domain 

string 

to_username 

string 

storage_url

string

"Extension Number" Section Resources