API Docs for: 2.6
Show:

phonebook Class

Module: phonebook

Provides the phonebook functionalities.

Methods

deleteCtiPbContact

(
  • id
  • cb
)

Deletes the cti phonebook contact.

Parameters:

  • id String

    The contact identifier in the cti phonebook database

  • cb Function

    The callback function

getCtiPbContact

(
  • id
  • cb
)

Returns the cti phonebook contact.

Parameters:

  • id String

    The contact identifier in the cti phonebook database

  • cb Function

    The callback function

getPbContactsByNum

(
  • number
  • cb
)

Gets the phonebook contacts searching the phone number in the centralized and NethCTI phonebook databases.

Parameters:

  • number String

    The phone number to search

  • cb Function

    The callback function

getPbContactsContains

(
  • term
  • username
  • cb
)

Gets the phonebook contacts searching in the centralized and NethCTI phonebook databases.

Parameters:

  • term String

    The term to search. It can be a name or a number

  • username String

    The name of the user used to search contacts in the cti phonebook

  • cb Function

    The callback function

getPbContactsStartsWith

(
  • term
  • username
  • cb
)

Gets the phonebook contacts whose name starts with the specified term, searching in the centralized and NethCTI phonebook databases.

Parameters:

  • term String

    The term to search. It can be a name or a number

  • username String

    The name of the user used to search contacts in the cti phonebook

  • cb Function

    The callback function

getPbContactsStartsWithDigit

(
  • username
  • cb
)

Gets the phonebook contacts whose name starts with a digit, searching in the centralized and NethCTI phonebook databases.

Parameters:

  • username String

    The name of the user used to search contacts in the cti phonebook

  • cb Function

    The callback function

getPbSpeeddialContacts

(
  • username
  • cb
)

Returns all the speeddial contacts of the specified user.

Parameters:

  • username String

    The name of the user

  • cb Function

    The callback function

modifyCtiPbContact

(
  • data
  • cb
)

Modify the cti phonebook contact.

Parameters:

  • data Object
    • id String

      The unique identifier of the contact

    • [type] String optional

      The type of the contact

    • [name] String optional

      The name of the contact

    • [homeemail] String optional
    • [workemail] String optional
    • [homephone] String optional
    • [workphone] String optional
    • [cellphone] String optional
    • [fax] String optional
    • [title] String optional
    • [company] String optional
    • [notes] String optional
    • [homestreet] String optional
    • [homepob] String optional
    • [homecity] String optional
    • [homeprovince] String optional
    • [homepostalcode] String optional
    • [homecountry] String optional
    • [workstreet] String optional
    • [workpob] String optional
    • [workcity] String optional
    • [workprovince] String optional
    • [workpostalcode] String optional
    • [workcountry] String optional
    • [url] String optional
    • [extension] String optional
    • [speeddial_num] String optional
  • cb Function

    The callback function

saveCtiPbContact

(
  • data
  • cb
)

Save the contact in the NethCTI phonebook database using dbconn module.

Parameters:

  • data Object
    • creator String

      The creator identifier of the contact

    • type String

      The type of the contact

    • name String

      The name of the contact

    • [homeemail] String optional
    • [workemail] String optional
    • [homephone] String optional
    • [workphone] String optional
    • [cellphone] String optional
    • [fax] String optional
    • [title] String optional
    • [company] String optional
    • [notes] String optional
    • [homestreet] String optional
    • [homepob] String optional
    • [homecity] String optional
    • [homeprovince] String optional
    • [homepostalcode] String optional
    • [homecountry] String optional
    • [workstreet] String optional
    • [workpob] String optional
    • [workcity] String optional
    • [workprovince] String optional
    • [workpostalcode] String optional
    • [workcountry] String optional
    • [url] String optional
    • [extension] String optional
    • [speeddial_num] String optional
  • cb Function

    The callback function

setDbconn

(
  • dbConnMod
)

Set the module to be used for database functionalities.

Parameters:

  • dbConnMod Object

    The dbconn module.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

Properties

dbconn

Object private

The dbconn module.

IDLOG

String private final

The module identifier used by the logger.

Default: [phonebook]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console