com.motorola.iden.call
Interface InterconnectCall

All Superinterfaces:
Call

public interface InterconnectCall
extends Call

A InterconnectCall is an interface that provides basic InterConnect Call functionality. The InterconnectCall is a holder for the methods to receive an incoming phone call from java. CallHandler.getInstance() method needs to be called with a specific type to register with InterconnectCall.

The interface provides methods like getIncomingLineNumber, PlayRinger, and callAction.

A Call may have Connections associated with it through some external action or through an application successfully invoking the InterconnectCall.interconnectAction() method.


Field Summary
static int ACCEPT_CALL
          The InterconnectCall.ACCEPT_CALL indicates an action_type to accept a phone call.
static int END_CALL
          The InterconnectCall.END_CALL indicates an action_type to end a phone call.
static int HOLD_CALL
          The InterconnectCall.HOLD_CALL indicates an action_type to hold a phone call.
static int LINE1
          The InterconnectCall.LINE1 indicates the Line1 of a phone.
static int LINE2
          The InterconnectCall.LINE2 indicates the Line1 of a phone.
static int REJECT_CALL
          The InterconnectCall.REJECT_CALL indicates an action_type to reject a phone call.
static int RESUME_CALL
          The InterconnectCall.RESUME_CALL indicates an action_type to resume a phone call.
 
Fields inherited from interface com.motorola.iden.call.Call
PHRX_NO_CALLER_ID_1, PHRX_NO_CALLER_ID_2
 
Method Summary
 void enableMute(boolean state)
          The method turns the Mute on/off based on the parameter passed.
 int getLineNumber()
          Returns an incoming line number.
 void interconnectAction(int action_type, java.lang.String phoneNumber)
          The method Accepts, Rejects, Ends call based on the provided action type and phone number.
 void playRinger(int index)
          Plays ringer based on the index provided as a parameter.
 void startDTMF(char digit)
          The function sends dtmf digits while in a phone call.
 void stopDTMF()
          The function sends notification to stop dtmf tone while in a phone call.
 void switchPhoneCall()
          The function switches the calls back and forth.
 
Methods inherited from interface com.motorola.iden.call.Call
enableSpkrPhone, getCallNumber, getCallState, getCallType
 

Field Detail

LINE1

public static final int LINE1
The InterconnectCall.LINE1 indicates the Line1 of a phone.

It is used to identify the line number of an InterconnectCall.

See Also:
Constant Field Values

LINE2

public static final int LINE2
The InterconnectCall.LINE2 indicates the Line1 of a phone.

It is used to identify the line number of an InterconnectCall.

See Also:
Constant Field Values

REJECT_CALL

public static final int REJECT_CALL
The InterconnectCall.REJECT_CALL indicates an action_type to reject a phone call.

This is used to reject an incoming phone call.

See Also:
Constant Field Values

ACCEPT_CALL

public static final int ACCEPT_CALL
The InterconnectCall.ACCEPT_CALL indicates an action_type to accept a phone call.

This is used to accept an incoming phone call.

See Also:
Constant Field Values

END_CALL

public static final int END_CALL
The InterconnectCall.END_CALL indicates an action_type to end a phone call.

This is used to end a phone call.

See Also:
Constant Field Values

HOLD_CALL

public static final int HOLD_CALL
The InterconnectCall.HOLD_CALL indicates an action_type to hold a phone call.

This is used to hold a phone call.

See Also:
Constant Field Values

RESUME_CALL

public static final int RESUME_CALL
The InterconnectCall.RESUME_CALL indicates an action_type to resume a phone call.

This is used to resume a phone call.

See Also:
Constant Field Values
Method Detail

getLineNumber

public int getLineNumber()
Returns an incoming line number.

The state of an Interconnect Call must not be in INCOMING state.

Returns:
an integer value of line number

interconnectAction

public void interconnectAction(int action_type,
                               java.lang.String phoneNumber)
The method Accepts, Rejects, Ends call based on the provided action type and phone number.

To Hold, and Resume an active call, State of a call must be matched. If two calls are active, neither Hold, nor Resume will work. * To operate on the other call, switchPhoneCall()method should be used.

Parameters:
action_type - - Type of an action. 1 - REJECT_CALL, 2 - ACCEPT_CALL, 3 - END_CALL, 4 - HOLD_CALL, 5 - RESUME_CALL
phoneNumber - - The incoming phone number to operate the action for a particular call
Throws:
java.lang.NumberFormatException - - If wrong phone number is passed.
java.lang.IllegalArgumentException - - If wrong action_type is passed or phonenumber does not match.
java.lang.IllegalStateException - - If the state of a call is not proper for the given action.

playRinger

public void playRinger(int index)
                throws java.lang.IndexOutOfBoundsException
Plays ringer based on the index provided as a parameter.

If -1 is passed as an index, it will play a default phone ringer.

Parameters:
index - index of a ringer.
Throws:
java.lang.IndexOutOfBoundsException - - If non-existing index is passed, this will be thrown.

enableMute

public void enableMute(boolean state)
The method turns the Mute on/off based on the parameter passed.

If true is passed, the Mute will be turned on. If false is passed, the Mute will be turned off. The state of a Call must be CALL_CONNECTED_STATE

Throws:
java.lang.IllegalStateException - - If the call is not in a connected state.

switchPhoneCall

public void switchPhoneCall()
The function switches the calls back and forth.

The foregrounded call must be connected and the back ground call must be on hold.

Throws:
java.lang.IllegalStateException - - If two calls are not active.

startDTMF

public void startDTMF(char digit)
The function sends dtmf digits while in a phone call.

The foregrounded call must be connected.

Throws:
java.lang.IllegalStateException - - If the call is not in a connected state.

stopDTMF

public void stopDTMF()
The function sends notification to stop dtmf tone while in a phone call.

The foregrounded call must be connected.

Throws:
java.lang.IllegalStateException - - If the call is not in a connected state.