SetHold

Description

Allows the user to put the current call on hold or retrieve a call that is on hold.

Applies to

PhoneCall objects

Syntax

objectname.SetHold ( holdstate )

Argument

Description

objectname

The name of the PhoneCall object.

holdstate

A boolean that indicates whether the call is to be put on hold or retrieved from hold. Values are:

  • true Hold the current call

  • false Retrieve a call that is on hold

Returns

Integer. Returns a value that indicates the state of the phone call before SetHold is called, if it succeeds. Returns a negative value if an error occurs. Values are:

Examples

Example 1

The following script for a Hold button puts a call on hold if it was not on hold and retrieves a call from hold if it was on hold:

// Global variable: Long g_phInit = 0
// set to 1 in pcall_1 constructor
// Global variable gb_holdstate
integer li_ret
if ( g_phInit > 0) then
   li_ret = pcall_1.SetHold( gb_holdstate)
   if (gb_holdstate = true) then
      gb_holdstate = false
   else
      gb_holdstate = true
   end if
else
   sle_1.text = "Call not initialized"
end if

See also