There are multiple call backs that Lead Assist solution provides for the events happening on the allocation.
On every call that happens in an allocation, Lead Assist 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_backet_path>", "dial_call_status": "la-null", "source": "exotel" }
Note: Additionally call parameters as per Exotel will be included in this event.
Please visit our Support Article for more details.
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 |