Skip to main content

Inbound Missed

To receive the inbound webhooks, you must complete the webhooks setup. After completing the webhooks setup, our PIOPIY platform will notify your web server POST method URL with JSON CDR ( Call Detail Record) when an incoming call got missed.

Properties

These are the list of properties and its description

PropertyTypeDescription
tonumberYour incoming DID number
appidnumberYour app id
timenumberTimestamp of this call
start_timenumberThe start time of this call
end_timenumberThe end time of this call
fromnumberThe number who made a call
directionstringDirection of this call
durationnumberThe total duration of this call in seconds
extra_paramsstringYour custom parameters
cmiuuidstringA unique identifier of this call
call_ratestringThe billed call rate for this call
balancestringThe total available account balance after this call
conversation_uuidstringA unique identifier of this conversation
calleridnumberThe incoming DID number
answer_timenumberThe answer time of this cal
legstringDefine the leg of the call either a or b
statusstringStatus of this call

CDR response

This is the sample JSON CDR (Call Detail Record), where the PIOPIY platform will notify your web server POST method URL.

{
to: 440000000000,
appid: 2222222,
time: 1632317071000,
start_time: 1632317068,
end_time: 1632317073,
from: 440000000001,
direction: 'inbound',
duration: 0,
extra_params: '{"key":"value"}',
cmiuuid: '33079756-faed-4a29-8b36-c8ead67e047c',
call_rate: 0,
balance: '899.000000',
conversation_uuid: '33079756-faed-4a29-8b36-c8ead67e047c',
answer_time: 1632318515,
leg: 'a',
status: 'missed'
}

The above sample JSON live event consists of several properties. Each property has a description and take a look at it.

Implementation

PIOPIY webhooks implementation in different languages.

const express = require("express"),
bodyParser = require("body-parser"),
app = express();

// parse application/json
app.use(bodyParser.json());

app.post("/webhook/cdr", (req, res) => {
//Received CDR JSON Object from PIOPIY platform
var cdr = req.body;

console.log(cdr);

res.send("got it");
});

app.listen(5000);
app.run((debug = True), (port = 5000));

To know more about testing webhooks for local development purposes, go to examples.