feat(ines/vapi): VapiClient + VapiAssistantService + VapiCallOutbound
Vapi Backend — identique VoxAI
VapiClient
- WebClient dédié (
Authorization: Bearer {api-key}) - Assistants: create/update/delete/get
- Tools: create/update/delete
- Calls: createCall/getCall/listCalls
- PhoneNumbers: list/import/update, createCredential
VapiAssistantService
-
syncAgentToVapi(PhoneAgent)→ crée ou met à jour l'assistant Vapi -
buildSystemPrompt: date + prompt + questions qualification + objections + clôture + instructions forwarding multi-destinations -
ensureForwardingTransferTool: tooltransferCallen bibliothèque Vapi-
warm-transfer-with-message+fallbackPlan - Pas de paramètre destination (évite hallucinations LLM)
-
- Auto-sync à l'activation de l'agent
VapiCallOutboundService
-
initiateOutboundCall(campaign, prospect, agent, vapiNumberId)— REQUIRES_NEW - Metadata:
userUid,agentUid,prospectUid,campaignUid→ récupérés dans webhook -
testCallsans campagne
VapiWebhookService enrichi
-
updateProspectStatusFromCallResult→ extraitprospectUiddes metadata Vapi → met à jourProspectStatus+lastCallDate+callCount
Config
-
VapiConfig:app.vapi.api-key,base-url,webhook-secret,webhook-url -
WebClientConfig: beanvapiWebClientavec headerAuthorization: Bearer