Phone API Reference - Core - digium.phone.answer
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.answer
Description
Answers an incoming call.
Â
Basic Example:Â
Â
 digium.phone.answer(parameters); |
Â
If a function is passed in the handler parameter, that function is called with a call status object to notify of state changes to the phone call.
Parameters
Name | Required | Type | Default | Description |
---|---|---|---|---|
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. |
handler | No | function | Â | Handler to register for the call. Executed whenever the call changes state. |
Â
Examples
digium.phone.answer with util.debug to print call state
digium.phone.answer({Â
    'callHandle' : callHandleVar,Â
    'handler' : function (obj) {Â
        util.debug(obj.state); //prints the state of the callÂ
    }Â
}); |
Â
Â