goit
Outbound call queue integration for GoIT.
Flow
- External caller POSTs phone numbers (single or bulk) to this integration.
- Numbers are enqueued into
goit_calls(D1). - The queue dispatches up to
concurrency_limitcalls at a time viaPlatformApiClient.originateCall. - Voice Assistant posts
media_start/media_endevents back to/webhook/call-events. Onmedia_endthe queue releases a slot and starts the next queued call (or schedules a retry if the call was too short). - The hourly
retrycron processespending_retrycalls inside retry windows and picks up any leftover queued numbers.
GoIT configures their own before-call / post-call webhooks directly in the Voice Assistant platform — this integration only originates calls and tracks queue state.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /webhook/call-originate | Enqueue one phone number |
| POST | /webhook/call-originate-bulk | Enqueue a batch (up to 1000+) |
| POST | /webhook/call-events | media_start / media_end from Voice Assistant |
POST /webhook/call-originate
json
{ "phone_number": "+380991234567" }POST /webhook/call-originate-bulk
json
{ "phone_numbers": ["+380991234567", "+380991234568", "..."] }Response contains per-number result plus aggregate counters (queued, started, deduplicated, invalid, failed).
Secrets
| Key | Purpose |
|---|---|
PLATFORM_ASSISTANT_ID | Voice Assistant agent ID used for outbound calls |
Platform URL and access token come from the shared env (PLATFORM_API_URL, PLATFORM_ACCESS_TOKEN).
KV config
Set via /setup or admin UI (keys live in goit_* KV namespace).
| Key | Default | Notes |
|---|---|---|
call_handling.concurrency_limit | 3 | Max calls in parallel |
call_handling.failed_call_duration_threshold | 5 | Seconds; calls shorter than this are retried |
retry.max_attempts | 3 | Max retry attempts per number |
retry.windows | [10:40, 13:40, 16:40] | Times of day when retries fire |
DB
Single table goit_calls, generated by generateCallsMigration("goit") from @happ-integ/call-queue. Apply migrations via POST /goit/setup.