Receive incoming calls

Accept or reject calls routed to your tenant and connect their audio to your application.

Open developer playground

Configure inbound routing

Your phone number must be assigned to your tenant and configured for incoming routing. Connect an authenticated control session before receiving calls. There is no SESSION.BIND action in the implemented contract.

Receive a call

json
{
  "type": "CALL.INCOMING",
  "payload": {
    "call_id": "incoming-call-id",
    "from": "sip:caller@example.net",
    "to": "+15555550100",
    "timeout_ms": 30000
  }
}

Decide within the advertised timeout. The payload does not promise CNAM, attestation, enrichment, or automatic number verification.

Accept or reject

json
{
  "action": "CALL.ACCEPT",
  "payload": {
    "call_id": "incoming-call-id",
    "audio": { "sample_rate": 16000 }
  }
}

To reject instead:

json
{
  "action": "CALL.REJECT",
  "payload": { "call_id": "incoming-call-id", "status": 486 }
}

Use CALL.ACCEPT, not CALL.ANSWER. No CALL.DEFLECT command is documented by this implementation. Coordinate consumers for a tenant; do not assume multiple workers can independently claim the same incoming call.

Connect the audio

Inbound CALL.MEDIA_READY uses a nested media object:

json
{
  "type": "CALL.MEDIA_READY",
  "payload": {
    "call_id": "incoming-call-id",
    "media": {
      "ws": "wss://assigned-host/media/channel?token=REDACTED",
      "protocol": "pcm16-le-binary",
      "sample_rate": 16000
    }
  }
}

The Node starter handles both this shape and the outbound payload.url shape. Treat the URL as a credential; do not log it. Exchange binary audio frames, then send CALL.END on the control socket when your application finishes.