/
Phone API Reference - Core - digium.phone.observeCallEvents

Phone API Reference - Core - digium.phone.observeCallEvents

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.phone.observeCallEvents

 

Description

Attaches handlers to ongoing-call status changes. Useful if you were unable to attach a handler when the call was created.

The function passed in the handler parameter is called with a call status object to notify of state changes to the phone call.

Parameters

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

handler

Yes

function

 

Handler to register for the call. Executed whenever the call changes state.

callHandle

Yes

string

 

Identifier of the call to act on. A call handle can be obtained by observing call events. Information such as this will be passed into the event object.

 

Examples

digium.phone.observeCallEvents with util.debug to print call state

 digium.phone.observeCallEvents({     'callHandle' : callHandleVar,     'handler' : function (obj) {         util.debug(obj.state);     } });

 

 

Related content

Phone API Reference - Core - digium.phone.answer
Phone API Reference - Core - digium.phone.answer
More like this
Phone API Reference - Core - digium.phone.dial
Phone API Reference - Core - digium.phone.dial
More like this
Phone API Reference - Core - digium.phone
Phone API Reference - Core - digium.phone
More like this
Phone API Reference - Core - digium.phone.hangup
Phone API Reference - Core - digium.phone.hangup
More like this
Phone API Reference - Core - digium.event.observe
Phone API Reference - Core - digium.event.observe
More like this
Phone API Reference - Core - digium.phone - Call Status Object
Phone API Reference - Core - digium.phone - Call Status Object
More like this

Return to Documentation Home I Return to Sangoma Support