API Docs for:
Show:

arch_dbconn Class

Module: dbconn

The architect component that exposes dbconn module.

Item Index

Methods

Methods

checkDbconnCustCard

(
  • permissionId
)
Boolean

Provided by the plugins module.

Test if the database connection to specified customer card exists.

Parameters:

  • permissionId String

    The permission identifier of the customer card in asterisk.rest_cti_permissions

Returns:

Boolean:

True if the connection exists.

checkDbconnCustCard

(
  • connid
)
Boolean

Provided by the plugins module.

Test if the database connection to specified customer card exists.

Parameters:

  • connid String

    The pdatabase connection identifier

Returns:

Boolean:

True if the connection exists.

deleteAllUserSpeeddials

(
  • username
  • cb
)

Provided by the plugins module.

Delete the specified phonebook contact from the cti_phonebook database table.

Parameters:

  • username String

    The username

  • cb Function

    The callback function

deleteAnnouncement

(
  • id
  • cb
)

Provided by the plugins module.

Delete the specified announcement. It deletes the audio file, the relative entry from "offhour_files" db table and the associated "offhour" entry table if it is present.

Parameters:

  • id String

    The announcement identifier

  • cb Function

    The callback function

deleteCallRecording

(
  • uniqueid
  • cb
)

Provided by the plugins module.

Deletes a call recording from the database. It updates the entry of the specified call emptying the content of the recordingfile field of the asteriskcdrdb.cdr database table.

Parameters:

  • uniqueid String

    The database identifier of the call

  • cb Function

    The callback function

deleteCtiPbContact

(
  • id
  • cb
)

Provided by the plugins module.

Deletes the specified phonebook contact from the cti_phonebook database table.

Parameters:

  • id String

    The cti database contact identifier

  • cb Function

    The callback function

deleteCustomMessage

(
  • vm
  • type
  • cb
)

Provided by the plugins module.

Delete a custom voice message from the database table asteriskcdrdb.voicemessages.

Parameters:

  • vm String

    The voicemail id

  • type String

    The type of the custom message

  • cb Function

    The callback function

deleteOffhourByFilename

(
  • filename
  • cb
)
private

Provided by the plugins module.

Delete the specified offhour based on filename.

Parameters:

  • filename String

    The filename of the audio announcement associated with offhour to be deleted

  • cb Function

    The callback function

deleteUserSetting

(
  • username
  • prop
  • cb
)

Provided by the plugins module.

Delete a single user setting.

Parameters:

  • username String

    The username

  • prop String

    The setting property to be deleted

  • cb Function

    The callback function

deleteUserSettings

(
  • username
  • cb
)

Provided by the plugins module.

Delete all the user settings.

Parameters:

  • username String

    The username

  • cb Function

    The callback function

deleteVoiceMessage

(
  • dbid
  • cb
)

Provided by the plugins module.

Delete a voice message from the database table asteriskcdrdb.voicemessages.

Parameters:

  • dbid String

    The database identifier of the voice message to delete

  • cb Function

    The callback function

getAgentsStats

(
  • day
  • cb
)

Provided by the plugins module.

Get agent statistics about work times

Parameters:

  • day String

    The query date (YYYYMMDD)

  • cb Function

    The callback function

getAgentsStatsByList

(
  • agents
  • cb
)

Provided by the plugins module.

Get agents statistics.

Parameters:

  • agents Array

    The list of the agents

  • cb Function

    The callback function

getAgentsStatsLoginLogout

(
  • agents
)
Function

Provided by the plugins module.

Return function to have logint, logout stats of queue agents.

Parameters:

  • agents Array

    The list of the agents

Returns:

Function:

The function to be executed

getAgentsStatsPauseUnpause

(
  • agents
)
Function

Provided by the plugins module.

Return function to have pause, unpause stats of queue agents.

Parameters:

  • agents Array

    The list of the agents

Returns:

Function:

The function to be executed

getAllContacts

(
  • ctiPbBounds
  • pbBounds
  • replacements
  • [view]
  • [offset]
  • [limit]
  • cb
)
private

Provided by the plugins module.

Utility private function Execute a query (with count) on both cti and centralize phonebooks through a union.

Parameters:

  • ctiPbBounds String

    Cti phonebook query of union bounds

  • pbBounds String

    Centralized phonebook query of union bounds

  • replacements Array

    Replacements for queries

  • [view] String optional

    The view by which serve results

  • [offset] Integer optional

    The offset of results

  • [limit] Integer optional

    The limit of results

  • cb Function

    The callback function

