/
Phone API Reference - Core - digium.event.observe

Phone API Reference - Core - digium.event.observe

Desk Phone API features described in this section are deprecated and supported only on the following models: D40, d45, d50, d60, d62, d65, d70

digium.event.observe

Description

Set a callback function to be fired when the request eventName fires. 

 

 

Basic Example: 

digium.event.observe(parameters);

 

Parameters

 

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

eventName

Yes

string

 

String that identifies the event type. Event type can either be from this list if you are using digium.event.observe, or from your own list if you're using digium.event.fire to fire your own event. 

callback

No

object

 

Called when an event arrives and contains an Object with the following:

  • callHandle - the string identifying the call. This is only present when the notification is attached to an incoming call.

  • method - the SIP method type used to deliver the message. INFO, INVITE, or MESSAGE.

  • eventName - the string identifying the pushed event type

  • eventData - data associated with the message (from the x-event-data header or the body of an INFO or MESSAGE). If data can be parsed as JSON, the parsed object is used; otherwise, this field contains a string.

  • messageId - ID string for the event.

 

A full list of system eventNames can be found here.

 

Related content

Phone API Reference - Core - digium.event.fire
Phone API Reference - Core - digium.event.fire
More like this
Phone API Reference - Core - digium.phone.observeCallEvents
Phone API Reference - Core - digium.phone.observeCallEvents
More like this
Phone API Reference - Core - digium.event
Phone API Reference - Core - digium.event
More like this
Digium Phones - Creating and Handling Calls
Digium Phones - Creating and Handling Calls
More like this
Phone API Reference - Core - digium.event - List of Event Types
Phone API Reference - Core - digium.event - List of Event Types
More like this
Phone API Reference - Core - digium.phone.answer
Phone API Reference - Core - digium.phone.answer
More like this

Return to Documentation Home I Return to Sangoma Support