...
The user must have permission to handle callbacks from a list
The user must send REST API request before making the call indicating the next call is a callback call
The call must arrive at the EnreachVoice call control system within 10 seconds after the REST API request.
Make callback calls with embedded webphone
Example of how to make callback call with embedded webphone
Code Block | ||
---|---|---|
| ||
const webrtc = document.querySelector('webrtc-client-ui'); // Notify backend that the next call is callbackcall webrtc.makeAPICall('POST','/users/[ME]/features/callout/activate/',{ "TargetNumber": "+123456789", "CallbackRequestId": "11111111-1111-1111-111111111111", "CallbackListId": "22222222-2222-2222-2222-222222222222" }); // After 1 sec delay, place the actual call. setTimeout(() => { webrtc.call('+123456789') },1000); |
Make callback calls with mobile via click-to-call
If the user has EnrachVoice mobile subscription and mobile app installed, it is possible to make callback calls with mobile phone utilizing REST API click-to-call endpoint
Code Block |
---|
// Invoke REST API to notify backend that the next call is callbackcall
POST /users/me/features/callout/activate/
{
"TargetNumber": "+123456789",
"CallbackRequestId": "11111111-1111-1111-111111111111",
"CallbackListId": "22222222-2222-2222-2222-222222222222"
}
// Invoke REST API to initiate mobile call to number
POST /users/me//action/mobile/call/
{
"PhoneNumber": "+123456789"
} |