Quickstart
You need a Windows, macOS or Linux machine with Node.js 22.13 or newer, and an Android phone (Android 11+) with a SIM that can make calls.
1. Run the server
Section titled “1. Run the server”git clone <your fork of this repo>cd openline/servercp .env.example .envEdit .env and set HTTP_GATEWAY_API_KEY to a long random string. Then:
npm installnpm run buildnpm startOn Windows you can double-click run-server.bat instead: it does all of the above and also opens
Tailscale Funnel.
Open http://localhost:8787/. Create your account (email and password). This is the console.
2. Give it a public address
Section titled “2. Give it a public address”The phone has to reach the server from mobile data, so the server needs an https:// address.
The quickest is Tailscale Funnel:
tailscale funnel --bg 8787Copy the address it prints (like https://your-pc.your-tailnet.ts.net) into the console under
Settings → Server → Public address. Other options.
3. Pair the phone
Section titled “3. Pair the phone”- Install the OpenLine APK on the phone.
- In the console, open Connection. A QR code appears.
- In the app, work through the setup steps:
- Default phone app. Tap Set.
- Connect to your gateway. Tap Scan QR and scan the code.
- Call audio. Tap Set up, turn on Wireless debugging, tap Pair device with pairing code, and type the code into the app’s notification. This needs Wi-Fi.
- Stay online in the background. Tap Allow.
The phone appears on the Connection page as online. More on phone setup.
4. Place a call
Section titled “4. Place a call”Create an API key under Settings → API keys, then:
export OPENLINE_URL=https://your-pc.your-tailnet.ts.netexport OPENLINE_KEY=gw_...
# find your phone's idcurl -s $OPENLINE_URL/v1/devices -H "Authorization: Bearer $OPENLINE_KEY"
curl -X POST $OPENLINE_URL/v1/calls \ -H "Authorization: Bearer $OPENLINE_KEY" -H "content-type: application/json" \ -d '{"deviceId":"phone-7f3a91c2","to":"+919876543210"}'The phone dials. Watch the call in the console’s Playground, where you can also talk from your laptop. End it with:
curl -X POST $OPENLINE_URL/v1/calls/<call id>/hangup -H "Authorization: Bearer $OPENLINE_KEY"- Connect an AI agent to the call.
- Get webhooks for call events.