# OpenLine > OpenLine is a self-hosted voice API (a small Twilio Voice alternative). An Android phone with a SIM runs the OpenLine app and connects to your OpenLine server; your code places, answers and controls real phone calls over REST, gets call events by webhook, and streams call audio over WebSockets, either joining the audio itself or letting the gateway connect the call to an AI agent (raw 16 kHz PCM or Twilio Media Streams format). Key facts: - Base URL is the user's own server (often a Tailscale Funnel or Cloudflare Tunnel address). Authenticate with `Authorization: Bearer `. - To put an AI agent on a call, pass `stream: {url, format}` to `POST /v1/calls` or `POST /v1/calls/{id}/stream`; the gateway dials out to the agent WebSocket. Closing that socket hangs up. - Call audio: 16 kHz mono s16le, 20 ms frames (640 bytes). Twilio format: 8 kHz mu-law base64 JSON. - Calls go through states queued, dialing, ringing, active, held, ended, rejected, failed. Command endpoints return 202 when the phone received the command; the state change arrives later as a webhook. Most useful pages: - [Quickstart](https://Manohar-k-Reddy.github.io/openline/start/quickstart/): run the server, pair a phone, place a call - [Connect an AI agent](https://Manohar-k-Reddy.github.io/openline/guides/agent-streams/): stream calls to your agent's WebSocket - [Stream protocol](https://Manohar-k-Reddy.github.io/openline/reference/stream-protocol/): exact raw and Twilio messages - [Webhooks](https://Manohar-k-Reddy.github.io/openline/guides/webhooks/): payload, signature verification, retries - [Call states and events](https://Manohar-k-Reddy.github.io/openline/reference/call-states/) - [OpenAPI spec](https://Manohar-k-Reddy.github.io/openline/openapi.yaml): every endpoint and schema ## Documentation Sets - [Abridged documentation](https://manohar-k-reddy.github.io/openline/llms-small.txt): a compact version of the documentation for OpenLine, with non-essential content removed - [Complete documentation](https://manohar-k-reddy.github.io/openline/llms-full.txt): the full documentation for OpenLine ## Notes - The complete documentation includes all content from the official documentation - The content is automatically generated from the same source as the official documentation