Scroll Top
Level 17/31 Queen St, Melbourne. VIC. 3000

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 NameDescription
HTTP RingingSend a HTTP Post to a remote endpoint when there is an incoming call.  
HTTP HangupOnce the call is complete, this event is sent.  It will include either a URL for a call recording or voicemail file if present.
Extension RingingWhen an extension is ringing this event is sent to the nominated end-point
Extension AnsweredOnce an extension is answered this event is sent a remote end-point
Extension HangupOnce 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:

  1. Select the Dialplan you would like to manage
  2. Edit the Condition rule you would like to apply the event to
  3. On the left side of the screen, you will see HTTP Event, click the plus sign 
  4. On the next screen enter you can enter your endpoints for this action:
    1. Ringing Endpoint – enter a web address where you want the ringing event to be sent to, for instance, https://example.com/test-ring
    2. Hangup Endpoint – enter a web address where you want the hangup event to be sent to, for instance, https://example.com/test-hangup
    3. 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:

ParameterDescription
service_idThe service ID for this service
directionIt will show inbound_external to indicate it has come via an external number
dialplan_idThe Dialplan id the call event was triggered from
condition_idThe Condition ID the call event was triggered from
dialplan_nameThe Dialplan Name the call event was triggered from
condition_nameThe Condition Name the call event was triggered from
caller_nameIf a Call Name is set via the Numbers screen or Call Prefix this will show here
call_event_uuidUnique UUID to identify this call
methodThe method used to process the call – incoming_ringing
display_fromFriendly name formatting the Caller ID and caller_name
start_timeThe time the call started in EPOCH
fromCallers Caller ID
external_didNumber the caller dialled which triggered this event
http_ringing_urlHTTP 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:

ParameterDescription
service_idThe service ID for this service
directionIt will show inbound_external to indicate it has come via an external number
dialplan_idThe Dialplan id the call event was triggered from
condition_idThe Condition ID the call event was triggered from
dialplan_nameThe Dialplan Name the call event was triggered from
condition_nameThe Condition Name the call event was triggered from
caller_nameIf a Call Name is set via the Numbers screen or Call Prefix this will show here
call_event_uuidUnique UUID to identify this call
methodThe method used to process the call – incoming_hangup_success for a successful call or incoming_hangup_missed for an unanswered call
display_fromFriendly name formatting the Caller ID and caller_name
start_timeThe time the call started in EPOCH
fromCallers Caller ID
external_didNumber the caller dialled which triggered this event
http_ringing_urlHTTP Post Event for a ringing call
http_hangup_urlHTTP Post Event for a call that hungup
http_post_recording_urlBoolean, 1 if this event should include a URL for how to access the recording.  
recording_urlHTTP URL to access the call recording if http_post_recording_url = 1 and Call Recording is enabled
end_timeTime in EPOCH when the call terminated
call_completed1 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:

  1. Login to the Dashboard
  2. Select your Hosted PBX service
  3. Select Extensions
  4. Edit the extension and click the Events tab
  5. 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

ParameterDescription
service_idThe service ID for this service
descriptionIt will show inbound_external to indicate it has come via an external number
start_timeThe time the call started in EPOCH
fromCallers Caller ID
external_didNumber the caller dialled which triggered this event
dialplan_idThe Dialplan id the call event was triggered from
condition_idThe Condition ID the call event was triggered from
dialplan_nameThe Dialplan Name the call event was triggered from
condition_nameThe Condition Name the call event was triggered from
caller_nameIf a Call Name is set via the Numbers screen or Call Prefix this will show here
call_event_uuidUnique UUID to identify this call
methodThe method used to process the call – extension_ringing
display_fromFriendly name formatting the Caller ID and caller_name
extension_nameThe name of the extension this extension
extension_user_idThe 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

ParameterDescription
service_idThe service ID for this service
descriptionIt will show inbound_external to indicate it has come via an external number
start_timeThe time the call started in EPOCH
fromCallers Caller ID
external_didNumber the caller dialled which triggered this event
dialplan_idThe Dialplan id the call event was triggered from
condition_idThe Condition ID the call event was triggered from
dialplan_nameThe Dialplan Name the call event was triggered from
condition_nameThe Condition Name the call event was triggered from
caller_nameIf a Call Name is set via the Numbers screen or Call Prefix this will show here
call_event_uuidUnique UUID to identify this call
methodThe method used to process the call – extension_answered
display_fromFriendly name formatting the Caller ID and caller_name
extension_nameThe name of the extension this extension
extension_user_idThe user id (extension number) for this extension
agent_uuidUnique 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

ParameterDescription
service_idThe service ID for this service
descriptionIt will show inbound_external to indicate it has come via an external number
start_timeThe time the call started in EPOCH
fromCallers Caller ID
external_didNumber the caller dialled which triggered this event
dialplan_idThe Dialplan id the call event was triggered from
condition_idThe Condition ID the call event was triggered from
dialplan_nameThe Dialplan Name the call event was triggered from
condition_nameThe Condition Name the call event was triggered from
caller_nameIf a Call Name is set via the Numbers screen or Call Prefix this will show here
call_event_uuidUnique UUID to identify this call
methodThe method used to process the call – extension_ringing
display_fromFriendly name formatting the Caller ID and caller_name
extension_nameThe name of the extension this extension
extension_user_idThe user id (extension number) for this extension
hangup_causeThe 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