getAllContactsContains

(
  • term
  • username
  • [view]
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts searching in the NethCTI and centralized phonebook databases. The specified term is wrapped with '%' characters, so it searches any occurrences of the term in the following fields: name, company, workphone, homephone, cellphone and extension. It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

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

  • [view] String optional

    The view by which serve results

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getAllContactsStartsWith

(
  • term
  • username
  • [view]
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the centralized and nethcti address book. At the end of the specified term is added the '%' character, so it searches the entries whose fields name and company starts with the term. It orders the results by name and company ascending. The centralized address book is the mysql phonebook.phonebook.

Parameters:

  • term String

    The term to search. It can be a name or a number. It will ended with '%' character to search any contacts with names that starts with the term.

  • username String

    The username

  • [view] String optional

    The view by which serve results

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getAllContactsStartsWithDigit

(
  • username
  • [view]
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook and nethcti contacts searching in the NethCTI phonebook database. Tt searches the entries whose fields name and company starts with a digit. It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

Parameters:

  • username String

    The name of the user used to search contacts

  • [view] String optional

    The view which by serve results

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getAllInboundRoutes

(
  • cb
)

Provided by the plugins module.

Get all the inbound routes from asterisk.incoming db table.

Parameters:

  • cb Function

    The callback function

getAllUserHistorySmsInterval

(
  • data
  • cb
)

Provided by the plugins module.

Gets all the history sms of all the users into the interval time. It can be possible to filter out the results specifying the filter. It search the results into the sms_history database.

Parameters:

  • data Object
    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • [filter] String optional

      The filter to be used in the recipient field. If it is omitted the function treats it as '%' string

  • cb Function

    The callback function

getAllUsersDefaultExtension

(
  • cb
)

Provided by the plugins module.

Gets default extension of all users. The settings are stored in mysql table user_settings.

Parameters:

  • cb Function

    The callback function

getAllUsersSettings

(
  • cb
)

Provided by the plugins module.

Return all users settings. The settings are stored in mysql table user_settings.

Parameters:

  • cb Function

    The callback function

getAnnouncement

(
  • id
  • cb
)

Provided by the plugins module.

Returns the audio file announcement data.

Parameters:

  • id String

    The announcement identifier

  • cb Funcion

    The callback function

getAnnouncementFilePath

(
  • announcementId
  • cb
)

Provided by the plugins module.

Returns the path of the audio file announcement.

Parameters:

  • announcementId String

    The announcement audio file identifier

  • cb Funcion

    The callback function

getCallInfo

(
  • uniqueid
  • privacyStr
  • cb
)

Provided by the plugins module.

Get call info of speciefied uniqueid. It searches the results into the database specified into the key names of one of the /etc/nethcti/dbstatic.json or /etc/nethcti/dbdynamic.json files.

Parameters:

  • uniqueid String

    The call uniqueid

  • privacyStr String

    The privacy string to be used to hide the phone numbers. It can be undefined

  • cb Function

    The callback function

getCallRecordingFileData

(
  • uniqueid
  • cb
)

Provided by the plugins module.

Returns the data about the call recording audio file as an object, or a false value if no data has been found.

Parameters:

  • uniqueid String

    The call identifier in the database

  • cb Function

    The callback function

getCallTrace

(
  • link
  • privacyStr
  • cb
)

Provided by the plugins module.

Get call trace of speciefied linkedid. It searches the results into the database specified into the key names of one of the /etc/nethcti/dbstatic.json or /etc/nethcti/dbdynamic.json files.

Parameters:

  • link String

    The call linkedid

  • privacyStr String

    The privacy string to be used to hide the phone numbers. It can be undefined

  • cb Function

    The callback function

getCtiPbContact

(
  • id
  • cb
)

Provided by the plugins module.

Returns the cti phonebook contact. It searches the id field in the cti_phonebook database table.

Parameters:

  • id String

    The cti database contact identifier

  • cb Function

    The callback function

getCtiPbContactsByNum

(
  • number
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the cti address book. It searches the number in the fields: workphone, homephone, cellphone and extension. It orders the results by name and company ascending. The cti address book is the mysql cti_phonebook.

Parameters:

  • number String

    The phone number term to search

  • cb Function

    The callback function

getCtiPbContactsContains

(
  • term
  • username
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts searching in the NethCTI phonebook database. The specified term is wrapped with '%' characters, so it searches any occurrences of the term in the following fields: name, company, workphone, homephone, cellphone and extension. It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

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

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getCtiPbContactsStartsWith

(
  • term
  • username
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts searching in the NethCTI phonebook database. At the end of the specified term is added the '%' character, so it searches the entries whose fields name and company starts with the term. It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

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

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getCtiPbContactsStartsWithDigit

(
  • username
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts searching in the NethCTI phonebook database. Tt searches the entries whose fields name and company starts with a digit. It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

Parameters:

  • username String

    The name of the user used to search contacts

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getCtiPbSpeeddialContacts

(
  • username
  • cb
)

Provided by the plugins module.

Gets all the speeddial contacts of the specified user searching in the NethCTI phonebook database. It searches all entries of he user where type field is equal to "speeddial". It orders the results by name and company ascending. The NethCTI phonebook is the mysql cti_phonebook.

Parameters:

  • username String

    The name of the user used to search speeddial contacts

  • cb Function

    The callback function

getCustCardNameDescr

(
  • permissionId
)
String

Provided by the plugins module.

Return the name of the customer card.

Parameters:

  • permissionId String

    The permission identifier of the customer card in asterisk.rest_cti_permissions

Returns:

String:

The name of the customer card with the specified permission id.

getCustCardNames

(
  • cb
)

Provided by the plugins module.

Return the name of the customer cards.

Parameters:

  • cb Function

    The callback function

getCustCardTemplateName

(
  • permissionId
)
String

Provided by the plugins module.

Return the name of the template file.

Parameters:

  • permissionId String

    The permission identifier of the customer card in asterisk.rest_cti_permissions

Returns:

String:

The name of the template file or undefined.

getCustomAudioMsgPath

(
  • vm
  • type
)
String private

Provided by the plugins module.

Add an entry into the asteriskcdrdb.voicemessages with the audio message content.

Parameters:

  • vm String

    The voicemail identifier

  • type String

    The type of the audio message ("unavail"|"busy"|"greet")

Returns:

String:

The path

getCustomerCardByNum

(
  • permissionId
  • ccName
  • num
  • cb
)

Provided by the plugins module.

Get the customer card of the specified type.

Parameters:

  • permissionId String

    The permission identifier of the customer card in asterisk.rest_cti_permissions

  • ccName String

    The customer card name

  • num String

    The phone number used to search in channel and dstchannel mysql fields. It is used to filter out. It is preceded by '%' character

  • cb Function

    The callback function

getCustomerCardPreview

(
  • query
  • dbConnId
  • templateName
  • cb
)

Provided by the plugins module.

Return the customer card preview.

Parameters:

  • query String

    The query

  • dbConnId String

    The db connection identifier

  • templateName String

    The template name

  • cb Function

    The callback function

getFpbxAdminSha1Pwd

(
  • cb
)

Provided by the plugins module.

Return the sha1 password of the FreePBX admin user or boolean false if it is not found.

Parameters:

  • cb Function

    The callback function

getHistoryCallInterval

(
  • data
  • cb
)

Provided by the plugins module.

Get the history call of the specified endpoints into the interval time. If the endpoints information is omitted, the results contains the history call of all endpoints. Moreover, it can be possible to filter the results specifying the filter and hide the phone numbers specifying the privacy sequence to be used. It search the results into the asteriskcdrdb.cdr database.

Parameters:

  • data Object
    • endpoints Array

      The endpoints involved in the research, e.g. the extesion identifiers. It is used to filter out the cnum and dst fields. If it is omitted the function treats it as ['%'] string. The '%' matches any number of characters, even zero character

    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • recording Boolean

      True if the data about recording audio file must be returned

    • [filter] String optional

      The filter to be used in the cnum, clid and dst fields. If it is omitted the function treats it as '%' string

    • [privacyStr] String optional

      The sequence to be used to hide the numbers to respect the privacy

    • [offset] Integer optional

      The results offset

    • [limit] Integer optional

      The results limit

    • [sort] String optional

      The sort field

    • [direction] String optional

      The call direction

  • cb Function

    The callback function

getHistorySmsInterval

(
  • data
  • cb
)

Provided by the plugins module.

Get the history sms sent by the specified user into the interval time. If the username information is omitted, the results contains the history sms of all users. Moreover, it can be possible to filter the results specifying the filter. It search the results into the sms_history database.

Parameters:

  • data Object
    • [username] String optional

      The user involved in the research. It is used to filter out the sender. If it is omitted the function treats it as '%' string. The '%' matches any number of characters, even zero character.

    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • [filter] String optional

      The filter to be used in the destination field. If it is omitted the function treats it as '%' string

  • cb Function

    The callback function

getHistorySwitchCallInterval

(
  • data
  • [data.trunks] The trunk identifiers list. It is used to filter out the _channel_ and _dstchannel_ fields to get out the type "in" and "out". If it is omitted the function treats it as ['%']
  • cb
)

Provided by the plugins module.

Get the all history calls into the interval time. It can be possible to filter the results specifying the filter and hide the phone numbers specifying the privacy sequence to be used. It search the results into the asteriskcdrdb.cdr database.

Parameters:

  • data Object
    • from String

      The starting date of the interval in the YYYYMMDD format (e.g. 20130521)

    • to String

      The ending date of the interval in the YYYYMMDD format (e.g. 20130528)

    • recording Boolean

      True if the data about recording audio file must be returned

    • [filter] String optional

      The filter to be used in the cnum, clid and dst fields. If it is omitted the function treats it as '%' string

    • [privacyStr] String optional

      The sequence to be used to hide the numbers to respect the privacy

    • [offset] Integer optional

      The results offset

    • [limit] Integer optional

      The results limit

    • [sort] String optional

      The sort field

    • [type] String optional

      The call type ("in" | "out" | "internal")

  • [data.trunks] The trunk identifiers list. It is used to filter out the _channel_ and _dstchannel_ fields to get out the type "in" and "out". If it is omitted the function treats it as ['%'] Array

    string. The '%' matches any number of characters, even zero character

  • cb Function

    The callback function

getOffhours

(
  • cb
)

Provided by the plugins module.

Get all the offhour from asterisk.offhour db table.

Parameters:

  • cb Function

    The callback function

getParamUrl

(
  • profileId
  • cb
)

Provided by the plugins module.

Gets the parameterized URL for the profile id. The settings are stored in mysql table user_settings.

Parameters:

  • profileId String

    The profile identifier

  • cb Function

    The callback function

getPbContact

(
  • id
  • cb
)

Provided by the plugins module.

Returns the centralized phonebook contact. It searches the id field in the phonebook database table.

Parameters:

  • id String

    The cti database contact identifier

  • cb Function

    The callback function

getPbContactsByNum

(
  • number
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the centralized address book. It searches the number in the fields: workphone, homephone and cellphone. It orders the results by name and company ascending. The centralized address book is the mysql phonebook.phonebook.

Parameters:

  • number String

    The phone number term to search

  • cb Function

    The callback function

getPbContactsContains

(
  • term
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the centralized address book. The specified term is wrapped with '%' characters, so it search any occurrences of the term in the fields: name, company, workphone, homephone and cellphone. It orders the results by name and company ascending. The centralized address book is the mysql phonebook.phonebook.

Parameters:

  • term String

    The term to search. It can be a name or a number. It will wrapped with '%' characters to search any occurrences of the term in the database fields.

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getPbContactsStartsWith

(
  • term
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the centralized address book. At the end of the specified term is added the '%' character, so it searches the entries whose fields name and company starts with the term. It orders the results by name and company ascending. The centralized address book is the mysql phonebook.phonebook.

Parameters:

  • term String

    The term to search. It can be a name or a number. It will ended with '%' character to search any contacts with names that starts with the term.

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getPbContactsStartsWithDigit

(
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets the phonebook contacts from the centralized address book. It searches the entries whose fields name and company starts with a digit. It orders the results by name and company ascending. The centralized address book is the mysql phonebook.phonebook.

Parameters:

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

getQueueMemberLastPausedInData

(
  • memberName
  • queueId
  • memberId
  • cb
)

Provided by the plugins module.

Gets the data of the more recent started pause of the queue member in the specified queue. It searches the results into the asteriskcdrdb.queue_log database. If the queue member has never started a pause, the data values isn't present in the database. So, in this case, the method returns some null values.

Parameters:

  • memberName String

    The queue member name

  • queueId String

    The queue identifier

  • memberId String

    The queue member identifier

  • cb Function

    The callback function

getQueueMemberLastPausedOutData

(
  • memberName
  • queueId
  • memberId
  • cb
)

Provided by the plugins module.

Gets the data of the more recent ended pause of the queue member in the specified queue. It searches the results into the asteriskcdrdb.queue_log database. If the queue member has never ended a pause, the data values isn't present in the database. So, in this case, the method returns some null values.

Parameters:

  • memberName String

    The queue member name

  • queueId String

    The queue identifier

  • memberId String

    The queue member identifier

  • cb Function

    The callback function

getQueueRecall

(
  • data
  • cb
)

Provided by the plugins module.

Gets the last calls from queue_log db table basing the search with the last X hours of the current day.

Parameters:

  • data Object
    • hours String

      The value of the hours to be searched

    • queues Array

      The queues identifiers

  • cb Function

    The callback function

getQueueRecallInfo

(
  • data
  • cb
)

Provided by the plugins module.

Gets the details about caller id from queue_recall db table.

Parameters:

  • data Object
    • hours String

      The value of the hours of the current day to be searched

    • cid String

      The caller identifier

    • qid String

      The queue identifier

  • cb Function

    The callback function

getQueueRecallQueryTable

(
  • hours
)
String private

Provided by the plugins module.

Gets the query that returns the entries corresponding to queue recalls table.

Parameters:

  • hours String

    The value of the interval time to be searched

Returns:

String:

The query to obtain the entries about queue recall table

getQueuesQOS

(
  • day
  • cb
)

Provided by the plugins module.

Get answered calls statistics by hold time

Parameters:

  • day String

    The query date (YYYYMMDD)

  • cb Function

    The callback function

getQueuesStats

(
  • day
  • cb
)

Provided by the plugins module.

Gets statistics about queues.

Parameters:

  • day String

    The query date (YYYYMMDD)

  • cb Function

    The callback function

getQueueStats

(
  • qid
  • nullCallPeriod
  • sla
  • cb
)

Provided by the plugins module.

Gets statistic about the queue.

Parameters:

  • qid String

    The queue identifier

  • nullCallPeriod Number

    The period of time to consider a call as null

  • sla String

    The service level of the queue

  • cb Function

    The callback function

getUserSettings

(
  • username
  • cb
)

Provided by the plugins module.

Return the user settings. The settings are stored in mysql table user_settings.

Parameters:

  • username String

    The username

  • cb Function

    The callback function

getUserSettings

(
  • username
  • cb
)

Provided by the plugins module.

Gets the settings of the user. The settings are stored in mysql table user_settings.

Parameters:

  • username String

    The user identifier

  • cb Function

    The callback function

getVmMailboxFromDbId

(
  • dbid
  • cb
)

Provided by the plugins module.

Returns the voicemail mailbox from the identifier of the voicemail in the database.

Parameters:

  • dbid String

    The voicemail identifier in the database

  • cb Function

    The callback function

getVoicemailMsg

(
  • vmId
  • type
  • [offset]
  • [limit]
  • cb
)

Provided by the plugins module.

Gets all the voice messages of a voicemail of the specified type. It search the results into the asteriskcdrdb.voicemessages database. The type can be "new" or "old".

Parameters:

  • vmId String

    The voicemail identifier

  • type String

    The type of the message

  • [offset] Integer optional

    The offset results start from

  • [limit] Integer optional

    The results limit

  • cb Function

    The callback function

isAtLeastExtenInCall

(
  • uniqueid
  • extensions
  • cb
)

Provided by the plugins module.

Checks if at least one of the specified extension of the list is involved in the recorded call.

Parameters:

  • uniqueid String

    The call identifier: is the uniqueid field of the asteriskcdrdb.cdr database table

  • extensions Array

    The list of the extensions to check

  • cb Function

    The callback function. If none of the extensions is involved in the call, the callback is called with a false boolean value. Otherwise it is called with the entry of the database

listAllAnnouncement

(
  • cb
)

Provided by the plugins module.

Returns all audio files for announcements.

Parameters:

  • cb Funcion

    The callback function

listAllPublicAndUserPrivateAnnouncement

(
  • username
  • cb
)

Provided by the plugins module.

Returns all audio files with public privacy and all private of the specified user.

Parameters:

  • username String

    The user who requested the operation

  • cb Funcion

    The callback function

listenCustomMessage

(
  • vm
  • type
  • cb
)

Provided by the plugins module.

Returns audio file of the custom audio message of the voicemail.

Parameters:

  • vm String

    The voicemail identifier

  • type String

    The type of the custom message ("unavail"|"busy"|"greet")

  • cb Function

    The callback function

listenVoiceMessage

(
  • dbid
  • cb
)

Provided by the plugins module.

Returns audio file from the id mailbox.

Parameters:

  • dbid String

    The voicemail identifier in the database

  • cb Function

    The callback function

listUserAnnouncement

(
  • username
  • cb
)

Provided by the plugins module.

Returns all audio files of the specified user.

Parameters:

  • username String

    The user who requested the operation

  • cb Funcion

    The callback function

modifyAnnouncement

(
  • data
  • cb
)

Provided by the plugins module.

Modify data about the specified announcement.

Parameters:

  • data Object
    • id String

      The announcement identifier

    • [privacy] String optional

      The announcement visibility

    • [description] String optional

      The announcement description

  • cb Function

    The callback function

modifyCtiPbContact

(
  • data
  • cb
)

Provided by the plugins module.

Modify the specified phonebook contact in the cti_phonebook database table.

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
)

Provided by the plugins module.

Saves the new contact in the NethCTI phonebook that is in the cti_phonebook database table.

Parameters:

  • data Object

    All the contact information to save in the database

    • owner_id String

      The owner of the contact

    • type String

      The type

    • name String

      The name

    • [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

saveUserAutoDndOffLogin

(
  • data
  • cb
)

Provided by the plugins module.

Save the user automatic DND OFF status when user login to cti into mysql table user_settings.

Parameters:

  • data Object
    • username String

      The username to set the notification setting

    • enable String

      The value

  • cb Function

    The callback function

saveUserAutoDndOnLogout

(
  • data
  • cb
)

Provided by the plugins module.

Save the user automatic DND ON status when user logout from cti into mysql table user_settings.

Parameters:

  • data Object
    • username String

      The username to set the notification setting

    • enable String

      The value

  • cb Function

    The callback function

saveUserAutoQueueLogin

(
  • data
  • cb
)

Provided by the plugins module.

Save the user automatic queue login setting into mysql table user_settings.

Parameters:

  • data Object
    • username String

      The username to set the notification setting

    • enable String

      The value

  • cb Function

    The callback function

saveUserAutoQueueLogout

(
  • data
  • cb
)

Provided by the plugins module.

Save the user automatic queue logout setting into mysql table user_settings.

Parameters:

  • data Object
    • username String

      The username to set the notification setting

    • enable String

      The value

  • cb Function

    The callback function

saveUserDefaultExtension

(
  • data
  • cb
)

Provided by the plugins module.

Save the user default extension setting into mysql table user_settings.

Parameters:

  • data Object
    • username String

      The username to set the notification setting

    • exten String

      The extension identifier

  • cb Function

    The callback function

saveUserNotifySetting

(
  • data
  • cb
)

Provided by the plugins module.

Save the user notification settings. The settings are stored in mysql table user_settings.

Parameters:

  • data Object
    • type String

      The type of the notification, e.g. "voicemail"

    • when String

      When receive the notification type

    • method String

      The method to use by the notification, e.g. "email"

    • username String

      The username to set the notification setting

  • cb Function

    The callback function

saveUserSetting

(
  • username
  • keyName
  • value
  • cb
)

Provided by the plugins module.

Saves a key-value pair representing a single user setting. The setting are stored in mysql table user_settings.

Parameters:

  • username String

    The username to set the setting

  • keyName String

    The name of the key to store

  • value String

    The value of the key

  • cb Function

    The callback function

saveUserSettings

(
  • username
  • data
  • cb
)

Provided by the plugins module.

Save the user settings. The settings are saved in mysql table user_settings. If the settings are already present, they will be updated.

Parameters:

  • username String

    The username

  • data Object

    The JSON object containing key values to be stored

  • cb Function

    The callback function

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompDbconnMain

(
  • comp
)
static

Provided by the plugins module.

Set the main dbconn architect component.

Parameters:

  • comp Object

    The architect main dbconn component

setCompUtil

(
  • comp
)
static

Provided by the plugins module.

Set the util architect component.

Parameters:

  • comp Object

    The util component

setCustomVmAudioMsg

(
  • vm
  • type
  • audio
  • cb
)

Provided by the plugins module.

Add an entry into the asteriskcdrdb.voicemessages with the audio message content.

Parameters:

  • vm String

    The voicemail identifier

  • type String

    The type of the audio message ("unavail"|"busy"|"greet")

  • audio String

    The audio message content in binary format

  • cb Function

    The callback function

setLogger

(
  • log
)
static

Provided by the plugins module.

Set the logger to be used.

Parameters:

  • log Object

    The logger object.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setLogger

(
  • log
)
static

Provided by the plugins module.

Set the logger to be used.

Parameters:

  • log Object

    The logger object.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setLogger

(
  • log
)
static

Provided by the plugins module.

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.

setOffhour

(
  • data
  • cb
)

Provided by the plugins module.

Set data about offhour service. It writes all passed parameters.

Parameters:

  • data Object
    • enabled String

      ("always" | "period" | "never") corresponding values into the db are: "never": 0, "always": 1, "period": 2

    • [startDate] String optional

      The start date of the period (YYYYMMDD)

    • [startTime] String optional

      The start time of the period (HHmmss)

    • [endDate] String optional

      The end date of the period (YYYYMMDD)

    • [endTime] String optional

      The end time of the period (HHmmss)

    • calledIdNum String

      The called number of the inbound route

    • callerIdNum String

      The caller number of the inbound route

    • username String

      The user who requested the operation

    • action String

      The offhour service action: ("audiomsg" | "audiomsg_voicemail" | "redirect"). Corresponding values into the db are: "audiomsg": 0, "audiomsg_voicemail": 1, "redirect": 2

    • redirectTo String

      The destination to use with "action" = "redirect"

    • voicemailId String

      The voicemail destination to use with "action" = "audiomsg_voicemail"

    • announcementFilePath String

      File path of the audio announcement

    • announcementId String

      The identifier of the announcement

  • cb Funcion

    The callback function

setUserMobilePhoneNumber

(
  • username
  • pnumber
  • cb
)

Provided by the plugins module.

Store mobile phone number associated with the user.

Parameters:

  • username String

    The username

  • pnumber String

    The mobile phone number

  • cb Funcion

    The callback function

storeAudioFileAnnouncement

(
  • data
  • cb
)

Provided by the plugins module.

Store metadata about the audio file for announcement.

Parameters:

  • data Object
    • username String

      The user who requested the operation

    • filepath String

      The path of the audio file for announcement

    • privacy String

      The path of the audio file for announcement

    • description String

      The path of the audio file for announcement

  • cb Funcion

    The callback function

Properties

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

apiList

Object

Provided by the plugins module.

The exported apis.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compDbconnMain

Object private

Provided by the plugins module.

The main architect dbconn component.

compUtil

Object private

Provided by the plugins module.

The util component.

DB_TABLE_OFFHOUR

String private final

Provided by the plugins module.

The name of asterisk.offhour database table.

Default: "offhour"

DB_TABLE_OFFHOUR_FILES

String private final

Provided by the plugins module.

The name of nethcti3.offhour_files database table.

Default: "offhour_files"

EVT_DELETED_VOICE_MESSAGE

String

Provided by the plugins module.

The name of the listened voice message event.

Default: "deleteVoiceMessage"

EVT_LISTENED_VOICE_MESSAGE

String

Provided by the plugins module.

The name of the listened voice message event.

Default: "listenedVoiceMessage"

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_ast_proxy]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_phonebook]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_voicemail]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_history]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_config_manager]

IDLOG

String private final

The module identifier used by the logger.

Default: [arch_dbconn]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_user]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_customer_card]

IDLOG

String private final

Provided by the plugins module.

The module identifier used by the logger.

Default: [plugins/dbconn_offhour]

logger

Object private

Provided by the plugins module.

The logger.

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

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

Default: console

logger

Object private

Provided by the plugins module.

The logger.

Default: console

NETHCTI_CENTRAL_TYPE

String private

Provided by the plugins module.

The type name of the cti contacts imported into the centralized phonebook.

Default: "nethcti"

Events

deleteVoiceMessage

Provided by the plugins module.

Fired when a voice message has been deleted from the database by the deleteVoiceMessage method.

Event Payload:

  • voicemail Object

    The voicemail identifier

listenedVoiceMessage

Provided by the plugins module.

Fired when a voice message content has been read from the database by the listenVoiceMessage method.

Event Payload:

  • voicemail Object

    The voicemail identifier