Feedback

  • Contents
 

CallObject.extendedDial Method

Definition

This method dials a number, allows for call analysis, and optionally forces a timeout within a specified timeout period.

Syntax

CallObject.extendedDial(Number, TimeoutSecs, CallAnalysis, CallHandlerOnSuccess);

Prototype

CallObject.extendedDial(

  [in] string Number,

  [in] short TimeOutSecs,

  [in] Boolean CallAnalysis,

  [in] Boolean CallHandlerOnSuccess // not used, always set to True

)

Input Parameters

Number

A string containing the telephone number to call.

TimeoutSecs

A short value indicating the maximum number of seconds to wait for an answer. Fifteen seconds is typically a good value to specify for this parameter.

CallAnalysis

Set this Boolean value True if the call should be analyzed for special error conditions, such as Operator interrupt, Busy Signal, etc.

CallHandlerOnSuccess

This parameter should always be set True To determine the state of the call after it has been dialed, please use myQueue.objectChangedHandler as shown in the example below. Keep in mind that neither the TimeOutSecs parameter nor the CallHandlerOnSuccess parameter of the CallObject.extendedDial Method are supported in IceLib.

Return Values

None.


Example

var CallIDentifier = 0;
function MakeCall() {
    var CallObject = scripter.createCallObject();
    CallObject.extendedDial(Phonenumber.value, 30, "TRUE", "TRUE");
    CallIDentifier = CallObject.id;
    scripter.myQueue.objectChangedHandler = CheckCallID;
}
function CheckCallID(TypeId, ObjectId) {
    if (ObjectId == CallIDentifier) {
        var CallObject = scripter.callObject;
        CallObject.id = ObjectId;
        if (CallObject.state == 105) {
            alert("call connected successfully");
            scripter.myQueue.objectChangedHandler = null;
            CallIDentifier = 0;
        }
    }
}