Powered by OpenAI Realtime API
When someone calls your number and no outbound call is pending, the AI will pick up and follow this script.
POST /api/call
{ "name": "Anubhav", "number": "9876543210", "context": "..." }
Response: { "code": "ABC123" }
GET /api/call/ABC123
Response (running):
{ "code": "ABC123", "status": "running", "name": "Anubhav", "number": "+919876543210" }
Response (complete):
{
"code": "ABC123",
"status": "complete",
"transcript": [
{"role": "agent", "text": "...", "time": "..."},
{"role": "customer", "text": "...", "time": "..."}
],
"summary": "...",
"outcome": "...",
"sentiment": "...",
"duration_seconds": 45,
"direction": "outbound"
}
GET /api/inbound
Response:
{ "enabled": true, "agent_name": "Maya", "context": "...", "updated_at": "..." }
POST /api/inbound
{ "enabled": true, "agent_name": "Maya", "context": "Your script here..." }
Response: { "status": "saved", ... }
When inbound is enabled, any call that doesn't match a pending outbound will use the configured script. Inbound calls appear in history with direction: "inbound".