HTTP Web flow
The HTTP web call flow is commonly used for custom call routing. This type of call routing will allow you to connect on predefined IVR, team and selected users, with a custom greeting and waiting music
Prerequisites
-
Sign up for a free TeleCMI demo account.
-
Buy a phone number.
-
Drag and drop the piopiy script to call flow tool.
-
Add your POST or GET method webserver URL in the piopiy script flow.
Sample JSON Request
Below are the following sample JSON POST or GET method request will notify you HTTP flow URL.
{
"from": 9191000000000,
"to": 911203000000,
"cmiuuid": "435e393f-a160-45cf-9691-accb6aa66b73",
"appid": 1111112
}
Sample HTTP flow JSON Response
Below are the following sample POST or GET method JSON reponse need to return TeleCMI platform.
- Single User
- Multiple User
- IVR
- Team
{
"code": 200,
"loop": 2,
"followme": false,
"hangup": false,
"timeout": 20,
"welcome_music": "1609133greeting_music.wav",
"waiting_music": "16098620waiting_music.wav",
"result": [
{
"agent_id": "101_1111112",
"phone": "91996600XXXX"
}
]
}
{
"code": 200,
"loop": 2,
"followme": false,
"hangup": false,
"timeout": 20,
"welcome_music": "1609133greeting_music.wav",
"waiting_music": "16098620waiting_music.wav",
"result": [
{
"agent_id": "101_1111112",
"phone": "91960000XXXX"
},
{
"agent_id": "102_1111112",
"phone": "91910000XXXX"
}
]
}
{
"action": "ivr",
"name": "welcome@1111112"
}
{
"action": "team",
"name": "sales_1111112"
}
Required Parameters
These are the required POST or GET method parameters with description
Parameter Name | Type | Description |
---|---|---|
*code | number | Response Code |
*action | string | The action to control the flow of the call. |
*name | string | The name of the IVR or team to connect. |
loop | number | The total number of retry, of this call. By default, the loop is 1. |
followme | boolean | If the followme value is true, a call will be initiated to the mobile device. |
hangup | boolean | If the hangup value is true, only the http script will work. |
timeout | number | The ringing time of the call will be 20 seconds; after that, the call will disconnect automatically. |
welcome_music | string | The file_name will play the audio file from TeleCMI cloud |
waiting_music | string | The file_name will play the audio file from TeleCMI cloud |
*result | JSON array |
|
Note
The * marked parameter is mandatory.