Tipo di evento:
CallEndedInviato ogni volta che termina una chiamata effettuata da una campagna, qualunque sia il suo risultato. Il payload contiene i dettagli della chiamata: il numero chiamato e i valori delle sue variabili, i risultati dello squillo e della risposta, le durate, i risultati delle interazioni con il destinatario (come gli input DTMF o gli obiettivi dell'agente IA), i dettagli del trasferimento, e l'outcome finale della chiamata, incluso il momento in cui verrà ritentata.
Questo è l'evento da utilizzare per aggiornare i tuoi sistemi, come un CRM, con il risultato di ogni chiamata.
Valori possibili per gli enum utilizzati nel payload:
Risultato squillo
AnswerBusyNoAnswerCallErrorTipo di risposta
HumanMachineVoicemailMessageUnknownTipo di terminazione
HangUpCallflowCompleteExecutionErrorTipo di ultima azione
TransferCallTextPromptWavPromptDtmfInputDropCallRisultato del trasferimento
ConnectedNotConnectedInterlocutore della trascrizione (A: agente IA, B: contatto)
ABTipo di agente IA
AiAgentAmdAgentEsito
SuccessFailureWithNoRetryLeftFailureWithRetryPending"transcription" viene valorizzato solo quando la chiamata ha utilizzato un agente IA con le trascrizioni abilitate; altrimenti è null. Contiene una voce per messaggio, in ordine: "at" è il momento in cui è iniziato il messaggio, in millisecondi dall'inizio della chiamata; "by" indica chi lo ha detto, A per l'agente IA o B per il contatto; e "text" è ciò che è stato detto.
"aiModelsUsage" viene valorizzato solo quando la chiamata ha utilizzato un fornitore IA (un agente conversazionale IA o un agente IA di rilevamento della segreteria); altrimenti è null. Il suo "transcriptionModel" è null quando le trascrizioni erano disattivate per la chiamata, o quando il fornitore IA non ha un modello di trascrizione separato.
"mcpServersUsage" viene valorizzato solo quando l'agente IA ha invocato almeno uno strumento di un server MCP durante la chiamata; altrimenti è null. Contiene una voce per ogni server MCP, con il numero di invocazioni riuscite e non riuscite di ciascuno dei suoi strumenti.
Payload CallEnded (v2) · Campagne Dialer di Potenza e Dialer Predittivo
{
"id": "01928322-860c-77f9-9c3b-7f8abe3b6afd",
"object": "event",
"apiVersion": 2,
"createdAt": "2024-10-12T23:48:50.824",
"type": "CallEnded",
"data": {
"customer": {
"id": "0192830c-58a0-7be2-8e3d-dc8997d0a631",
"name": "SIP Caller (Demo account)"
},
"campaign": {
"id": "0192831a-fbbe-735f-b385-a3252781817d",
"name": "Campaign 1",
"varNames": [
"Customer Name",
"Due Balance"
]
},
"callDetails": {
"callId": "01928322-32a3-7000-bf0d-bf1af7eda4c5",
"numberId": 1048165,
"prefix": "",
"number": "18035551004",
"calledNumber": "18035551004",
"varValues": [
"Stefan Robertson",
"$99.00 "
],
"attempt": 1,
"addedAt": "2024-10-12T10:05:23.452",
"phoneSystem": {
"id": "01928310-2d96-7a70-bdfc-4bcd24c22c95",
"name": "My Phone System",
"extension": {
"id": "07bcd1de-1e5d-47b5-99bf-b846c7a12f09",
"name": "SIP Caller Extension"
}
},
"queueId": "800",
"agentId": "101",
"timeZoneId": "America/Argentina/Buenos_Aires",
"startedAt": "2024-10-12T23:48:29.479",
"ringResult": "Answer",
"sipResponse": {
"code": 200,
"descrip": "OK"
},
"answeredAt": "2024-10-12T23:48:33.735",
"answerType": "Human",
"answerMessage": null,
"voicemailLeft": false,
"callflow": {
"id": "01928316-cfd7-75c7-bb6d-9128e205c53f",
"name": "Survey"
},
"endedAt": "2024-10-12T23:48:50.819",
"endType": "CallflowComplete",
"lastAction": {
"id": "535248e9-c9a2-4a15-8c1c-9d175f82ac21",
"type": "TextPrompt"
},
"duration": {
"setup": "00:00:04.256",
"connected": "00:00:17.084",
"total": "00:00:21.34"
},
"interactionResults": [
{
"id": "a6d5b2e5-6b3f-49d8-aaa3-bc7b4c693f05",
"type": "DtmfInput",
"label": "Question 1",
"value": "1"
},
{
"id": "af5fd8d6-2ed4-4546-bb50-1b4214b71f7a",
"type": "DtmfInput",
"label": "Question 2",
"value": "2"
}
],
"transcription": [
{
"at": 4512,
"by": "A",
"text": "Hello, am I speaking with Stefan Robertson?"
},
{
"at": 7983,
"by": "B",
"text": "Yes, speaking."
}
],
"aiModelsUsage": {
"agentType": "AiAgent",
"aiProvider": {
"id": "01a0b12c-58ef-754e-82a6-56e0b7d009e4",
"name": "OpenAI Provider"
},
"liveAudioModel": {
"tokens": {
"input": {
"text": 50854,
"audio": 2408
},
"output": {
"text": 193,
"audio": 521
},
"reasoning": 0,
"cachedInput": {
"text": 38912,
"audio": 1280
}
},
"modelId": "gpt-realtime",
"seconds": 47.217
},
"transcriptionModel": {
"tokens": {
"input": 1206,
"output": 87
},
"modelId": "gpt-4o-mini-transcribe",
"seconds": 31.842
}
},
"mcpServersUsage": [
{
"tools": [
{
"name": "search_crm_objects",
"failed": 0,
"succeeded": 2
},
{
"name": "update_crm_object",
"failed": 1,
"succeeded": 1
}
],
"mcpServerId": "01a0cee1-f1c1-7eda-b64e-8642ea47031a",
"mcpServerName": "Hubspot"
}
],
"outcome": "Success",
"retryAt": null
}
}
}Payload CallEnded (v2) · Campagne Dialer Progressivo
{
"id": "01928322-860c-77f9-9c3b-7f8abe3b6afd",
"object": "event",
"apiVersion": 2,
"createdAt": "2024-10-12T23:48:50.824",
"type": "CallEnded",
"data": {
"customer": {
"id": "0192830c-58a0-7be2-8e3d-dc8997d0a631",
"name": "SIP Caller (Demo account)"
},
"campaign": {
"id": "0192831a-fbbe-735f-b385-a3252781817d",
"name": "Campaign 1",
"varNames": [
"Customer Name",
"Due Balance"
]
},
"callDetails": {
"callId": "01928322-32a3-7000-bf0d-bf1af7eda4c5",
"numberId": 1048165,
"prefix": "",
"number": "18035551004",
"calledNumber": "18035551004",
"varValues": [
"Stefan Robertson",
"$99.00 "
],
"attempt": 1,
"addedAt": "2024-10-12T10:05:23.452",
"phoneSystem": {
"id": "01928310-2d96-7a70-bdfc-4bcd24c22c95",
"name": "My Phone System",
"extension": {
"id": "07bcd1de-1e5d-47b5-99bf-b846c7a12f09",
"name": "SIP Caller Extension"
}
},
"queueId": "800",
"agentId": "101",
"timeZoneId": "America/Argentina/Buenos_Aires",
"startedAt": "2024-10-12T23:48:29.479",
"ringResult": "Answer",
"sipResponse": {
"code": 200,
"descrip": "OK"
},
"answeredAt": "2024-10-12T23:48:33.735",
"answerType": "Human",
"answerMessage": null,
"voicemailLeft": false,
"callflow": {
"id": "01928316-cfd7-75c7-bb6d-9128e205c53f",
"name": "Survey"
},
"endedAt": "2024-10-12T23:48:50.819",
"endType": "CallflowComplete",
"lastAction": {
"id": "535248e9-c9a2-4a15-8c1c-9d175f82ac21",
"type": "TextPrompt"
},
"duration": {
"setup": "00:00:04.256",
"connected": "00:00:17.084",
"total": "00:00:21.34"
},
"interactionResults": [
{
"id": "a6d5b2e5-6b3f-49d8-aaa3-bc7b4c693f05",
"type": "DtmfInput",
"label": "Question 1",
"value": "1"
},
{
"id": "af5fd8d6-2ed4-4546-bb50-1b4214b71f7a",
"type": "DtmfInput",
"label": "Question 2",
"value": "2"
}
],
"transfer": {
"duration": "00:00:51.877",
"result": "NotConnected",
"connectedAt": null
},
"agent": {
"releasedAt": "2025-09-17T21:00:25.94",
"duration": {
"setup": "00:00:58.716",
"connected": "00:00:00",
"total": "00:00:58.716"
}
},
"outcome": "Success",
"retryAt": null
}
}
}