- Contents
Interaction Scripter Developer's Guide
ConferenceObject.subObjectChangeHandler Callback Property
Definition
This method is called when a sub-object (such as a call in a conference) is affected by an event . If you pass the name of a user-defined function to ConferenceObject.stateChangeHandler, the function will be called whenever the call state changes. This method is used to monitor queue objects that are made up of other objects. For example, a conference object consists of multiple call objects.
Usage
Read Yes
Write Yes
Compatibility
This functionality is only available with scripts for Interaction Connect. It is not available in Scripter .Net client.
Syntax
ConferenceObject.subObjectChangeHandler(ChangedAttributes, MemberInteraction)
Parameters
- ChangedAttributes
-
An object containing the specific attributes of the conference member that changed.
- MemberInteraction
-
The interaction object of the conference member that changed.
Value Assigned
- Function Pointer
-
A function pointer is the address in memory where a user-defined function is loaded. Function pointers pass the address of a user-defined function to another function declared within an application. In a script, the function pointer is simply the name of the function. For example, if your code contains a function named "foo", the function pointer would also be named "foo". When defining your custom function, you may define the following arguments in the function. e.g.: function foo(Type ID, CallID, ChangeID).
Example
The following example assumes a conference has already been started. In the example, the subObjectCahngedHandler callback assigned to the conference object will log to the browser the Interaction Id and state of the member interaction as well as each attribute that has changed.
var conferenceMemberChanged = function(changedAttributes, memberInteraction) { console.log("Member Interaction Id: ", memberInteraction.interactionId, "Member state: ", memberInteraction.stateDisplayString); changedAttributes.forEach(function(attribute) { console.log("Attribute Name: ", attribute.attributeName, "Previous Value: ", attribute.oldValue, "New Value: ", attribute.newValue); } } scripter.conferenceObject.subObjectChangedHandler = conferenceMemberChanged;