Event Callbacks

Event Callbacks are used to notify your application whenever particular events occur on the Ubity telephony/UC platform. Ultimately, these events can range from a user making or receiving a call,

At the moment, these are the events that your application can subscribe to:

  • CallInitiated event
  • CallAnswered event
  • CallEnded event

To setup the callbacks, you will need to ask Ubity Support specifying the URL you want to be request for each event. You may have to prove that you own those URL.

CALLBACK URLS

In order for your application to be notified of a particular event, one or more callback URLs need to be associated to that event.

HTTP REQUEST

Both GET and POST requests are supported.

CallInitiated Event

This event notifies your application whenever a user or extension in your company makes or receives a call. This event indicates that the other end is ringing, and not that it has answered (see CallAnswered event).

HTTP REQUEST

Both GET and POST requests are supported.

QUERY PARAMETERS

Parameter Description
callid A unique identifier string for the call
type The type of the call, or its direction (incoming, outgoing)
caller The extension or phone number that initiated the call
callee The extension or phone number that received the call

EXAMPLES

  • An outgoing call initiated by extension 100 to phone number 5145551212 will trigger the following event:

GET https://yourapp.com/init?callid=ABC12345&type=outgoing&caller=100&callee=5145551212

  • An incoming call received by extension 100 from phone number 5145551212 will trigger the following event:

POST https://yourapp.com/init?callid=ABC12345&type=incoming&caller=5145551212&callee=100

CallAnswered Event

This event notifies your application when a previously initiated call (see CallInitiated event) has been answered by its recipient.

HTTP REQUEST

Both GET and POST requests are supported.

QUERY PARAMETERS

Parameter Description
callid A unique identifier string for the call (same as CallInitiated)
type The type of the call, or its direction (incoming, outgoing)
caller The extension or phone number that initiated the call
callee The extension or phone number that received the call

EXAMPLES

  • An outgoing call initiated by extension 100 to phone number 5145551212 has now been answered by 5145551212:

GET https://yourapp.com/answered?callid=ABC12345&type=outgoing&caller=100&callee=5145551212

  • An incoming call received by extension 100 from phone number 5145551212 has now been answered by extension 100:

POST https://yourapp.com/answered?callid=ABC12345&type=incoming&caller=5145551212&callee=100

CallEnded Event

This event notifies your application when a previously initiated, then answered call is hung up.

HTTP REQUEST

Both GET and POST requests are supported.

QUERY PARAMETERS

Parameter Description
callid A unique identifier string for the call (same as CallInitiated and CallAnswered)
type The type of the call, or its direction (incoming, outgoing)
caller The extension or phone number that initiated the call
callee The extension or phone number that received the call
duration The duration of the call (in seconds)

EXAMPLES

  • An outgoing call between extension 100 and 5145551212 ends after 300 seconds (5 minutes):

GET https://yourapp.com/ended?callid=ABC12345&type=outgoing&caller=100&callee=5145551212&duration=300

  • An incoming call for extension 100 from 5145551212 ends after 300 seconds (5 minutes):

POST https://yourapp.com/ended?callid=ABC12345&type=incoming&caller=5145551212&callee=100&duration=300


  1. The type or direction of a call is always taken from the user's perspective.