Receive an inbound FaceTime call in your backend
When someone calls a provisioned Chert FaceTime line, your backend can decide whether to answer and which LiveKit room to connect. That lets a support team route callers to an agent during business hours, decline outside its coverage window, or choose a different workflow for video calls.
Configure the line to ask your backend
In Workers & Lines, confirm the worker is accepting calls with fresh readiness. Configure an HTTPS integration and assign it to the line. For Bring Your Own Room, select customer_decides without a default Assistant. A published default Assistant can select the managed route. Enable signing when the receiver is ready to verify deliveries. Inbound setup.
Make the decision while the call rings
Read data.call_id, data.line_id, and data.media in call.incoming. Your receiver has five seconds by default to return a 2xx response containing an accept or decline decision. A late, missing, or invalid decision fails closed. For business-hours routing, keep the hours and line policy available locally so the decision has no dependency on a CRM response. Treat missing or null data.from as unknown and verify account ownership separately before disclosing account details. Inbound decision contract and caller identity guidance.
When the call is eligible, prepare a separate LiveKit room and agent session for its call ID. Give the agent one eligible, unmuted audio publication. Mint a separate room-scoped bridge token with a distinct identity and join, publish, and subscribe grants. Here is an example response after preparing an agent named support-agent.
{
"action": "accept",
"livekit_url": "wss://your-project.livekit.cloud",
"participant_token": "<bridge JWT for this call’s room>",
"remote_participant_identity": "support-agent"
}
For a call outside coverage hours, return {"action":"decline"} with a 2xx response. Keep the LiveKit API key and secret on your backend. Give Chert only a valid, call-scoped bridge token. Bridge token requirements.
Verify the call and clean up
On answer, the bridge publishes the caller’s audio into the room. Your agent publishes its reply there. Chert reports call.started when the call is answered and media is bridged. In a controlled test, verify a specific spoken question and reply in both directions, then hang up and confirm your application releases its agent, dispatch, and room. Exercise decline, missed deadlines, and bridge failure too, so a call that never starts cannot leave a session running. Lifecycle events and room cleanup.
Related guides
Build your first conversation.
Choose a plan, connect your agent, and test the complete flow.
Start building