Docs/Guides
Troubleshooting
Find out why a call did not go the way you expected. Most answers are one log line away.
First checks
The installer adds a ninja-talk command on the gateway machine. Start with these:
ninja-talk status # is the service running
ninja-talk doctor # quick health checks
ninja-talk version # install details (on a Mac, the installed version)
curl -s http://127.0.0.1:3335/
A running gateway answers the last one with {"service":"ninja-talk","version":"...","status":"ok"}, which is how to read the running version on Linux. Port 3335 is the default; a server running several agents gives each its own port (NINJA_TALK_PORT in that agent's .env).
To read the log on Linux, ninja-talk logs -n 300 shows the last 300 lines and ninja-talk logs -f follows it live. On a Mac, use ninja-talk logs or ninja-talk logs -f. Every line is tagged by component, such as [ninja-talk:calls], so grep works well:
ninja-talk logs -n 500 | grep "ninja-talk:calls"
Calls are rejected or never answered
When the gateway turns a call away, it logs why under [ninja-talk:calls]:
| Log line | Cause and fix |
|---|---|
Private mode: caller not on whitelist | The agent is in private mode and only takes calls from the owner's number. Switch it to public in the dashboard, or set the owner phone to the number you are calling from, with country code. |
Private mode: OWNER_PHONE not configured | Private mode with no owner phone set. Set one, or switch to public. |
At capacity, rejecting call | The agent's simultaneous-call limit (2 by default) is in use. Ask us to raise it if you regularly need more. |
per-ANI rate limit hit | The same caller number called more than 20 times in an hour (withheld numbers share a limit of 5 per hour). Common when testing from one phone; the limit can be changed in config.json (below). |
deployment is outbound-only | The agent's call direction is set to outbound only. Change it in the dashboard. |
number is on the blocklist | The caller's number is blocked for this agent. |
cloud prompts not ready | The gateway has not loaded its instructions from the platform yet. Give it a minute after a start, check the server can reach the internet, then ninja-talk restart. |
gateway is draining | The gateway was restarting or updating. Calls resume when it is back. |
To change the per-caller limit, set features.aniRateLimitPerHour in the gateway's config.json and restart. See Setup and configuration.
Settings changed in the dashboard (call mode, owner phone, direction, greeting) reach the gateway within about five minutes. ninja-talk sync pulls them immediately and restarts.
Outbound calls fail
A Voice API request that fails returns a problem+json body whose type names the cause. The full table is in the Voice API overview. The common ones:
| Response | Fix |
|---|---|
400 missing-idempotency-key | Add an Idempotency-Key header to every POST and PUT. |
400 validation-failed | Read detail: it names the field, such as a number not in E.164, both purpose and task, a script that is not published, or a missing required fact. |
403 insufficient-scope | The key needs voice:call. |
403 voice-country-blocked | Add the destination country in your agent's Outbound countries setting. By default it holds your number's own country and the United States. |
404 not-found | from is not an active number of an agent this key is scoped to. |
409 agent-offline | The gateway is not checking in. Run the first checks above. |
429 rate-limit-exceeded | 5 calls per hour to one number, 30 per hour or 100 per day per agent. Wait, then retry with a new Idempotency-Key. |
If the API returned 200 but the phone never rang, look for Outbound: at capacity in the log: both lines were busy when the dial started. Pace your calls.
The agent ignores its playbook
The playbook is read from the agent's workspace, by default protocols/dojo-voice-agent-playbook.md. After a call, the gateway logs what it loaded:
ninja-talk logs -n 300 | grep -E "System instruction built|voice playbook"
"hasPlaybook":truein theSystem instruction builtline means it was loaded.No voice playbook foundmeans the file is not where the gateway looks. The workspace path is printed at startup (Workspace: ...).Voice playbook rejected (symlink),(not a regular file)or(over size cap): the playbook must be a real file, not a link, and within the size limit.- A custom path set in
config.json(context.voicePlaybook) must be a.mdfile inside the workspace. If it is not, the log saysIgnoring NINJA_TALK_VOICE_PLAYBOOKand the default is used. Restart after changing it.
The agent's name and personality come from SOUL.md and IDENTITY.md in the same workspace, not from the gateway's install folder. Editing copies elsewhere has no effect.
The gateway will not start
Run ninja-talk status and read the last log lines. Common causes:
| Error | Fix |
|---|---|
EADDRINUSE | Something else holds the port. Find it with sudo lsof -i :3335, stop it, or set a different NINJA_TALK_PORT in .env. |
Voice API key not available | The gateway found neither its platform credentials nor a VOICE_API_KEY. If you bring your own model key, add it as VOICE_API_KEY in .env; otherwise contact us. |
ENOSPC | The disk is full. Free space with df -h as a guide, then restart. |
ninja-talk env opens the .env file (on a Mac it prints where it is). Restart with ninja-talk restart after any change to it.
Webhooks and call data
- No webhook arrives: check it is set and enabled with
GET /v1/voice/webhooks?from=.... A410from your endpoint switches it off. See Webhooks and n8n. - Transcript is null: Ship transcripts is off for the agent (Settings, Configuration, Call recording and transcripts).
- Outcome is null: the post-call evaluation has not finished. Fetch
GET /v1/voice/calls/{id}again later. - Recording returns 404: recording is off, or the call had none. Links from the recording endpoint expire after 5 minutes, so request a new one each time.
Custom tools
Tool problems have their own table in Custom tools. Start with ninja-talk logs -n 300 | grep voice-tools.
Still stuck
Send us the time of the call, the agent's number, the output of ninja-talk version, and the log lines around the call (ninja-talk logs -n 300). For API errors, include the requestId from the response. Use the contact form.