wss://api.callerapi.com/api/voice/filter/stream?key=YOUR_KEYparams object of the start message. A value in the start message wins over the URL.| Parameter | Values | Default | Meaning |
|---|---|---|---|
webhook | HTTPS URL | none | Receives events. HTTP URLs are ignored. |
language | BCP-47 code, for example en | auto | Transcription hint. Set it when you know the language. |
report | true or false | false | Files the caller when the final level is scam. |
401 when the key is missing or wrong. It is refused with 503 when live_filter is false or when this node is at its live session limit. On 503, retry on a new connection.{
"type": "start",
"call_id": "your-call-id",
"from": "+15559990000",
"to": "+15551234567",
"sample_rate": 8000,
"encoding": "pcm16",
"params": {
"webhook": "https://example.com/callerapi-voice",
"language": "en",
"report": "false"
}
}| Field | Required | Notes |
|---|---|---|
type | yes | Always start. |
call_id | no | Your identifier for the call. It is echoed in every event and stored with the session. Use the SIP Call-ID or your CDR key. |
from | for report | Caller number in E.164 with a leading +. The block action uses it. Without it, only callback numbers can be filed. |
to | no | Called number in E.164. |
sample_rate | no | 8000 to 48000. Default 8000. |
encoding | no | pcm16 (16-bit little-endian, default) or mulaw (G.711 mu-law). |
params | no | Same keys as the URL parameters. Values are strings. |
from from P-Asserted-Identity when the trunk sends it, then from From. Normalize it to E.164 before you send it.pcm16 at 8 kHz and 64 kbit/s for mulaw. If your switch already has G.711 mu-law, send it as mulaw and skip the transcode.type field. The filter never sends binary frames.type | When | Extra fields |
|---|---|---|
session.started | The start message was accepted. | |
transcript.line | One utterance is final. | speaker, text |
verdict | The score changed enough to matter. | verdict |
session.ended | The call ended and the final analysis is done. | verdict, intel, transcript, duration_seconds, reported, reported_numbers |
session_id, kind, call_id, from, to, and at. Store session_id. It is the key for Get one session. Full details are on Events and webhooks.level field. Decide once per level and keep it simple.| Level | Score | Suggested action |
|---|---|---|
clean | below 0.3 | Nothing. |
suspicious | 0.3 to 0.59 | Tag the CDR. |
likely_scam | 0.6 to 0.84 | Warn the called party. Consider recording. |
scam | 0.85 and above | Warn or drop the call. |
{"type": "dtmf", "digit": "1"}intel.dtmf. A caller who asks the victim to "press 1 to speak to an agent" leaves a trace this way.{"type": "stop"} or close the socket. The server then:report=true and the final level is scam.session.ended on the socket and to the webhook.session.ended, or read it from the webhook, or read it later from Get one session.webhook to an HTTPS URL on your own backend and act on events there. The server posts every event except transcript.line.X-Voice-Signature on every post. Events and webhooks has the header list and verification code.report=true only after you have watched verdicts on your own traffic for a few days. Filing is consequential. See Block a caller.