- Contents
Interaction Scripter Developer's Guide
Queue.callObjectAddedHandler Callback Property
Definition
Queue.callObjectAddedHandler allows you to define a function that executes when a call object is added to a queue. This method is called only when a call object is added to the monitored queue.
Usage
Read Yes
Write Yes
Compatibility
This callback is compatible with scripts for Scripter .NET Client or Interaction Connect.
Syntax
Queue.callObjectAddedHandler(CallObject)
Parameters
- CallObject
-
The actual call object that was added is passed.
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". Function pointers are used when you wish to change the value of a property. When defining your custom function, you should define CallObject as the argument to the function. e.g.: function foo(CallObject).
Example
<html> <head> <title>Scripter Object</title> <meta name="IS_System_AgentName">
<script language="JavaScript"> var QueueEx = scripter.createQueue();
function ConnectQueue() { QueueEx.connect(QueueType.value, QueueName.value); QueueEx.callObjectAddedHandler = CallObjectAdded; QueueEx.objectAddedHandler = QueueObjectAdded; QueueEx.objectChangedHandler = QueueObjectChanged; QueueEx.objectRemovedHandler = QueueObjectRemoved; alert("Connection established to Queue: " + QueueEx.name); }
function CallObjectAdded(callobj) { alert("call was added to user queue: " + callobj.id); }
function QueueObjectAdded(TypeId, ObjectId) { alert("object was added: " + ObjectId + "\n Type: " + TypeId); }
function QueueObjectRemoved(TypeId, ObjectId) { alert("object was removed: " + ObjectId + "\n Type: " + TypeId); }
function QueueObjectChanged(TypeId, ObjectId) { alert("object was changed: " + ObjectId + "\n Type: " + TypeId); }
</script> </head>
<body> <table> <tr> <td> <input type="button" value="Connect Queue" onclick="ConnectQueue();"></input> </td> <td>Queue Name</td> <td><input name="QueueName" value="" style="width:100"></input> </td> <td>Queue Type</td> <td><input name="QueueType" value="9" style="width:100"></input> </td> </tr> </table> </body> </html>