Feedback

  • Contents
 

CallObject.state Property

Definition

This property returns the integer value corresponding to the call state of the call object. 

Syntax

CallObject.state

Usage

Read       Yes

Write       No

Value Assigned

None.

Value Returned

CallState

The return value represents the Call State string.  The table below lists Call State values for recent releases of Customer Interaction Center.

Call State

String  Value

Alerting

1

Connected

105

Dialing

103

Disconnected

106

Initializing

100

ManualDialing

102

Offering

101

OnHold

6

Proceeding

104

StationAudio

107


Example

<html>
<head>
    <title>Scripter Object</title>
    <meta name="IS_System_AgentName">

    <script language="JavaScript">         var CallIDentifier = 0;         function MakeCall() {             var CallObject = scripter.createCallObject();             CallObject.extendedDial(Phonenumber.value, 30, "TRUE", "TRUE");             CallIDentifier = CallObject.id;             scripter.myQueue.objectChangedHandler = CheckCallID;             LocalId.value = CallObject.localId;             LocalLocation.value = CallObject.localLocation;             LocalName.value = CallObject.localName;         }
        function CheckCallID(TypeId, ObjectId) {             if (ObjectId == CallIDentifier) {                 var CallObject = scripter.callObject;                 CallObject.id = ObjectId;
                if (CallObject.state == 105) {                     alert("call connected successfully");                     RemoteId.value = CallObject.remoteId;                     RemoteLocation.value = CallObject.remoteLocation;                     RemoteName.value = CallObject.remoteName;                     scripter.myQueue.objectChangedHandler = null;                     call.value = 0;                     CallIDentifier = 0;                 }             }         }     </script> </head>
<body>     <table>         <tr>             <td><input type=button value="dial" onclick="MakeCall();"></input></td>             <td>Phonenumber</td>             <td><input name="Phonenumber" id="Phonenumber"></input></td>         </tr>         <tr>             <td>Local Id</td>             <td><input name="LocalId" value="" style="width:100"></input></td>             <td>Local Location</td>             <td><input name="LocalLocation" value="" style="width:100"></input></td>             <td>Local Name</td>             <td><input name="LocalName" value="" style="width:100"></input></td>         </tr>         <tr>             <td>Remote Id</td>             <td><input name="RemoteId" value="" style="width:100"></input></td>             <td>Remote Location</td>             <td><input name="RemoteLocation" value="" style="width:100"></input></td>             <td>Remote Name</td>             <td><input name="RemoteName" value="" style="width:100"></input></td>         </tr>     </table> </body>
</html>