public final class CallFactory extends Object
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.
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 any of arguments are null or emptypublic static Call create(String from, String to, Identity onBehalfOf)
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.
Note that this type of call requires an Avaya Aura® Media Server.
from
- calling partyto
- to address of the party to which call would be initiatedonBehalfOf
- the party for which the call is being initiatedIllegalArgumentException
- if any of arguments are null or emptyCopyright © 2016 Avaya. All Rights Reserved.