Retrive virtual receptionists

GET /virtual_receptionist/list
Retrieves a list of virtual receptionists.

Request

Placeholders
  • access_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    optional

    The pagesize of paging.
  • sort_by

    enum

    optional

    Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.

Sample Request

https://example.com/api/virtual_receptionist/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT

Response

Placeholders
  • pagination

    integer

    required

    The pagination of paging.
  • pagesize

    integer

    optional

    The pagesize of paging.
  • sort_by

    enum

    optional

    Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
  • page_count

    integer

    required

    The total count of pages.
  • count

    integer

    required

    Current pagesize.
  • virtual_receptionists

    array

    required

    The virtual receptionists.
    Show child attributes

Sample Response

{
    "pagination": 1,
    "pagesize": 100,
    "sort_by": "DEFAULT",
    "page_count": 100,
    "count": 100,
    "virtual_receptionists": [
        {
            "virtual_receptionist_number": "101",
            "name": "vr101",
            "status": "ONLINE"
        }
    ]
}

Add a virtual receptionist

POST /virtual_receptionist/create
Adds a new virtual receptionist.

Request

Placeholders
  • access_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    The name of virtual receptionist.
  • virtual_receptionist_number

    string

    required

    Extension number for Virtual Receptionist. NOTE: It MUST be a non-existent extension.
  • prompt

    string

    optional

    Audio prompt file. The file must be in PCM, 8kHz, 16bit, or Mono format. .mp3 is not supported.
  • language

    string

    required

    Default Audio prompt file's language.
  • gap_time

    integer

    required

    Gap time between DTMF digits.
  • key0

    object

    optional

    Show child attributes
  • key1

    object

    optional

    Show child attributes
  • key2

    object

    optional

    Show child attributes
  • key3

    object

    optional

    Show child attributes
  • key4

    object

    optional

    Show child attributes
  • key5

    object

    optional

    Show child attributes
  • key6

    object

    optional

    Show child attributes
  • key7

    object

    optional

    Show child attributes
  • key8

    object

    optional

    Show child attributes
  • key9

    object

    optional

    Show child attributes
  • timeout

    object

    optional

    Show child attributes
  • key10

    object

    optional

    Show child attributes

Sample Request

{
    "access_token": "196ACE20C6F34027895F7F95402BB164",
    "virtual_receptionist_number": "101",
    "name": "vr101",
    "status": "ONLINE",
    "prompt": "sample.wav",
    "language": "en-us",
    "play_count": 3,
    "gap_time": 2,
    "key0": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key1": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key2": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key3": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key4": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key5": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key6": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key7": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key8": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key9": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "timeout": {
        "timeout": 30,
        "action": "END_CALL",
        "extension_number": ""
    },
    "key10": {
        "action": "END_CALL",
        "extension_number": ""
    }
}

Response

Placeholders

Sample Response

Update settings for virtual receptionist

POST /virtual_receptionist/update
Update settings for virtual receptionist.

Request

Placeholders
  • access_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • name

    string

    required

    The name of virtual receptionist.
  • virtual_receptionist_number

    string

    required

    Extension number for Virtual Receptionist. NOTE: It MUST be a non-existent extension.
  • prompt

    string

    optional

    Audio prompt file. The file must be in PCM, 8kHz, 16bit, or Mono format. .mp3 is not supported.
  • language

    string

    required

    Default Audio prompt file's language.
  • gap_time

    integer

    required

    Gap time between DTMF digits.
  • key0

    object

    optional

    Show child attributes
  • key1

    object

    optional

    Show child attributes
  • key2

    object

    optional

    Show child attributes
  • key3

    object

    optional

    Show child attributes
  • key4

    object

    optional

    Show child attributes
  • key5

    object

    optional

    Show child attributes
  • key6

    object

    optional

    Show child attributes
  • key7

    object

    optional

    Show child attributes
  • key8

    object

    optional

    Show child attributes
  • key9

    object

    optional

    Show child attributes
  • timeout

    object

    optional

    Show child attributes
  • key10

    object

    optional

    Show child attributes

Sample Request

{
    "access_token": "196ACE20C6F34027895F7F95402BB164",
    "virtual_receptionist_number": "101",
    "name": "vr101",
    "status": "ONLINE",
    "prompt": "sample.wav",
    "language": "en-us",
    "play_count": 3,
    "gap_time": 2,
    "key0": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key1": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key2": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key3": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key4": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key5": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key6": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key7": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key8": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key9": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "timeout": {
        "timeout": 30,
        "action": "END_CALL",
        "extension_number": ""
    },
    "key10": {
        "action": "END_CALL",
        "extension_number": ""
    }
}

Response

Placeholders

Sample Response

Retrive settings for virtual receptionist

POST /virtual_receptionist/show
Obtains the settings of an added virtual receptionist.

Request

Placeholders
  • access_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • virtual_receptionist_number

    string

    required

    Extension number for Virtual Receptionist of which the information to be obtained.

Sample Request

{
    "access_token": "196ACE20C6F34027895F7F95402BB164",
    "virtual_receptionist_number": "vr001"
}

Response

Placeholders
  • name

    string

    required

    The name of virtual receptionist.
  • virtual_receptionist_number

    string

    required

    Extension number for Virtual Receptionist. NOTE: It MUST be a non-existent extension.
  • prompt

    string

    optional

    Audio prompt file. The file must be in PCM, 8kHz, 16bit, or Mono format. .mp3 is not supported.
  • language

    string

    required

    Default Audio prompt file's language.
  • gap_time

    integer

    required

    Gap time between DTMF digits.
  • key0

    object

    optional

    Show child attributes
  • key1

    object

    optional

    Show child attributes
  • key2

    object

    optional

    Show child attributes
  • key3

    object

    optional

    Show child attributes
  • key4

    object

    optional

    Show child attributes
  • key5

    object

    optional

    Show child attributes
  • key6

    object

    optional

    Show child attributes
  • key7

    object

    optional

    Show child attributes
  • key8

    object

    optional

    Show child attributes
  • key9

    object

    optional

    Show child attributes
  • timeout

    object

    optional

    Show child attributes
  • key10

    object

    optional

    Show child attributes

Sample Response

{
    "virtual_receptionist_number": "101",
    "name": "vr101",
    "status": "ONLINE",
    "prompt": "sample.wav",
    "language": "en-us",
    "play_count": 3,
    "gap_time": 2,
    "key0": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key1": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key2": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key3": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key4": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key5": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key6": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key7": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key8": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "key9": {
        "user_input": "1#",
        "action": "END_CALL",
        "extension_number": ""
    },
    "timeout": {
        "timeout": 30,
        "action": "END_CALL",
        "extension_number": ""
    },
    "key10": {
        "action": "END_CALL",
        "extension_number": ""
    }
}

Remove virtual receptionist

POST /virtual_receptionist/destroy
Delete a certain virtual receptionist.

Request

Placeholders
  • access_token

    string

    required

    Access token is a 32-byte string with validity of 30 seconds.
  • virtual_receptionist_number

    string

    required

    Extension number for Virtual Receptionist to be deleted.

Sample Request

{
    "access_token": "196ACE20C6F34027895F7F95402BB164",
    "virtual_receptionist_number": "123"
}

Response

Placeholders

Sample Response

Update a virtual receptionist audio data

POST /virtual_receptionist/audio_prompt_file/update

Request

"curl -H "username: admin" -H "password: admin" -H "number: 300" --form "fileupload=@transfer.wav" http://yourip:8899/api/virtual_receptionist/audio_prompt_file/update"

Sample Request

Response

Placeholders

Sample Response