Aller au contenu

Outbound calls

Ce contenu n’est pas encore disponible dans votre langue.

AI4CALL supports two outbound modes. Both are API requests from your application to AI4CALL.

Endpoint Route used for the call Requirement
POST /webhook/outbound_call AI4CALL VoIP trunks callerId is an AI4CALL demo or purchased number
POST /webhook/outbound_call_pbx Your PBX ipPbx is authorized for the account

Use the camelCase request names for new integrations: assistantApiKey, addPrompt, callResultUrl, ipPbx, and sipPort. The legacy names remain accepted to avoid breaking older integrations.

{
"dst": "+390212345678",
"callerId": "+390212300000",
"assistantApiKey": "<ASSISTANT_API_KEY>",
"callResultUrl": "https://example.com/webhooks/call-result"
}

Provide callResultUrl to receive the terminal dialstatus and duration. The result callback does not include a transcript. If its CDR is not persisted yet, query the status with the internal_id:

Terminal window
curl 'https://outcall.ai4call.com/getDialstatus/<INTERNAL_ID>' \
-H "X-APIKEY-SECRET-AI4CALL: $OUTBOUND_API_KEY"
{
"dialStatus": "ANSWER",
"billSec": 42,
"trafficCost": "0.003300"
}

The endpoint returns 404 while the CDR is not yet persisted; retry with a bounded delay.