Endpoint
POSThttps://{yourserver}/webhooks/callContent-Type: application/json This webhook is sent when a new call is created on the platform. It is configured at the application level. Reference: Call Hook (POST)
Request
The request body contains call information as JSON (see CallHook schema below).Response
Return a 200 with a JSON payload consisting of an array of verbs to control the call.CallHook schema
| Property | Type | Description |
|---|---|---|
| call_sid | string | Unique identifier for the call |
| call_id | string | Call ID on the server |
| application_sid | string | Unique identifier for the Graine application controlling this call |
| account_sid | string | Unique identifier for the Graine account |
| direction | string | inbound — call originated outside Graine; outbound — call originated by Graine |
| from | string | Calling party number |
| to | string | Called party number |
| caller_name | string | Caller name, if known |
| sip_status | number | Most recent SIP status code for the call |
| sip_reason | string | Description of the last SIP status |
| call_status | string | One of: trying, ringing, early-media, in-progress, completed, failed, busy, no-answer |
| sbc_callid | string | Original call ID when the call arrived at Graine |
| originating_sip_ip | string | IP address that sent the call to Graine |
| originating_sip_trunk_name | string | Name of the carrier in Graine that received the call |
| local_sip_address | string | Internal address of the Feature Server handling the call |
| service_provider_sid | string | ID of the service provider the account belongs to |
| sip | object | The SIP request for the call (raw, headers, body, method, version, uri, payload) |
| env_vars | object | Application environment variables |