HTTP Endpoint Events
HTTP Endpoint Events
The HTTP Endpoint Events allow you to further integrate our platform with your own custom application. These are trigger points that are sent to your remote endpoint so that you capture data and use it in some way. Some possibilities for the HTTP Endpoints are:
- Integration to a CRM
- Real-time data logging
- Data Warehousing
The endpoint events we have are:
Endpoint Name | Description |
HTTP Ringing | Send a HTTP Post to a remote endpoint when there is an incoming call. |
HTTP Hangup | Once the call is complete, this event is sent. It will include either a URL for a call recording or voicemail file if present. |
Extension Ringing | When an extension is ringing this event is sent to the nominated end-point |
Extension Answered | Once an extension is answered this event is sent a remote end-point |
Extension Hangup | Once the extension is hung up this event will be sent to the end-point |
HTTP Ringing and HTTP Hangup:
The HTTP Ringing event is controlled via the Dialplan screen. To enable the HTTP Event event you control this via the “Callflow -> Dialplans” screen. To add an event please follow the steps below:
- Select the Dialplan you would like to manage
- Edit the Condition rule you would like to apply the event to
- On the left side of the screen, you will see HTTP Event, click the plus sign
- On the next screen enter you can enter your endpoints for this action:
- Ringing Endpoint – enter a web address where you want the ringing event to be sent to, for instance, https://example.com/test-ring
- Hangup Endpoint – enter a web address where you want the hangup event to be sent to, for instance, https://example.com/test-hangup
- Post Call Recording – If turned on and call recording is enabled a web address will be submitted which will allow you to download the call recording file
HTTP Ringing
For the HTTP Ringing the following POST parameters are sent:
Parameter | Description |
service_id | The service ID for this service |
direction | It will show inbound_external to indicate it has come via an external number |
dialplan_id | The Dialplan id the call event was triggered from |
condition_id | The Condition ID the call event was triggered from |
dialplan_name | The Dialplan Name the call event was triggered from |
condition_name | The Condition Name the call event was triggered from |
caller_name | If a Call Name is set via the Numbers screen or Call Prefix this will show here |
call_event_uuid | Unique UUID to identify this call |
method | The method used to process the call – incoming_ringing |
display_from | Friendly name formatting the Caller ID and caller_name |
start_time | The time the call started in EPOCH |
from | Callers Caller ID |
external_did | Number the caller dialled which triggered this event |
http_ringing_url | HTTP Post Event for a ringing call |
Testing
For development purposes you can use the following CURL command:
curl -X POST --data "service_id=SERVICE_ID&direction=inbound_external&start_time=1573865518&from=0390085900&external_did=NUMBER_DIALED&dialplan_id=82&condition_id=268&dialplan_name=Test&condition_name=All%20Hours&caller_name=test&call_event_uuid=709e1d5e-2067-41af-88c4-77b0c761c718&http_ringing_url=http://192.168.1.10/test-post&method=incoming_ringing&http_hangup_url=http://192.168.1.10/test-post" http://192.168.1.10/test-post
Using the above, you should substitute the following for your parameters:
- SERVICE_ID – Your service ID, this is found under your list of services
NUMBER_DIALED - The numeber the person dialled in E.164 format. E.g. 61312341234
HTTP Hangup
For the HTTP Hangup event the following parameters are sent in the HTTP POST:
Parameter | Description |
service_id | The service ID for this service |
direction | It will show inbound_external to indicate it has come via an external number |
dialplan_id | The Dialplan id the call event was triggered from |
condition_id | The Condition ID the call event was triggered from |
dialplan_name | The Dialplan Name the call event was triggered from |
condition_name | The Condition Name the call event was triggered from |
caller_name | If a Call Name is set via the Numbers screen or Call Prefix this will show here |
call_event_uuid | Unique UUID to identify this call |
method | The method used to process the call – incoming_hangup_success for a successful call or incoming_hangup_missed for an unanswered call |
display_from | Friendly name formatting the Caller ID and caller_name |
start_time | The time the call started in EPOCH |
from | Callers Caller ID |
external_did | Number the caller dialled which triggered this event |
http_ringing_url | HTTP Post Event for a ringing call |
http_hangup_url | HTTP Post Event for a call that hungup |
http_post_recording_url | Boolean, 1 if this event should include a URL for how to access the recording. |
recording_url | HTTP URL to access the call recording if http_post_recording_url = 1 and Call Recording is enabled |
end_time | Time in EPOCH when the call terminated |
call_completed | 1 to indicate call has now finished |
Testing
For development purposes you can use the following CURL command:
curl -X POST --data "service_id=SERVICE_ID&direction=inbound_external&start_time=1573865518&from=0390085900&external_did=NUMBER_DIALED&dialplan_id=82&condition_id=268&dialplan_name=Test&condition_name=All%20Hours&caller_name=test&call_event_uuid=709e1d5e-2067-41af-88c4-77b0c761c718&http_ringing_url=http://192.168.1.10/test-post&method=incoming_hangup_success&http_post_recording_url=1&end_time=1573977089&call_completed&recording_url=https://127.0.0.1/call-recording-test" http://192.168.1.10/test-post
Using the above, you should substitute the following for your parameters:
- SERVICE_ID – Your service ID, this is found under your list of services
NUMBER_DIALED - The numeber the person dialled in E.164 format. E.g. 61312341234
Extension Events
To enable extension events you will need to complete the following:
- Login to the Dashboard
- Select your Hosted PBX service
- Select Extensions
- Edit the extension and click the Events tab
- On the Events Tab you have the following events you can use
- HTTP Ringing URL – The web address you would like post events to be sent to when the extension is ringing
- HTTP Answered URL – The web address you would like post events to be sent to when the extension has been answered
- HTTP Hangup URL – The web address you would like post events sent to when the extension has been hung up
Extension Ringing
Parameter | Description |
service_id | The service ID for this service |
description | It will show inbound_external to indicate it has come via an external number |
start_time | The time the call started in EPOCH |
from | Callers Caller ID |
external_did | Number the caller dialled which triggered this event |
dialplan_id | The Dialplan id the call event was triggered from |
condition_id | The Condition ID the call event was triggered from |
dialplan_name | The Dialplan Name the call event was triggered from |
condition_name | The Condition Name the call event was triggered from |
caller_name | If a Call Name is set via the Numbers screen or Call Prefix this will show here |
call_event_uuid | Unique UUID to identify this call |
method | The method used to process the call – extension_ringing |
display_from | Friendly name formatting the Caller ID and caller_name |
extension_name | The name of the extension this extension |
extension_user_id | The user id (extension number) for this extension |
Testing
Use the following command to test your application:
curl -X POST --data "service_id=SERVICE_ID&direction=inbound_external&start_time=1573865518&from=0390085900&external_did=NUMBER_DIALED&dialplan_id=82&condition_id=268&dialplan_name=Test&condition_name=All%20Hours&caller_name=test&call_event_uuid=709e1d5e-2067-41af-88c4-77b0c761c718&&method=extension_ringing&display_from=+0312341234&extension_name=EXTENSION_NAME&extension_user_id=EXTENSION_USERID"
Using the above, you should substitute the following for your parameters:
- SERVICE_ID – Your service ID, this is found under your list of services
- NUMBER_DIALED – The number the person dialled in E.164 format. E.g. 61312341234
- EXTENSION_NAME – The name of the person’s extension
- EXTENSION_USERID – The person’s extension number
Extension Answered
Parameter | Description |
service_id | The service ID for this service |
description | It will show inbound_external to indicate it has come via an external number |
start_time | The time the call started in EPOCH |
from | Callers Caller ID |
external_did | Number the caller dialled which triggered this event |
dialplan_id | The Dialplan id the call event was triggered from |
condition_id | The Condition ID the call event was triggered from |
dialplan_name | The Dialplan Name the call event was triggered from |
condition_name | The Condition Name the call event was triggered from |
caller_name | If a Call Name is set via the Numbers screen or Call Prefix this will show here |
call_event_uuid | Unique UUID to identify this call |
method | The method used to process the call – extension_answered |
display_from | Friendly name formatting the Caller ID and caller_name |
extension_name | The name of the extension this extension |
extension_user_id | The user id (extension number) for this extension |
agent_uuid | Unique indetifier for this agent/extension |
Testing
Use the following command to test your application:
curl -X POST --data "service_id=SERVICE_ID&direction=inbound_external&start_time=1573865518&from=0390085900&external_did=NUMBER_DIALED&dialplan_id=82&condition_id=268&dialplan_name=Test&condition_name=All%20Hours&caller_name=test&call_event_uuid=709e1d5e-2067-41af-88c4-77b0c761c718&&method=extension_ringing&display_from=+0312341234&extension_name=EXTENSION_NAME&extension_user_id=EXTENSION_USERID&agent_uuid=b05bf123-e592-5b8b-acfe-d496af1822ab"
Using the above, you should substitute the following for your parameters:
- SERVICE_ID – Your service ID, this is found under your list of services
- NUMBER_DIALED – The number the person dialled in E.164 format. E.g. 61312341234
- EXTENSION_NAME – The name of the person’s extension
- EXTENSION_USERID – The person’s extension number
Extension Hangup
Parameter | Description |
service_id | The service ID for this service |
description | It will show inbound_external to indicate it has come via an external number |
start_time | The time the call started in EPOCH |
from | Callers Caller ID |
external_did | Number the caller dialled which triggered this event |
dialplan_id | The Dialplan id the call event was triggered from |
condition_id | The Condition ID the call event was triggered from |
dialplan_name | The Dialplan Name the call event was triggered from |
condition_name | The Condition Name the call event was triggered from |
caller_name | If a Call Name is set via the Numbers screen or Call Prefix this will show here |
call_event_uuid | Unique UUID to identify this call |
method | The method used to process the call – extension_ringing |
display_from | Friendly name formatting the Caller ID and caller_name |
extension_name | The name of the extension this extension |
extension_user_id | The user id (extension number) for this extension |
hangup_cause | The hangup cause for this event, see Hangup Messages |
Testing
Use the following command to test your application:
curl -X POST --data "service_id=SERVICE_ID&direction=inbound_external&start_time=1573865518&from=0390085900&external_did=NUMBER_DIALED&dialplan_id=82&condition_id=268&dialplan_name=Test&condition_name=All%20Hours&caller_name=test&call_event_uuid=709e1d5e-2067-41af-88c4-77b0c761c718&&method=extension_ringing&display_from=+0312341234&extension_name=EXTENSION_NAME&extension_user_id=EXTENSION_USERID"
Using the above, you should substitute the following for your parameters:
- SERVICE_ID – Your service ID, this is found under your list of services
- NUMBER_DIALED – The number the person dialled in E.164 format. E.g. 61312341234
- EXTENSION_NAME – The name of the person’s extension
- EXTENSION_USERID – The person’s extension number