Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

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

Auth

Used primarily to interact with the PBX when the phone is used with a server running either Switchvox or the Desk Phone Module for Asterisk (DPMA). The auth object holds the user's account id, extension, password, and the address of the server.

Require Extended Library: 

Code Block
var Auth = require('auth').Auth; //access the Auth property which is the Auth constructor.

Class Constructor

new Auth()

...

Create a new Auth Object.

Code Block
var authObj = new Auth(parameters);

Initialization Parameters

Name

Required

Type

Default

Description

account_id

Yes

integer

Unique ID of the account.

username

Yes

Username that will be used when making requests with the auth object. For pbx requests, this is the account's extension.

password

Yes

string

Password to use with requests using the auth object. For requests made with the pbx library, this is the account's web password.

appserver

Yes

string

Address to which requests using the auth object will be directed. 

lang

Yes

object

Language object instance.

The functionality of this object is included in the  app extended library . It is recommended you use the app library if you wish to use this feature. 

...