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:
|
| 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:
|
| volume | No | Integer | The playback volume. Valid value: 0-20 |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
|
| errmsg | String | Returned message.
|
| call_id | String | The unique ID of the call. |
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",
"call_id": "1720428856.000010"
}