Inbound calls

Decide per call

For the most control, let your server decide what happens on each inbound call — in real time, while the phone is ringing. You can:

  • pick a different agent for each caller,
  • send a fresh agent built from your own data,
  • or reject the call.

This is how you run a product where one number serves many businesses, each with its own AI receptionist, its own prompt, and your own credit checks.

It works through the call answer webhook (call.answer). This page is the concept; the full request/response reference is in Call answer webhook.


How it works

Inbound call ─▶ EurekaConnect ─▶ POST call.answer ─▶ your server decides
                                                        │
                       ┌─────────────────────────────────┤
                       ▼                ▼                 ▼
               accept + agent     reject the call    (timeout) →
               (id or config)                         your fallback choice
  1. Set a number's routing to Webhook (product → Numbers).
  2. Configure the call answer webhook URL on the product.
  3. When a call arrives on that number, we POST call.answer to your URL before answering.
  4. Your server replies with accept (and which agent) or reject.

Numbers left on Platform routing ignore the webhook and use routing rules + the default agent as usual.


The reply, in short

{ "accept": false, "reject_reason": "out_of_credit" }
{ "accept": true, "agent_id": "agt_xxxxxxxxxxxx" }
{ "accept": true, "agent_config": { "...full inline agent..." } }

Full field reference, signing, and example servers: Call answer webhook.


If your webhook is slow or down

You choose what happens on timeout (10s) or error, per product:

  • Reject — the call is hung up.
  • Fall back to platform routing — we use the number's routing rules + default agent, as if it were a platform-routed number.

The pattern, end to end

  1. Each business forwards its line to your one number (set to Webhook routing).
  2. A call arrives → we POST call.answer with from / to / forwarded_from.
  3. Your server looks up the business, checks credit, builds the agent.
  4. You reply with that business's agent_id / agent_config — or reject.
  5. The agent answers. You get the call.ended webhook with the result (transcript + recording).

Next