Play Prompt

Play custom prompts to a specific number, such as an extension number, a paging/intercom group or an external number.

Request URL

POST {base_url}/{api_path}/call/play_prompt?access_token={access_token}

Request parameters

Parameter Required Type Description
number Yes String The target number that will receive the prompt.
prompts Yes Array<String> The name of audio file(s) that will be played.
Note:
  • Only supports to play the audio files in the Custom Prompt.
  • Use a comma to separate multiple audio files.

    Example: ["test_prompt1","test_prompt2"].

count No Integer The frequency of playing audio files.
dial_permission No String If the number is an external number, you should enter an extension number that has outbound call permission.
auto_answer No String Decide whether the phone would auto answer the call.
Note: This setting only takes effect on the IP phones that support auto answer feature.
Valid value:
  • yes
  • no (Default)
volume No Integer The playback volume.

Valid value: 0-20

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

Play audio prompts to extension 2000.

POST /openapi/v1.0/call/play_prompt?access_token=X8Mjlm9aQvyOnnSAbGJWtrOFmGpkz046 HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json
{
    "number": "2000",
    "prompts": ["test_prompt1","test_prompt2"],
    "count": 1 ,
    "auto_answer": "yes",
    "volume": 20
}

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}