New Call
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 appplication level
Authentication
Authorizationheader (basic auth, required) — Basic authentication of the formBasic <base64(username:password)>.
Request
Body (application/json)
This endpoint expects a CallHook.
call_sidstringa unique identifier for the call.call_idstringthe call id in our server.application_sidstringa unique identifier for the Wipple CPaaS application controlling this callaccount_sidstringa unique identifier for the Wipple CPaaS account associated with the applicationdirectionenumthe direction of the call:
•inbound- The call was originated outside Wipple CPaaS
•outbound- The call was originated by Wipple CPaaS- Allowed values:
inbound,outbound fromstringthe calling party numbertostringthe called party numbercaller_namestringthe caller name, if knownsip_statusdoublethe most recent sip status code received or generated for the callsip_reasonstringthe reason phrase from the SIP status LINE of the last response (e.g.Trying,OK,Busy Here). This is not the RFC 3326Reasonheader - seesip_reason_header.call_statusenumcurrent status of the call:
•trying- a new incoming call has arrived or an outbound call has just been sent
•ringing- a 180 Ringing response has been sent or received
•early-media- an early media connection has been established prior to answering the call (183 Session Progress)
•in-progress- call has been answered
•completed- an answered call has ended
•failed- a call attempt failed
•busy- a call attempt failed because the called party returned a busy status
•no-answer- a call attempt failed because it was not answered in time- Allowed values:
trying,ringing,early-media,in-progress,completed,failed,busy,no-answer sip_reason_headerstringthe RFC 3326Reasonheader of the SIP message that caused this status change, if it carried one; omitted otherwise. Carriers fronting ISDN/E1 PRI trunks put the authoritative disconnect cause here rather than in the status line, and the same SIP status can carry different causes - a503may because=38(network out of order) orcause=41(temporary failure) - so the status code alone cannot classify the outcome of a call. A408withQ.850;cause=18("no user responding") is a call nobody answered, not a platform fault. Present on whichever event observed it: a final failure response, aBYEon an answered call, or aCANCELfrom a caller who gave up. TheCANCELcase matters most, because the487and itsRequest Terminatedphrase are generated by Wipple CPaaS itself - so without this header every abandoned inbound call looks identical, andSIP;cause=200;text="Call completed elsewhere"is what distinguishes a forked branch losing the race from a caller who hung up. Two parsing caveats: the header is re-serialized in transit, which normalizes the optional whitespace RFC 3326 allows around;, so a carrier'sQ.850 ;cause=18arrives asQ.850;cause=18- parse tolerantly rather than string-matching. And a message may carry more than oneReasonheader, in which case they arrive comma-separated; split on commas outside quotes, since atext="..."value may contain one.sbc_callidstringthe orignal call ID of the call when it arrived at Wipple CPaaSoriginating_sip_ipstringThe IP address that send the call to Wipple CPaaSoriginating_sip_trunk_namestringThe name of the carrier in Wipple CPaaS that recieved the calllocal_sip_addressstringInternal Address of the media server handling the callservice_provider_sidstringThe ID of the service provider the account handling the call belongs tosipsipRequestThe SIP request for the callenv_varsCallHookEnvVarsApplication Environment Variables configured for the applicaiton
Response
200
Return a 200 containing a JSON payload consisting of an array of Functions
Types
sipRequest
rawstringthe complete SIP request as a single string.headersSipRequestHeaderseach of the SIP headers as a key/value objectbodystringthe body of the request, containing SDPmethodstringThe SIP methodversionstringthe SIP versionuristringThe SIP URI of the requestpayloadSipRequestPayloadthe body of the request
CallHookEnvVars
Application Environment Variables configured for the applicaiton
SipRequestHeaders
each of the SIP headers as a key/value object
SipRequestPayload
the body of the request
Examples
Request
{
"call_sid": "d2515c3b-b79a-41a2-971a-445e769c823c",
"call_id": "d2515c3b-b79a-41a2-971a-445e769c823c",
"application_sid": "72c5c38f-9bba-40ce-aa83-aaa6be55e1b5",
"account_sid": "bad98250-b34d-459d-9e90-f97dfb9bc519",
"direction": "inbound",
"from": "+815099990001",
"to": "+815099990002",
"caller_name": "Miraicom Taro",
"sip_status": 100,
"sip_reason": "Trying",
"call_status": "trying"
}
Response
{}