public final class CallFactory extends Object
Zang-enabled Breeze specific information:
A 2-party make-call operation is not supported in a Zang-enabled Breeze
environment. See CallFactory.create(String, String, Identity)
for details.
Call
Modifier and Type | Method and Description |
---|---|
static Call |
create(Participant callingParty,
String target)
Creates new instance of
Call with callingParty and target. |
static Call |
create(String from,
String to,
Identity onBehalfOf)
Creates new instance of
Call with from, to and onBehalfOf that is used to set up a 2-party call
between the from and the to . |
static Call |
getCall(String id)
Returns instance of
Call associated
with given ID string. |
public static Call getCall(String id)
Call
associated
with given ID string.id
- Call Identifier string. The Identifier should either be the
value of Call.getId()
or
Call.getUCID()
.
When providing the
Call.getId()
id, the call
associated with the service on the current node is returned.
This is the preferred method when the service knows which node
is actively handling the call.
When providing the
Call.getUCID()
id, the
call located may not reside on the node performing the
look-up. This method is the preferred way to locate a call
when the service does not know which node is actively handling
the call. Since the call may not reside on the node performing
the look-up, there may be performance impacts on call
operations. Media operations are currently not supported on a
call which does not reside on the local node.
For instance, the following logic is not currently supported on a call which does not reside on the local node:
final Call call = CallFactory.getCall(someUcid); // For this example, returns a call residing on another node
final Participant calledParty = call.getCalledParty(); // Returns a participant residing on another node
final MediaService mediaService = MediaFactory.createMediaService();
mediaService.sendDigits(calledParty, "5551212", null); // Throws IllegalArgumentException() !!!
Use
CallProperties.isHostedOnLocalNode(Call)
and
CallProperties.getNodeThatHostsCall(Call)
to determine where the call is located.
When using the
Call.getUCID()
id, and
the call is not located on the service performing the lookup,
a second attempt is performed to find the call on the Call
Eventing and Control Service.
instance of Call for the requesting service on the local node if
found, null otherwise, when providing
Call.getId()
.
instance of Call for the requesting service on any node in the
cluster. If not found, return an instance of the Call from the
CallEventing and Control Service if found, null otherwise,
when providing
Call.getUCID()
.
IllegalArgumentException
- if id is either null or emptyIllegalStateException
- if the Call does not existpublic static Call create(Participant callingParty, String target)
Call
with callingParty and target. When a service invokes the
initiate
method, a call is made to the target
. The target
can be a simple telephone number
(either E.164 or any digit string that matches your system's dial plan). It can also be of the form handle@domain or simply
handle (where handle is either a name or telephone number (the case above), and domain is either a host or
domain name).callingParty
- calling Participanttarget
- target address of the party to which call would be initiatedIllegalArgumentException
- if the callingParty is nullIllegalArgumentException
- if the target is null, or emptyIllegalArgumentException
- if the target does not contain a domain, and the default SIP domain is not populated in the cluster attributepublic static Call create(String from, String to, Identity onBehalfOf)
Creates new instance of Call
with from, to and onBehalfOf that is used to set up a 2-party call
between the from
and the to
. The from
and to
parameters can be a simple telephone
number (either E.164 or any digit string that matches your system's dial plan). It can also be of the form handle@domain or
simply handle (where handle is either a name or telephone number (the case above), and domain is either a host
or domain name). The onBehalfOf
is the party for which the call is being placed and contains the identity that is
presented to the called party.
Zang-enabled Breeze specific information:
A 2-party make-call operation is not supported in a Zang-enabled Breeze environment.
The call provider (e.g., SIP or ZangCallConnector) for a 2-party call is determined when the call is initiated,
Call.initiate()
.
Creating a 2-party call (using this method) will not fail for the Zang provider. However, if the call provider is administered as ZangCallConnector, then the call will fail when initiated.
SeeCall.initiate()
for details.
from
- calling partyto
- to address of the party to which call would be initiatedonBehalfOf
- the party for which the call is being initiatedIllegalArgumentException
- if the callingParty is nullIllegalArgumentException
- if the target is null, or emptyIllegalArgumentException
- if the target does not contain a domain, and the default SIP domain is not populated in the cluster attributeCopyright © 2023 Avaya. All rights reserved.