Route Incoming Calls with a Webhook
With the Incoming Call Webhook, your server is told about each call to your number and decides where it goes — by caller, time of day, CRM data or any other logic. You then set the number’s destination through the API, and the call is connected.
How It Works
What happens when someone calls a number set to Incoming Call Webhook.
| 1 | The call arrives and the caller hears ringingThe caller hears ringing until the call is routed. |
| 2 | PBXme posts the call data to your webhookThe call details are sent to your webhook URL as a JSON POST request (fields below). |
| 3 | Your server confirms within 5 secondsRespond with HTTP 200. If no confirmation arrives within 5 seconds, PBXme retries — up to 5 attempts, 5 seconds apart, all with the same |
| 4 | Your server sets the destination via the APICall DID Forward Setting to set the number’s destination for this caller — for example a PSTN number, a SIP device or a SIP trunk (see the forwarding types). This must happen within 30 seconds of the call arriving; otherwise the call is dropped. |
| 5 | The call is connectedThe new forwarding is applied within about a second, the destination rings, and the caller is connected. |
call_type "19") so your webhook handles the next call.What Your Webhook Receives
{
"call_id": "265fff9c-e4ca-4d54-8de9-8caff0f95444",
"call_timestamp": "2026-12-02 15:25:02",
"caller_id": "0523609233",
"dialed_did": "972737004333",
"did_id": "14229"
}| Field | Meaning |
|---|---|
call_id | Unique ID of the call — the same on every retry, so you can ignore duplicates |
call_timestamp | Time the call arrived, in UTC |
caller_id | The caller’s number, in the format the carrier delivered it |
dialed_did | Your number that was called, in international format |
did_id | The number’s ID — use it directly as did_id in DID Forward Setting |
195.201.136.88 and 95.217.164.101 and carry no signature. Allow only these source IPs on your webhook endpoint and use HTTPS.Step 1: Prepare Your Webhook
A publicly reachable HTTPS endpoint that accepts POST requests.
| 1 | Create the endpointSet up a URL on your server, for example |
Step 2: Point Your Number at the Webhook
Use the portal or the API.
| 2 | In the portalGo to Inbound → Local Numbers and click the blue Call Forward arrow next to your number. In Call Type, select Incoming Call Webhook, enter your webhook URL in the destination field, and click Save. |
| 3 | Or through the APICall DID Forward Setting with Full request, authentication and field reference: PBXme API reference (Postman) · Incoming Call Webhook API |
Step 3: Test an Incoming Call
| 4 | Call your numberLog every request your webhook receives. Call the number from a phone: you should hear ringing, see the POST arrive and your server answer 200, then reach the destination once your server sets the forwarding. |
Troubleshooting
No request reaches the server. Check that the number’s Call Type is Incoming Call Webhook (call_type 19), that the URL is complete and publicly reachable over HTTPS, and that your firewall allows POST requests from 195.201.136.88 and 95.217.164.101.
The call drops. Your server must answer 200 within 5 seconds (up to 5 attempts), and the forwarding must be set within 30 seconds of the call arriving. Respond first, then do slow lookups in the background.
The API rejects the forwarding call. If it returns “Invalid key found”, log in again and use the new id and token.
The webhook stopped receiving calls. Setting the destination saves it as the number’s forwarding. Set the number back to call_type 19 to receive the next calls on your webhook.
Want to stream the call to an AI voice app instead? Use VocRT WebSocket forwarding (call_type 17).
Contact us at support@pbxme.com or WhatsApp +972 55-966-4944.
