Phone API Reference - Core - digium.phone.dial
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.dial
Â
Description
Initiates a call. This function returns a call handle, which is a string identifying the call. It can be used in various other methods such as digium.phone.hangup.
Â
Basic Example:Â
digium.phone.dial(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 |
---|---|---|---|---|
number | Yes | string | Â | Number to dial. |
url | No | string |  | SIP URL to call (e.g., 200@MY.PBX.IP). This can be used instead of a number. Only one of the two are required. |
headers | No | object | Â | Object with header values to set in the call's INVITE. |
accountSlot | No | integer | Â | ID for the account. |
handler | No | function | Â | Handler to register for the call. Executed whenever the call changes state. |
Â
Examples
digium.phone.dial with util.debug for state of the call
digium.phone.dial({
    'number' : 100,
    'handler' : function (obj) {
        util.debug(obj.state); //prints the 'state' of the call
    }
}); |
Â
Â