NotifyConferenceUtil - Scoped, Global
The NotifyConferenceUtil API provides methods to manage Notify conference calls and SMS messages for various telephony service providers, such as Zoom and Webex.
Using the NotifyConferenceUtil API you can:
- Create new conference calls
- Add participants by phone number or user ID
- Remove participants from a conference call
- Mute participants in a conference call
- Unmute participants in a conference call
- Obtain the capabilities of a specified service provider
- End a conference call
You can use this API in both scoped and global scripts. To use this API you must activate the Conference Notify plugin (com.snc.notify) which requires a separate subscription. For details on activating this plugin, see Activate Notify.
NotifyConferenceUtils - NotifyConferenceUtils()
Instantiates a NotifyConferenceUtils object (constructor).
| Name | Type | Description |
|---|---|---|
| None |
function () {
var confGR = new GlideRecord('notify_conference_call');
confGR.get('76d3364d0b5133008e64aabcb4673a6d');
var confUtils = new NotifyConferenceUtils();
var actionResult = confUtils.addToConferenceByPhoneNumber("+917799555331", confGR)
if (actionResult.status)
gs.info('Participant has been added to conference');
else {
gs.info('join operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})();
NotifyConferenceUtils - addToConferenceByPhoneNumber(String toNumber, GlideRecord confGR)
Adds a participant to a specified conference call using their phone number to identify the participant.
| Name | Type | Description |
|---|---|---|
| toNumber | String | Phone number of the participant to add to the conference call. |
| confGR | GlideRecord | GlideRecord of the conference call to which to add the specified participant. These records are located in the Notify Conference Call [notify_conference_call] table. |
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
function () {
var confGR = new GlideRecord('notify_conference_call');
confGR.get('76d3364d0b5133008e64aabcb4673a6d');
var confUtils = new NotifyConferenceUtils();
var actionResult = confUtils.addToConferenceByPhoneNumber("+917799555331", confGR)
if (actionResult.status)
gs.info('Participant has been added to conference');
else {
gs.info('join operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})();
NotifyConferenceUtils - addToConferenceByUserId(String userId, GlideRecord confGR)
Adds a participant to the conference call referenced by the passed in GlideRecord using their unique user identifier.
| Name | Type | Description |
|---|---|---|
| userId | String | Sys ID of the participant to add to the specified conference call. This information is located in the User [sys_user] table. |
| confGR | GlideRecord | GlideRecord of the conference call to add the specified participant. These records are located in the Notify Conference Call [notify_conference_call] table. |
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
(function () {
var confGR = new GlideRecord('notify_conference_call');
confGR.get('76d3364d0b5133008e64aabcb4673a6d');
var confUtils = new NotifyConferenceUtils();
var actionResult = confUtils.addToConferenceByUserId(gs.getUserID(), confGR)
if (actionResult.status)
gs.info('Participant has been added to conference');
else {
gs.info('join operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})();
NotifyConferenceUtils - doConferenceAction(String action, Object data)
Performs the specified conference call action, such as starting/ending a conference call or joining, removing, muting, or unmuting participants from a conference call.
- Save pointers in the conference call record to the specific record (source record), such as an incident or problem, that is the topic of discussion for the conference call.
- Allow/disallow multiple conference calls for a source record.
- Automatically log the participants that were in the conference call in the "Work Notes" field of the source record.
- Have a message read aloud when a participant answers an outgoing call from the conference.
| Name | Type | Description |
|---|---|---|
| action | String | Defines the conference call action to perform. The
following are the available conference call actions:
|
| data | Object | Object that describes the conference call. |
| data.addToWorkNotes | Boolean | Flag that indicates whether to add information
about the participants that were included in the conference call in the work notes
field of the associated record.
For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record in which to add the work notes. Default: false Actions for which this parameter is valid:
|
| data.allowMulticonference | Boolean | Flag that indicates whether to allow multiple
conference calls for a specific record at one time.
For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record that is allowed to have multiple conference calls. Default: false Actions for which this parameter is valid:
|
| data.confId | String | Sys ID of the conference call.
The conference Sys ID is located in the Notify Conference Call [notify_conference_call] table. Actions for which this parameter is required:
Note: Participant actions such as mute, unmute, and kick do not require this
parameter to be set as the method obtains this information from the Notify
Conference Call Participant [notify_participant] table. |
| data.fromNumber | String | Service provider number to call into for the
conference call.
Locate this value in the Number or Phone number column of the Notify Phone Number [notify_number] table. Actions for which this parameter is required:
|
| data.isNewConference | Boolean | Flag that indicates whether this is a new or an
existing conference call.
Valid values:
Default: false Actions for which this parameter is valid:
|
| data.items | Array | Information for each participant to include in the
conference call.
Valid array values:
|
| data.message | String | Message that is read aloud when a user answers the call,
such as, "P1 incident has been created please login to instance."
Actions for which this parameter is valid:
|
| data.serviceProvider | String | Required. Name of conference service provider,
such as Zoom or Webex.
Actions for which this parameter is required:
|
| data.sysId | String | Sys ID of the source record to associate with the
conference call.
For example, if a conference call is held to discuss a specific incident or problem, put the Sys ID of the incident or problem record in this value. This Sys ID is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked. This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters. Actions for which this parameter is valid:
|
| data.table | String | Table that contains the source record to associate with
the conference call. A source record can be any record, such as an "incident" or
"problem", that is the topic of discussion in the conference call.
This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked. This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters. Actions for which this parameter is valid:
|
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
(function (confId) {
var confUtils = new NotifyConferenceUtils();
var data = confUtils.getConferenceInputDataTemplate();
data.table = 'incident';
data.sysId = '1234';
data.addToWorkNotes = false;
data.confId = confId;
data.message = 'p1 incident has been created';
data.fromNumber = 'twilio/Telephony driver number';
data.items.push({ id: 'user3SysId', phoneNumber: '+917799555332' });
data.items.push({ id: 'user4SysId', email: 'yln99518@gmail.com' });
var result = confUtils.doConferenceAction('start', data);
if (result.status) {
gs.info('Start conference action succeeded');
} else
gs.info('Start conference action failed');
result.errorMessages.forEach(function (msg) {
gs.info(msg);
});
result.warnMessages.forEach(function (msg) {
gs.info(msg);
});
result.successMessages.forEach(function (msg) {
gs.info(msg);
});
})('activeConfSysId');
NotifyConferenceUtils - getConferenceInputDataTemplate()
Returns a JSON data template to use with the doConferenceAction() method. Using this template automatically structures the data object so that you don't have to manually create it.
Call this method prior to calling the doConferenceAction() method. For the desired conference call action, set the desired parameters within the template, and then pass the template in the doConferenceAction() call. For additional information on the valid parameters for each action, see doConferenceAction().
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| data | Object that describes the conference call. |
| data.addToWorkNotes | Flag that indicates whether to add information
about the participants that were included in the conference call in the work notes
field of the associated record.
For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record in which to add the work notes. Default: false Actions for which this parameter is valid:
|
| data.allowMultconference | Flag that indicates whether to allow multiple
conference calls for a specific record at one time.
For this functionality to work, you must also specify values in the data.table and data.sysId parameters. These parameters identify the record that is allowed to have multiple conference calls. Default: false Actions for which this parameter is valid:
|
| data.confId | Sys ID of the conference call.
The conference Sys ID is located in the Notify Conference Call [notify_conference_call] table. Actions for which this parameter is required:
Note: Participant actions such as mute, unmute, and kick do not require this
parameter to be set as the method obtains this information from the Notify
Conference Call Participant [notify_participant] table. |
| data.fromNumber | Service provider number to call into for the
conference call.
Locate this value in the Number or Phone number column of the Notify Phone Number [notify_number] table. Actions for which this parameter is required:
|
| data.isNewConference | Flag that indicates whether this is a new or an
existing conference call.
Valid values:
Default: false Actions for which this parameter is valid:
|
| data.items | Information for each participant to include in the
conference call.
Valid array values:
|
| data.message | Message that is read aloud when a user answers the call,
such as, "P1 incident has been created please login to instance."
Actions for which this parameter is valid:
|
| data.serviceProvider | Required. Name of conference service provider,
such as Zoom or Webex.
Actions for which this parameter is required:
|
| data.sysId | Sys ID of the source record to associate with the
conference call.
For example, if a conference call is held to discuss a specific incident or problem, put the Sys ID of the incident or problem record in this value. This Sys ID is stored in the Source column of the NotifyConference Call [notify_conference_call] table and can later be tracked. This parameter is used in conjunction with the data.Table, data.addToWorkNotes, and allowMulticonference parameters. Actions for which this parameter is valid:
|
| data.table | Table that contains the source record to associate with
the conference call. A source record can be any record, such as an "incident" or
"problem", that is the topic of discussion in the conference call.
This table name is stored in the Table column of the NotifyConference Call [notify_conference_call] table and can be tracked. This parameter is used in conjunction with the data.sysId, data.addToWorkNotes, and allowMulticonference parameters. Actions for which this parameter is valid:
|
(function (confId) {
var confUtils = new NotifyConferenceUtils();
var data = confUtils.getConferenceInputDataTemplate();
data.confId = confId;
var result = confUtils.doConferenceAction('end', data);
if (result.status) {
gs.info('Conference call has been ended');
} else
gs.info('End conference call action failed');
result.errorMessages.forEach(function (msg) {
gs.info(msg);
});
result.warnMessages.forEach(function (msg) {
gs.info(msg);
});
result.successMessages.forEach(function (msg) {
gs.info(msg);
});
})('activeConfSysId');
NotifyConferenceUtils - getServiceProvidersCapabilities()
Returns the capabilities of all telephony service provider drivers in the instance.
- archive: archives the conference after it ends
- beepOnLeave: plays a "beep" tone when a participant leaves the conference call
- beepOnJoin: plays a "beep" tone when a participant joins the conference call
- end: ends the identified conference call
- filesharing: allows file sharing between participants
- join: adds a participant to a conference call
- kick: removes a participant from a conference call
- multiJoin: adds multiple participants to a conference call
- multiKick: removes multiple participants from a conference call
- muteOnJoin: mutes a participant when they initially join a conference call
- multiUnmute: unmutes multiple participants for a conference call
- record: records conference calls
- recording: provides an on-screen indicator when the conference call is being recorded
- screenSharing: allows participant screens to be shared with the group
- selfJoin: adds the current logged in user to a conference call
- speaking: provides an on-screen message as to who is currently speaking
- start: starts the identified conference call
- unmute: unmutes a participant in a conference call
| Name | Type | Description |
|---|---|---|
| None |
| Type | Description |
|---|---|
| Object | Key-value pairs of the status of each driver capability. Valid values:
|
List driver capabilities for all telephony service provider drivers in the instance.
(function () {
var confUtils = new NotifyConferenceUtils();
var providerToCapability = confUtils.getServiceProvidersCapabilites();
for (var provider in providerToCapability) {
gs.info('{0} supported capabilities \n\n', provider);
var capabilities = providerToCapability[provider]
for (var cap in capabilities)
if(confUtils.isActionSupported(capabilities[cap].isSupported))
gs.info('"{0}" action supported', cap);
else
gs.info("'{0}' action is not supported by this conference driver", cap);
}
})();
Output: The method returns a node similar to the following for each active telephony service provider within the instance.
{
"Telephony": {
"start": {
"isSupported": 1,
"meta": {}
},
"end": {
"isSupported": 1,
"meta": {}
},
"selfJoin": {
"isSupported": 1,
"meta": {}
},
"join": {
"isSupported": 1,
"meta": {}
},
"multiJoin": {
"isSupported": 1,
"meta": {}
},
"mute": {
"isSupported": 1,
"meta": {}
},
"multiMute": {
"isSupported": 1,
"meta": {}
},
"unmute": {
"isSupported": 1,
"meta": {}
},
"multiUnmute": {
"isSupported": 1,
"meta": {}
},
"kick": {
"isSupported": 1,
"meta": {}
},
"multiKick": {
"isSupported": 1,
"meta": {}
},
"record": {
"isSupported": 0,
"meta": {}
},
"speaking": {
"isSupported": 0,
"meta": {}
},
"recording": {
"isSupported": 0,
"meta": {}
},
"screenSharing": {
"isSupported": 0,
"meta": {}
},
"fileSharing": {
"isSupported": 0,
"meta": {}
},
"archive": {
"isSupported": 0,
"meta": {}
},
"muteOnJoin": {
"isSupported": 0,
"meta": {}
},
"beepOnJoin": {
"isSupported": 0,
"meta": {}
},
"beepOnLeave": {
"isSupported": 0,
"meta": {}
}
}
}
NotifyConferenceUtils - isActionSupported(Number action)
Determines whether a Notify conference action is supported by a telephony service provider.
To use this method, you must first call the getServiceProviderCapabilities() method. This method returns an object that contains information about the availability of each possible Notify conference action for each service provider configured in your instance.
For example:
{
"Telephony": {
"start": {
"isSupported": 1,
"meta": {}
},
"end": {
"isSupported": 1,
"meta": {}
},
"selfJoin": {
"isSupported": 1,
"meta": {}
},
"join": {
"isSupported": 1,
"meta": {}
},
"multiJoin": {
"isSupported": 1,
"meta": {}
},
"mute": {
"isSupported": 1,
"meta": {}
},
"multiMute": {
"isSupported": 1,
"meta": {}
},
"unmute": {
"isSupported": 1,
"meta": {}
},
"multiUnmute": {
"isSupported": 1,
"meta": {}
},
"kick": {
"isSupported": 1,
"meta": {}
},
"multiKick": {
"isSupported": 1,
"meta": {}
},
"record": {
"isSupported": 0,
"meta": {}
},
"speaking": {
"isSupported": 0,
"meta": {}
},
"recording": {
"isSupported": 0,
"meta": {}
},
"screenSharing": {
"isSupported": 0,
"meta": {}
},
"fileSharing": {
"isSupported": 0,
"meta": {}
},
"archive": {
"isSupported": 0,
"meta": {}
},
"muteOnJoin": {
"isSupported": 0,
"meta": {}
},
"beepOnJoin": {
"isSupported": 0,
"meta": {}
},
"beepOnLeave": {
"isSupported": 0,
"meta": {}
}
}
}| Name | Type | Description |
|---|---|---|
| action | Number | Value of the isSupported parameter returned by the getServiceProvidersCapabilities() method for a specific action and service provider. Note: Although the isSupported value may appear to be a
Boolean, it is actually a Number. Do not try and evaluate the capabilities as
Boolean values. Use this method as the associated values may be expanded in future
versions. |
| Type | Description |
|---|---|
| Boolean | Flag that indicates whether the telephony service provider supports the
specified action. Valid values:
|
(function () {
var confUtils = new NotifyConferenceUtils();
var providerToCapability = confUtils.getServiceProvidersCapabilites();
for (var provider in providerToCapability) {
gs.info('{0} supported capabilities \n\n', provider);
var capabilities = providerToCapability[provider]
for (var cap in capabilities)
if (confUtils.isActionSupported(capabilities[cap].isSupported))
gs.info('"{0}" action supported', cap);
else
gs.info("'{0}' action is not supported by this conference driver", cap);
}
})();
NotifyConferenceUtils - kickByParticipantGR(GlideRecord notifyParticipantGR)
Removes the participant associated with the passed in GlideRecord from the current conference call.
| Name | Type | Description |
|---|---|---|
| notifyParticipantGR | GlideRecord | GlideRecord object of the participant to remove from the conference call. These records are located in the Notify Participant [notify_participant] table. |
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
(function () {
var confUtils = new NotifyConferenceUtils();
var participantGR = new GlideRecord('notify_participant'); // Participant record contains conf call ID
participantGR.get('validParticipantSysId');
var actionResult = confUtils.kickByParticipantGR(participantGR);
if (actionResult.status)
gs.info('Participant has been kicked out of conference');
else {
gs.info('kick operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})()
NotifyConferenceUtils - muteByParticipantGR(GlideRecord notifyParticipantGR)
Mutes the participant associated with the passed in GlideRecord on the current conference call.
| Name | Type | Description |
|---|---|---|
| notifyParticipantGR | Object | GlideRecord object of the participant to mute. These records are located in the Notify Participant [notify_participant] table. |
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
(function () {
var confUtils = new NotifyConferenceUtils();
var participantGR = new GlideRecord('notify_participant');
participantGR.get('validSysId');
var actionResult = confUtils.muteByParticipantGR(participantGR);
if (actionResult.status)
gs.info('Participant has been muted');
else {
gs.info('mute operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})()
NotifyConferenceUtils - unmuteByParticipantGR(GlideRecord notifyParticipantGR)
Unmutes the participant associated with the passed in GlideRecord on the current conference call.
| Name | Type | Description |
|---|---|---|
| notifyParticipantGR | GlideRecord | GlideRecord object of the participant to unmute. These records are located in the Notify Participant [notify_participant] table. |
| Type | Description |
|---|---|
| Object | Results of the conference
action.
|
(function () {
var confUtils = new NotifyConferenceUtils();
var participantGR = new GlideRecord('notify_participant');
participantGR.get('validSysId');
var actionResult = confUtils.unmuteByParticipantGR(participantGR);
if (actionResult.status)
gs.info('Participant has been Unmuted');
else {
gs.info('Unmute operation failed');
actionResult.warnMessages.forEach(function (msg) {
gs.info(msg);
});
actionResult.errorMessages.forEach(function (msg) {
gs.info(msg);
})
}
})();