×

There are multiple call backs that ExoBridge solution provides for the events happening on the allocation.

Call Completed Event

On every call that happens in an allocation, ExoBridge will make a HTTP POST request to the specified endpoint with the call details. The HTTP body will consist of the following parameters as shown below:

Parameter Name

Type & Value

transation_id connection_id that was part of the request
call_sid call_sid is a unique identifier for a call
vn The VN on which the call landed
greenpin_id The unique identifier of the allocation
from The 'from' number
to The 'to' number
call_type Values can be completed, incomplete, call-attempt, client-hangup, etc.
start_time Start time of the call
current_time Current time of the request
dial_call_duration Duration of the second leg of the call
direction Always incoming
on_call_duration Duration of the call conversation happened between both parties
recording_url Recording of the call conversation if enabled
dial_call_status Second leg status
source “exotel”
{
    "transaction_id": "random_string",
    "call_sid": "ec44cfd684850a68decc4cebc4e2143u",
    "vn": "+916292134464",
    "greenpin_id": "6447bb53-70c3-40ea-850b-de2fd3c585ee",
    "from": "+917987686144",
    "to": "+916292134471",
    "call_type": "completed",
    "start_time": "2020-03-23T12:58:02+00:00",
    "current_time": "2020-03-23T12:58:22+00:00",
    "dial_call_duration": 20,
    "on_call_duration": 17,
    "direction": "incoming",
    "recording_url": "<S3_bucket_path>",
    "dial_call_status": "completed",
    "source": "exotel"
}

Deallocation Callback Event

When deallocation of GreenPin is triggered via the deallocation policy as defined in the Allocation API, this callback will be triggered to let the user know that the deallocation has happened. The callback will also be triggered if the user calls the deallocation API manually.

Parameter 

Description

transaction_id

transaction_id that was part of the request

greenpin_id

The unique identifier of the allocation.

usage

Usage as provided in allocation API (the default is twoway)

aparty_numbers

List of aparty numbers as provided in allocation api

bparty_numbers

List of bparty numbers as provided in allocation api

aparty_vns

List of aparty VNs as provided in allocation api

bparty_vns

List of bparty VNs as provided in allocation api

aparty_pins

List of aparty pins  as provided in allocation api

bparty_pins

List of bparty pins as provided  in allocation api

state

This is the current state of the allocation which can have the following values

  • “active” - The state when the allocation is active
  • “vault” - The state when the allocation was deallocated

 

{
  "transaction_id": "client's identifier of the allocation",
  "aparty_numbers": [
    "+91798XXXX144"
  ],
  "bparty_numbers": [
    "+91995XXXX625"
  ],
  "aparty_vns": [
    "+91629XXXX471",
    "+9162XXXX4464"
  ],
  "bparty_vns": [
    "+91629XXXX465",
    "+91629XXXX464"
  ],
  "aparty_pins": [
    "713"
  ],
  "bparty_pins": [
    "884"
  ],
  "usage": "twoway",
  "greenpin_id": "a62b5590-XXXX-4X33-a5X-fbaedaa5dd51",
  "state": "active"
}

Successful Verification Event

If an unregistered caller calls a VN, he will be prompted to enter the pin number.  If the user identifies himself with the correct pin, we connect him to the other party.  This will trigger an HTTP POST request to a specified endpoint with the HTTP body containing the following parameters.

Parameter Name Type & Value
transaction_id The transaction_id as received in the allocate API request
vn The VN which was used to make this specific call
greenpin_id The unique identifier of the allocation to which the user has been added
caller The phone number of the new user.
pin Pin entered by the user.
{
"caller": "+917XXXXX6144",
"greenpin_id": "XXXXXe3-105f-4fba-89c0-7842df249313",
"vn": "+91629XXXXX71",
"transaction_id": "order-id",
"pin": "4321",
"call_sid": "7d90fXXXXXc1a449bd4b700fce9d165p"
}

 

Failed Verification Event

If an unregistered caller fails to verify himself (incorrect pin entry etc.), a failed verification event is triggered.

Parameter Name Type & Value
call_sid Unique identifier of the call made by the caller to the VN
vn The VN to which the caller called
start_time Start time of the call.
caller The phone number of the new user.
pin Pin entered by the user.
{
"start_time": "2021-11-09T10:09:15+05:30",
"caller": "+917XXXXX6144",
"vn": "+9162921XXXXX",
"call_sid": "XXXXfdea48XXX49bd4b700fce9d165p",
"pin": "1234"
}

Appendix 1

List of status codes and their definition:

Status Code Description Http code
0 Internal Service Error 500
1 Could not find the given GreenPin 404
2 One or more unsupported search filters provided 400
3 One or more mandatory parameters not present in request 400
4 No free GreenPins are available for allocation 452
5 Bad or missing parameters in Request 400
7 Authentication not provided or failed 401
8 Not permitted to do this operation. 403
9 Version header not specified or supported for this API 400
13 All numbers in the group are duplicates 409
14 a-party numbers and b-party numbers cannot contain the same number for an allocation. 409
15 The region code specified is not supported 403
16 Invalid Number Received. 400
17 Too many allocation requests in bulk. 413
18 Allocation exists for this connection id 409
19 One or more of the numbers is already registered with another pin 409
20 Group and number mapping doesn't exist 404
22 This green_pin is already deleted 410
23 An invalid date range was provided in the query 400
50 An invalid call flow is configured 422