Play Prompt to Extension
Play a prompt to an extension user.
Endpoint
POST /api/v0.0.1/extension/playprompt?token={token}
Request Parameters
Name | Importance | Type | Description |
extid | Required | Int | The extension number. |
prompt | Required | String | Audio file name.
Note: The file name does not need to add a file suffix. The file name must contain at least a letter, and cannot contain character +. The audio file must be uploaded to the PBX’s Custom Prompt page beforehand. For multiple audio files, separate the file names with + . Example: “prompt:music1+music2” |
autoanswer | Optional | String | Whether the extension will auto answer or not.
Yes No Note: This parameter requires the SIP phone to support. |
Response Parameters
Name | Type | Description |
callid | String | An unique identifier for the call. |
Examples
Request Example
Play one prompt:
POST /api/v0.0.1/extension/playprompt?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“extid”:”101″,
“prompt”:”haruhi3″,
“autoanswer”:”no”
}
Play multiple prompts:
POST /api/v0.0.1/extension/playprompt?token=813b621cfe8eecf445a2ce1f4a079ffe HTTP/1.1
Content-Type:application/json; charset=utf-8
Host: 172.16.6.150
{
“extid”:”101″,
“prompt”:”haruhi3+xiaoshao5″,
“autoanswer”:”no”
}
Response Example
HTTP/1.1 200 OK
Access-control-allow-origin: *
Access-control-allow-methods: GET, POST, OPTIONS, PUT, DELETE
{
“status”: “Success”
}