How to use API

Please see the Activity Diagram (control and data flows) of StartCallRequest dispatch here

Also it worth taking a look at the diagram of expected behavior of VoIP Provider service (here)

All event dispatch requests should be signed and validated by each party. How it should be done explained here.

The JSON API documentation is also available:
CallAborted
CallCompleted
CallRecordingReady
CallStarted
StartCallRequest
BatchRequest
AddListToCampaign
SendLeadStatus

If you use some sort of code generation tool you might want to grab the JSON schema for the request object.

Testing

Register message listener with the VoIP Cloud

POST http://lv-voip.com/api/webhooksregistrations/voip_provider_user HTTP/1.1
Content-Type: application/json; charset=utf-8
Accept: application/json

{
    "WebHookUri": "<the URL where the message should be dispatched>", 
    "Description":"cheers", 
    "Secret": "<secret provided by Leverate>", 
    "Filters": ["started"] 
}

Dispatch StartCallRequest to

POST http://lv-voip.com/api/calls/testcall?user=voip_provider_user HTTP/1.1

VoIP cloud will send the request back to the URI registered for the particular user.

The call state events can be sent to

POST http://lv-voip.com/api/webhooks/incoming/voip/voip_provider_user HTTP/1.1