Play File
The play action will play the audio file to the caller, by greeting the caller with specific pre-recorded music or playing the music while the caller is on hold. PIOPIY supports both mp3 and wav file formats.
Prerequisites
Sign up for a free PIOPIY demo account.
Create your endpoint and add capacity.
Buy PIOPIY phone number.
Setup your webserver and map your POST method URL in answer URL.
Play action JSON
[{"action": "play","file_name": "welcome_11112.mp3"}]
Properties
Property | Type | Description |
---|---|---|
*action | string | The PCMO action to control the flow of the call. |
*file_name (or) file_url | string | The file_name will play the audio file from TeleCMI cloud CDN, and the file_url will play the audio file from your own cloud CDN. |
Sample JSON Response
Your web server will get a sample response from PIOPIY Platform as given below for incoming call.
{action: 'inbound',from: '19170000001',to: '19170000000',time: 1670568234000,cmiuuid: '28b9fc5f-b147-47e1-80a4-1edf1339efe1'}
Properties
These are the list of properties and its description
Property | Type | Description |
---|---|---|
action | string | Direction of this call |
from | number | The number who made a call |
to | string | Your PIOPIY phone number |
time | string | Timestamp of this call |
cmiuuid | string | A unique identifier of this call |
Note
The * marked property is mandatory.
HTTP status codes
TeleCMI API platform represents the following status code to identity the errors.
Status code | Status code | Description |
---|---|---|
404 | Error | Invalid music filename |