Scenario: Status Watcher
Complete Scenario

The scenario accepts a Cloudonix provided status update, as per the REST API - Session Data Model. Here is a sample of what the content of the web hook may look like:
[
{
"id": 11531480,
"domainId": 809,
"domain": "cloudonix-demo-customer.cloudonix.net",
"subscriberId": null,
"destination": "1212121212",
"callerId": "1313131313",
"direction": "application",
"token": "aa9d853f76c6466ebfe782b830b0b119",
"createdAt": "2024-12-10T11:06:14Z",
"modifiedAt": "2024-12-10T11:06:39Z",
"timeLimit": null,
"status": "connected",
"vappServer": "172.24.41.217",
"callback": "https://hook.eu1.make.com/j1154qs97sjspv9kpb3b8r9orvruxwnv?queueId=rec0BZgAUDjFK7x26",
"callStartTime": 1733828774144,
"startTime": "2024-12-10T11:06:14.144Z",
"callAnswerTime": 1733828782599,
"answerTime": "2024-12-10T11:06:22.599Z",
"profile": {
"app-call-data": {
"cxml": "<Response>\n <Pause length=\"1\" answer=\"true\" />\n <Dial callerId=\"1212121212\">1313131313</Dial>\n</Response>",
"wait": "connected",
"timeout": 60,
"record": false,
"recordingStatusCallbackMethod": "POST",
"recordingStatusCallbackEvent": [
"completed"
],
"trim": "trim-silence",
"machineDetectionTimeout": 30,
"machineDetectionSpeechThreshold": 2400,
"machineDetectionSpeechEndThreshold": 1200,
"machineDetectionSilenceTimeout": 5000,
"asyncAmd": false,
"asyncAmdStatusCallback": "",
"asyncAmdStatusCallbackMethod": "POST"
},
"callId": [
"ab2ec074-469b-43f4-a9c4-11c6ba594f7b",
"5cfbc86b-7536-4818-9dcf-e1f051eafd9d",
"d4ff8581-3dd0-4f62-a22c-5c61ca820bef"
],
"destination-types": [
{
"SIP/uri1@border.prod2.cloudonix.io": "alphanumeric"
},
{
"SIP/uri1@border.prod2.cloudonix.io": "alphanumeric"
}
],
"terminating-trunk-id": 653,
"terminating-trunk": {
"id": 653,
"tenantId": 177177,
"domainId": 809177,
"name": "outbound-trunk1",
"ip": "outbound-trunk.example.com",
"port": 5060,
"active": true,
"transport": "udp",
"prefix": "",
"direction": "public-outbound",
"profile": {
"hostname": null,
"ruri-domain": null,
"connection-timeout": null,
"provisional-timeout": null,
"headers": {}
},
"requestDomain": "outbound-trunk.example.com"
},
"application": [
{
"time": "2024-12-10T11:06:22Z",
"url": "",
"source": "<Response>\n <Pause length=\"1\" answer=\"true\" />\n <Dial callerId=\"1212121212\">1313131313</Dial>\n</Response>",
"context": "applicationCall"
}
]
},
"lastError": "",
"log": [
{
"time": "2024-12-10T11:06:14Z",
"url": "http://api.cloudonix.io/calls/cloudonix-demo-customer.cloudonix.net/application",
"source": "<Log><Principal>1:voiceai-domain-key</Principal><Message>Creating outbound application call</Message><Request>POST http://api.cloudonix.io/calls/cloudonix-demo-customer.cloudonix.net/application</Request><Body>{\"cxml\":\"<Response>\\n <Pause length=\\\"1\\\" answer=\\\"true\\\" />\\n <Dial callerId=\\\"1212121212\\\">1313131313</Dial>\\n</Response>\",\"timeout\":60,\"callback\":\"https://hook.eu1.make.com/j1154qs97sjspv9kpb3b8r9orvruxwnv?queueId=rec0BZgAUDjFK7x26\",\"caller-id\":\"1212121212\",\"destination\":\"1313131313\"}</Body></Log>",
"context": "api"
},
{
"time": "2024-12-10T11:06:22Z",
"url": "",
"source": "<Response>\n <Pause length=\"1\" answer=\"true\" />\n <Dial callerId=\"1212121212\">1313131313</Dial>\n</Response>",
"context": "applicationCall"
}
],
"errors": [
],
"action": "updated",
"reason": "vapp",
"eventId": "e3292502-98ae-48fc-b8fe-6eaba052fa00",
"queueId": "rec0BZgAUDjFK7x26"
}
]