Inbound Routing Policies
Inbound Routing Policies are webhook-backed pre-answer routing hooks for inbound phone calls. Vocobase resolves the inbound DID, finds the applicable policy, calls your policy webhook, and only then decides whether to create an AI session, select another agent, transfer the call, or reject it.Policies run for Vobiz, Plivo, and VoiceLink inbound calls.
TRANSFER is not available on VoiceLink (see Provider Support). Runtime scope priority is PHONE_NUMBER -> AGENT -> PARTNER.API
Policy endpoints
GET /api/v2/inbound-route-policiesPOST /api/v2/inbound-route-policiesGET /api/v2/inbound-route-policies/{id}PATCH /api/v2/inbound-route-policies/{id}DELETE /api/v2/inbound-route-policies/{id}
Decision-log endpoint
GET /api/v2/inbound-route-decisions
Scope Resolution
Vocobase evaluates enabled policies in this order:PHONE_NUMBER: exact policy for the inbound DID row.AGENT: fallback policy for the agent assigned to the DID.PARTNER: the account-wide default policy.
PARTNER is a legacy name kept for backward compatibility — it is the
account-wide scope, and it applies to every account. Existing integrations
that already send "scope": "PARTNER" keep working unchanged.Request fields
Response fields
Examples
Create a phone-number policy
TRANSFER from allowed_actions, or omit the field entirely.
Create an agent fallback policy
Create an account-wide default policy
Query recent decisions
provider, provider_call_id, from_number, to_number, action, decision_source, failure_reason, transfer_to_number, webhook_status, webhook_latency_ms, created_session_id, and created_phone_call_id.
Webhook Event Sent By Vocobase
Vocobase sends this event towebhook_url before creating any session:
Headers
Vocobase computes HMAC over:
Supported Webhook Actions
Provider Support
Policies are evaluated on inbound calls for Vobiz, Plivo, and VoiceLink.TRANSFER is not supported on VoiceLink. A VoiceLink inbound call reaches the
policy after the media session has already connected, so there is no point at which
Vocobase can hand the call to a carrier. Behaviour:
- A policy scoped to a VoiceLink DID is rejected at write time (
400 VALIDATION_ERROR,allowed_actions must not include TRANSFER for a VoiceLink phone number) ifallowed_actionsnamesTRANSFERexplicitly. Omittingallowed_actions(all actions permitted) stays valid. - If a webhook returns
TRANSFERon a VoiceLink call anyway, Vocobase answers with AI instead of dropping the call, and records the decision withfailure_reason: "transfer_unsupported_on_voicelink". This overridesfailure_action, includingREJECT— a transfer that cannot be performed is not a reason to hang up on a caller.
ANSWER_WITH_AI, SELECT_AGENT, and REJECT produce the same outcome across all
three providers. One difference in caller experience: on Vobiz and Plivo a REJECT
refuses the call before it is answered, while on VoiceLink the call has already been
answered by the time the policy runs, so REJECT ends a connected call.
Response Handling And Failure Behavior
- HTTP
202or204from webhook: continue asANSWER_WITH_AI. - HTTP 2xx with JSON body: use the returned action.
- Non-2xx response: apply
failure_action. - Timeout, network failure, invalid JSON, unknown action, disallowed action, or unauthorized selected agent: apply
failure_action. - Default
failure_actionisANSWER_WITH_AIunless explicitly set toREJECT.
SELECT_AGENT returns an agent outside your account, Vocobase uses the configured failure_action.