AllowReceivingCalls

Description

Allows reception of incoming calls.

Applies to

PhoneCall objects

Syntax

objectname.AllowReceivingCalls ( allow )

Argument

Description

objectname

The name of the PhoneCall object that will be allowed to receive calls

allow

A boolean indicating whether incoming calls will be accepted

Returns

Integer. Returns 1 for success and a negative value if an error occurs.

Usage

The AllowReceivingCalls function is typically called immediately after a PhoneCall object has been initialized.

Examples

Example 1

In the following script for the cb_allow button, if the call has been initialized, the AllowReceivingCalls function is called and the cb_allow button’s text is toggled between “Disable Receive” and “Enable Receive”. The g_phInit global variable is set to 1 in the pcall_1 object’s constructor:

// Global variables: Long g_phInit = 0
// boolean gb_Allow
integer li_ret
if ( g_phInit > 0) then
   li_ret = pcall_1.AllowReceivingCalls(gb_Allow)
   if ( gb_Allow = true) then
      this.text = "Disable Receive"
      gb_Allow = false
   else
      this.text = "Enable Receive"
      gb_Allow = true
   end if
else
   sle_1.text = "Call not initialized"
end if

See also