|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
CallControlCall
interface extends the core
Call
interface. This interface provides additional methods on
a Call.
The calling address, as returned by the
CallControlCall.getCallingAddress()
method is the Address which
originally placed the Call. The calling terminal, as returned by the
CallControlCall.getCallingTerminal()
method is the Terminal
which originally placed the Call. The called Address, as returned by the
CallControlCall.getCalledAddress()
method is the Address to
which the Call was originally placed. The last redirected address, as
returned by the CallControlCall.getLastRedirectedAddress()
method is the Address to which this Call was placed before the current
destination Address. For example, if a Call was forwarded from one Address
to another, then the first Address is the last redirected Address for this
call.
Each of these methods returns null
if their values are
unknown at the present time. During the lifetime of a Call, an
implementation may learn this additional information, and return different
values for some or all of these methods as a result.
Applications invoke the CallControlCall.conference()
method to
perform the conferencing feature. This method is given the "second"
Call as an argument. All participants are moved from the second Call to the
Call on which the method is invoked. The second Call moves into the
Call.INVALID
state as a result.
In order for the conferencing feature to happen, there must be a common
participant to both Calls, as represented by a single Terminal and two
TerminalConnections, one on each of the two Calls. These two
TerminalConnections are known as the conference controllers. In
the real-world, one of the two telephone calls must be on hold with respect
to the controlling Terminal, and hence, the TerminalConnection on the
second Call must be in the CallControlTerminalConnection.HELD
state. The two conference controlling TerminalConnections are merged into
one as a result of this method.
Applications may control which TerminalConnection acts as the conference
controller via the CallControlCall.setConferenceController()
method. The CallControlCall.getConferenceController()
method
returns the current conference controller, null
if there is
none. If no conference controller is set, the implementation chooses a
suitable TerminalConnection when the conferencing feature is invoked.
Applications invoke the CallControlCall.transfer()
method to
perform the transfer feature. There are two overloaded versions of this
method. The first method takes a second Call as an argument. This method
acts similarly to CallControlCall.conference()
, except the two
TerminalConnections on each Call with a common Terminal are removed from
both Calls. The second version takes a string telephone address as an
argument. This method removes the transfer controller participant while
placing the telephone call to the designated address. This latter version
of the transfer feature is often known as a single-step transfer.
In order for the transfer feature to happen, there must be a participant
which acts as the transfer controller. The transfer controller is a
TerminalConnection around which the transfer is performed. In the first
version of the CallControlCall.transfer()
method, the transfer
controller must be present on each of the two Calls and share a common
Terminal. In the second version, the transfer controller only applies to
the Call object on which the method is invoked (since there is no second
Call involved). In both cases, the transfer controller participant is no
longer part of any Call once the transfer feature is complete.
Applications may control which TerminalConnection acts as the transfer
controller via the CallControlCall.setTransferController()
method. The CallControlCall.getTransferController()
method
returns the current transfer controller, null
if there is
none. If no transfer controller is set, the implementation chooses a
suitable TerminalConnection when the conferencing feature is invoked.
Applications invoke the CallControlCall.consult()
method to
perform the consultation feature. The instance on which the method is
invoke is always the "idle" Call on which the consultation takes place.
There are two overloaded versions of this method. The first method takes a
TerminalConnection and a string telephone address as arguments. This
consultation telephone call is associated with the Call of the
TerminalConnection argument. This method places a telephone call from the
same originating endpoint specified by the TerminalConnection argument to
the designated telephone address string. The second version of this method
only takes a TerminalConnection as an argument, and permits applications to
use the CallControlConnection.addToAddress()
method to dial
the destination address string.
CallControlCall.addParty()
method adds a single party to
a Call given some telephone address string. The
CallControlCall.drop()
disconnects all parties from the
Call and moves it into the Call.INVALID
state. The
CallControlCall.offHook()
method takes an originating Address
and Terminal pair "off hook" and permits applications to dial destination
address digits one-by-one.
CallControlCall
interface are
reported via the CallObserver.callChangedEvent()
method. The
application observer object must also implement the
CallControlCallObserver
interface to express interest in the
call control package events. Applications receive events pertaining to the
CallControlConnection
and
CallControlTerminalConnection
interfaces via this observer as
well.
All CallControlCall
-related events must extend the
CallCtlCallEv
interface. There are no specific events
pertaining to the CallControlCall
interface, however.
Call
,
CallObserver
,
CallControlCallObserver
,
CallCtlCallEv
Field Summary |
Fields inherited from interface javax.telephony.Call |
ACTIVE, IDLE, INVALID |
Method Summary | |
Connection |
addParty(java.lang.String newParty)
Adds an additional party to an existing Call. |
void |
conference(Call otherCall)
Merges two Calls together, resulting in the union of the participants of both Calls being placed on a single Call. |
Connection |
consult(TerminalConnection tc)
Creates a consultation between this Call and an active Call. |
Connection[] |
consult(TerminalConnection tc,
java.lang.String dialedDigits)
Creates a consultation between this Call and an active Call. |
void |
drop()
Drops the entire Call. |
Address |
getCalledAddress()
Returns the called Address associated with this Call. |
Address |
getCallingAddress()
Returns the calling Address associated with this call. |
Terminal |
getCallingTerminal()
Returns the calling Terminal associated with this Call. |
TerminalConnection |
getConferenceController()
Returns the TerminalConnection which currently acts as the conference controller. |
boolean |
getConferenceEnable()
Return true if conferencing is enabled, false otherwise. |
Address |
getLastRedirectedAddress()
Returns the last redirected Address associated with this Call. |
TerminalConnection |
getTransferController()
Returns the TerminalConnection which currently acts as the transfer controller. |
boolean |
getTransferEnable()
Return true if transferring is enabled, false otherwise. |
Connection |
offHook(Address origaddress,
Terminal origterminal)
Takes the originating end of a Call off-hook. |
void |
setConferenceController(TerminalConnection tc)
Sets the TerminalConnection which acts as the conference controller for the Call. |
void |
setConferenceEnable(boolean enable)
Controls whether the Call is permitted or able to perform the conferencing feature. |
void |
setTransferController(TerminalConnection tc)
Sets the TerminalConnection which acts as the transfer controller for the Call. |
void |
setTransferEnable(boolean enable)
Controls whether the Call is permitted or able to perform the transferring feature. |
void |
transfer(Call otherCall)
This method moves all participants from one Call to another, with the exception of a selected common participant. |
Connection |
transfer(java.lang.String address)
This overloaded version of this method transfers all participants currently on this Call, with the exception of the transfer controller participant, to another telephone address. |
Methods inherited from interface javax.telephony.Call |
addCallListener, addObserver, connect, getCallCapabilities, getCallListeners, getCapabilities, getConnections, getObservers, getProvider, getState, removeCallListener, removeObserver |
Method Detail |
public Address getCallingAddress()
public Terminal getCallingTerminal()
public Address getCalledAddress()
public Address getLastRedirectedAddress()
public Connection addParty(java.lang.String newParty) throws InvalidStateException, InvalidPartyException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
CallControlConnection.ESTABLISHED
state. An additional
restriction requires that at most one other Connection may be in either
the CallControlConnection.QUEUED
,
CallControlConnection.OFFERED
, or
CallControlConnection.ALERTING
state.
Some telephony platforms impose restrictions on the number of Connections in a particular state. For instance, it is common to restrict the number of "alerting" Connections to at most one. As a result, this method requires that at most one other Connections is in the "queued", "offering", or "alerting" state. (Note that the first two states correspond to the core Connection "in progress" state). Although some systems may not enforce this requirement, for consistency, JTAPI specifies implementations must uphold the conservative requirement.
CallControlConnection.IDLE
state. Its state may have
progressed beyond "idle" before this method returns, and should be
reflected by an event. This new Connection will progress as any normal
destination Connection on a Call. Typical scenarios for this Connection
are described by the Call.connect()
method.
Pre-conditions:
newParty
- The telephone address of the party to be added.
InvalidStateException
- Either the Provider is not "in service",
the Call is not "active" or the proper conditions on the Connections does
not exist.
as designated by the pre-conditions for this method.
InvalidPartyException
- The destination address string is not
valid and/or complete.
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnCreatedEv
public void drop() throws InvalidStateException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
Connection.disconnect()
method on each Connection which is
part of the Call. Typically, each Connection on the Call will move into
the CallControlConnection.DISCONNECTED
state, each
TerminalConnection will move into the
CallControlTerminalConnection.DROPPED
state, and the Call
will move into the Call.INVALID
state.
There are some Connections for which the application does not possess the proper authority to disconnect. In this case, this method performs no action on these Connections. These Connections may disconnect naturally as a result of disconnecting other Connections, however. This method returns when it can successfully disconnect as many methods as it can. The application is notified via events whether the entire Call was successfully dropped.
Pre-conditions:
InvalidStateException
- Either the Provider was not "in service"
or the Call was not "active".
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method and it can drop none of the
Connections.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnDisconnectedEv
,
TermConnDroppedEv
,
CallInvalidEv
,
CallCtlConnDisconnectedEv
,
CallCtlTermConnDroppedEv
public Connection offHook(Address origaddress, Terminal origterminal) throws InvalidStateException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
CallControlConnection.addToAddress()
method. This is in contrast to the Call.connect()
method
which requires the complete destination address string.
This method takes the originating Address and Terminal as arguments. This
Call must be in the Call.IDLE
state. This method creates and
returns a Connection to the originating Address in the
CallControlConnection.INITIATED
state. This method also
creates a TerminalConnection in the
CallControlTerminalConnection.TALKING
state and associated
with the new Connection and originating Terminal.
Pre-conditions:
origaddress
- The originating Address object.origterminal
- The originating Terminal object.
InvalidStateException
- Either the Provider was not "in service"
or the Call was not "idle".
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnCreatedEv
,
TermConnCreatedEv
,
CallActiveEv
,
CallCtlConnInitiatedEv
,
CallCtlTermConnTalkingEv
public void conference(Call otherCall) throws InvalidStateException, InvalidArgumentException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
CallControlTerminalConnection.HELD
state.
The two conference controlling TerminalConnections are merged into one as
a result of this method.
Applications may control which TerminalConnection acts as the conference
controller via the CallControlCall.setConferenceController()
method. The CallControlCall.getConferenceController()
method
returns the current conference controller, null
if there is
none. If no conference controller is set, the implementation chooses a
suitable TerminalConnection when the conferencing feature is invoked.
Call.INVALID
state.
The conference controller TerminalConnections are merged into one on this Call. That is, the existing TerminalConnection controller on this Call is left unchanged, while the TerminalConnection on the second Call is removed from that Call.
Pre-conditions:
otherCall
- The second Call which to merge with this Call object.
InvalidArgumentException
- The Call object provided is
not valid for the conference
InvalidStateException
- Either the Provider is not "in service",
the Call is not "active", or the conference controllers are not in the
proper state.
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnCreatedEv
,
TermConnCreatedEv
,
ConnDisconnectedEv
,
TermConnDroppedEv
,
CallInvalidEv
,
CallCtlConnDisconnectedEv
,
CallCtlTermConnDroppedEv
public void transfer(Call otherCall) throws InvalidStateException, InvalidArgumentException, InvalidPartyException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
CallControlTerminalConnection.TALKING
or
CallControlTerminalConnection.HELD
state.
Applications may control which TerminalConnection acts as the transfer
controller via the CallControlCall.setTransferController()
method. The CallControlCall.getTransferController()
method
returns the current transfer controller, null
if there is
none. If no transfer controller is set, the implementation chooses a
suitable TerminalConnection when the transfer feature is invoked.
Call.INVALID
state.
The transfer controller TerminalConnections are dropped from both Calls.
They move into the CallControlTerminalConnection.DROPPED
state.
Pre-conditions:
otherCall
- The other Call which to transfer to this Call.
InvalidArgumentException
- The TerminalConnection
controlling the transfer is not valid or does not exist or the other Call
is not valid.
InvalidStateException
- Either the Provider is not "in service",
the Call are not "active", or the transfer controllers are not "talking"
or "held".
InvalidPartyException
- The other Call given as the argument is
not a valid Call to conference with.
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnCreatedEv
,
TermConnCreatedEv
,
ConnDisconnectedEv
,
TermConnDroppedEv
,
CallInvalidEv
,
CallCtlConnDisconnectedEv
,
CallCtlTermConnDroppedEv
public Connection transfer(java.lang.String address) throws InvalidArgumentException, InvalidStateException, InvalidPartyException, MethodNotSupportedException, PrivilegeViolationException, ResourceUnavailableException
CallControlTerminalConnection.TALKING
state.
Applications may control which TerminalConnection acts as the transfer
controller via the CallControlCall.setTransferController()
method. The CallControlCall.getTransferController()
method
returns the current transfer controller, null
if there is
none. If no transfer controller is set, the implementation chooses a
suitable TerminalConnection when the transfer feature is invoked.
When the transfer feature is invoked, the transfer controller moves into
the CallControlTerminalConnection.DROPPED
state. If it is
the only TerminalConnection associated with its Connection, then its
Connection moves into the CallControlConnection.DISCONNECTED
state as well.
null
in the case the Call has been transferred outside of
the Provider's domain and can no longer be tracked. This Connection must
at least be in the CallControlConnection.IDLE
state. Its
state may have progressed beyond "idle" before this method returns, and
should be reflected by an event. This new Connection will progress as any
normal destination Connection on a telephone call. Typical scenarios for
this Connection are described by the Call.connect()
method.
Pre-conditions:
address
- The destination telephone address string to where the
Call is being transferred.
InvalidArgumentException
- The TerminalConnection provided as
controlling the transfer is not valid or part of this Call.
InvalidStateException
- Either the Provider is not "in service",
the Call is not "active", or the transfer controller is not "talking".
InvalidPartyException
- The destination address is not valid
and/or complete.
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.ConnCreatedEv
,
ConnDisconnectedEv
,
TermConnDroppedEv
,
CallCtlConnDisconnectedEv
,
CallCtlTermConnDroppedEv
public void setConferenceController(TerminalConnection tc) throws InvalidArgumentException, InvalidStateException, MethodNotSupportedException, ResourceUnavailableException
Typically, when two Calls are conferenced together, a single participant is part of both Calls. This participant is represented by a TerminalConnection on each Call, each of which shares the same Terminal.
If the designated TerminalConnection is not part of this Call, an
exception is thrown. If the TerminalConnection leaves the Call in the
future, the implementation resets the conference controller to
null
.
Pre-conditions:
tc
- The TerminalConnection to use as the conference controller
InvalidArgumentException
- The TerminalConnection provided is not
associated with this Call.
InvalidStateException
- Either the Provider is not "in service"
or the Call is not "active".
MethodNotSupportedException
- This method is not supported by
the implementation.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.public TerminalConnection getConferenceController()
When a Call is initially created, the conference controller is set
to null
. This method returns non-null only if the
application has previously set the conference controller. If the current
conference controller leaves the Call, the conference controller is reset
to null
.
Pre-conditions:
public void setTransferController(TerminalConnection tc) throws InvalidArgumentException, InvalidStateException, MethodNotSupportedException, ResourceUnavailableException
If the designated TerminalConnection is not part of this Call, an
exception is thrown. If the TerminalConnection leaves the Call in the
future, the implementation resets the transfer controller to
null
.
Pre-conditions:
tc
- The TerminalConnection to use as the transfer controller
InvalidArgumentException
- The TerminalConnection provided is
not associated with this Call.
InvalidStateException
- Either the Provider is not "in service",
Call was not "active", or the TerminalConnection argument was "dropped".
MethodNotSupportedException
- This method is not supported by
the implementation.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is not available.public TerminalConnection getTransferController()
When a Call is initially created, the transfer controller is set
to null
. This method returns non-null only if the
application has previously set the transfer controller. If the current
transfer controller leaves the telephone call, the transfer controller
is reset to null
.
Pre-conditions:
public void setConferenceEnable(boolean enable) throws InvalidArgumentException, InvalidStateException, MethodNotSupportedException, PrivilegeViolationException
Call.IDLE
state.
Pre-conditions:
enable
- True turns conferencing on, false turns conferencing off.
InvalidArgumentException
- Conferencing cannot be turned on as
requested by a true argument.
InvalidStateException
- Either the Provider is not "in service"
or the Call is not "idle".
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.public boolean getConferenceEnable()
CallControlCall.setConferenceEnable()
method.
public void setTransferEnable(boolean enable) throws InvalidArgumentException, InvalidStateException, MethodNotSupportedException, PrivilegeViolationException
Call.IDLE
state.
Pre-conditions:
enable
- True turns transferring on, false turns transferring off.
InvalidArgumentException
- Transferring cannot be turned on as
requested by the true argument.
InvalidStateException
- Either the Provider is not "in service"
or the Call is not "idle".
MethodNotSupportedException
- This method is not supported by
the implementation.
PrivilegeViolationException
- The application does not have
the proper authority to invoke this method.public boolean getTransferEnable()
CallControlCall.setTransferEnable()
method.
public Connection[] consult(TerminalConnection tc, java.lang.String dialedDigits) throws InvalidStateException, InvalidArgumentException, MethodNotSupportedException, ResourceUnavailableException, PrivilegeViolationException, InvalidPartyException
Call.IDLE
and is created with the Provider.createCall()
method.
Call.ACTIVE
state.
The second piece of information given by the TerminalConnection argument
is the originating endpoint from which to place a telephone call on this
idle Call. That is, the Address and Terminal associated with the
TerminalConnection argument are used as the originating endpoint for the
telephone call. The state of the TerminalConnection must be
CallControlTerminalConnection.TALKING
and this method first
moves it into the CallControlTerminalConnection.HELD
in
order to place a telephone call on this idle Call.
CallControlCall.setConferenceEnable()
and
CallControlCall.setTransferEnable()
are supported as
indicated by the CallControlCallCapabilities
interface,
applications must specify the purpose of the consultation Call by first
telling the telephony platform if the intend to perform a transfer and/or
conference action.
If the CallControlCall.setConferenceEnable()
and the
CallControlCall.setTransferEnable()
methods are not supported
as indicated by this interface's capabilities, applications permit the
telephony platform to use the static, default values reported by the
CallControlCall.getConferenceEnable()
and the
CallControlCall.getTransferEnable()
methods.
Call.connect()
method. The description of that
method describes different scenarios under which the state of the call
progresses.
Pre-conditions:
tc
- The controlling TerminalConnection for the consultation call.dialedDigits
- The destination telephone address string to which a
telephone call is being placed.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is unavailable.
PrivilegeViolationException
- The application does not have
the proper authority to place a consultation telephone call.
InvalidArgumentException
- The TerminalConnection given is
not a valid originating endpoint for a Call.
InvalidPartyException
- The destination address string is not
valid and/or complete.
InvalidStateException
- Either the Provider is not "in service",
the Call is not "idle", the other Call is not "active", or the
TerminalConnection is not "talking".
MethodNotSupportedException
- The implementation does not
support this method.CallActiveEv
,
ConnCreatedEv
,
CallCtlTermConnHeldEv
public Connection consult(TerminalConnection tc) throws InvalidStateException, InvalidArgumentException, MethodNotSupportedException, ResourceUnavailableException, PrivilegeViolationException
This overloaded version of this method has a single difference with the
other version of the CallControlCall.consult()
method. This
method does not take a destination telephone address string as an
argument.
This method creates and returns a single Connection which is in the
CallControlConnection.INITIATED
state. Applications may use
the CallControlConnection.addToAddress()
method to dial the
destination address digits.
Pre-conditions:
tc
- The controlling TerminalConnection for the consultation call.
ResourceUnavailableException
- An internal resource necessary
for the successful invocation of this method is unavailable.
PrivilegeViolationException
- The application does not have
the proper authority to place a consultation telephone call.
InvalidArgumentException
- The TerminalConnection given is
not a valid originating endpoint for a Call.
InvalidStateException
- Either the Provider is not "in service",
the Call is not "idle", the other Call is not "active", or the
TerminalConnection is not "talking".
MethodNotSupportedException
- The implementation does not
support this method.CallActiveEv
,
ConnCreatedEv
,
ConnConnectedEv
,
CallCtlConnInitiatedEv
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |