public interface CallListener
TheCallListener
Zang-enabled Breeze specific information:
The 2-party make-call operation is not supported in a Zang-enabled Breeze environment. SeeCallListener.callOriginated(Call)
for
details.
A snap-in (for incoming Zang calls) is invoked as a callable service. See
CallListener.callIntercepted(Call)
for
details.
A snap-in may be notified of participants dropping in an unordered manner.
See CallListener.participantDropped(Call, Participant, CallTerminationCause)
for details.
The CallProperties.getCallProvider(Call)
is available to determine the call type (e.g., SIP or ZangCallProvider)
Call
,
TheCallListener
Modifier and Type | Method and Description |
---|---|
void |
addParticipantFailed(Call call,
Participant failedParticipant,
CallTerminationCause cause)
Indicates that an attempt to add a participant to the call failed.
|
void |
callAlerting(Participant alertingParty)
Indicates that a party in
Call has started alerting (i.e., the
called party's device has notified its user of an incoming call). |
void |
callAnswered(Call call)
Indicates that a party in
Call answered the call. |
void |
callIntercepted(Call call)
Indicates that the service has intercepted a call.
|
void |
callOriginated(Call call)
Indicates that the first party in a 2-party make-call has answered.
|
void |
callTerminated(Call call,
CallTerminationCause cause)
Indicates that the call has terminated (ended).
|
void |
mediaDetected(Participant partySendingMedia,
MediaType mediaTypeDetected)
Indicates that media has been detected from an alerting party or the
answering party.
|
void |
participantDropped(Call call,
Participant droppedParticipant,
CallTerminationCause cause)
Indicates that a participant in
Call dropped out of the call or
was dropped from the call. |
void callOriginated(Call call)
CallFactory.create(String, String, Identity)
for more detail regarding a 2-party make-call.
Zang-enabled Breeze specific information:
The 2-party make-call operation is not supported in a Zang-enabled Breeze environment. Therefore this callback will not be invoked for a Zang call.call
- instance of the callvoid callIntercepted(Call call)
Zang-enabled Breeze specific information:
In this environment, all snap-ins are invoked as Callable snap-ins. This means that
Call.wasServiceCalled()
will always
return true
Call.isCalledPhase()
will always
return false
Call.isCallingPhase()
will always
return false
call
- the intercepted callvoid callAlerting(Participant alertingParty)
Call
has started alerting (i.e., the
called party's device has notified its user of an incoming call). This
method could be invoked multiple times during a call, in the event that
some downstream element presents the call to multiple parties. While the
alertingParty parameter indicates only the most recent party that has
started alerting, the full list of alerting parties is available in
Call.getAlertingParties()
.
Note that a snap-in may not receive this alerting indication and should not rely on its presence. For instance, an auto-answer device may not send an alerting indication before answering.
alertingParty
- details about the alerting party, i.e. the person whose phone
is ringingvoid callAnswered(Call call)
Call
answered the call. Details on the
answering party can be obtained using
Call.getAnsweringParty()
.call
- instance of the callvoid callTerminated(Call call, CallTerminationCause cause)
call
- instance of the callcause
- reason the call endedvoid addParticipantFailed(Call call, Participant failedParticipant, CallTerminationCause cause)
Call.addParticipant(com.avaya.collaboration.call.Participant)
.call
- instance of the callfailedParticipant
- instance of the participant which failed to be addedcause
- reason the participant failed to be addedvoid mediaDetected(Participant partySendingMedia, MediaType mediaTypeDetected)
Indicates that media has been detected from an alerting party or the answering party.
A media server is automatically included as part of any snapin originated
call created with CallFactory
.
However, for a call intercepted scenario, a media server is not inserted
by default. The default behavior in such a scenario will be to not invoke
this call back method. In order to add a media server, invoke one of the
two APIs in the
CallListener.callIntercepted(Call)
method:
CallPolicies.setPreAnswerMediaState(PreAnswerMediaState)
CallPolicies.setMediaServerInclusion(MediaServerInclusion)
MediaService
operations such as play, collect and record will automatically cause a
media server to be included. Therefore it would be redundant/not
necessary for a snapin to invoke one of the above APIs in
CallListener.callIntercepted(Call)
in addition to a media operation.) partySendingMedia
- the party from which media was detectedmediaTypeDetected
- the type of media detectedvoid participantDropped(Call call, Participant droppedParticipant, CallTerminationCause cause)
Call
dropped out of the call or
was dropped from the call.
Zang-enabled Breeze specific information:
In a call with two participants, and one hangs up, this method will be called - once per participant - in an arbitrary order.
For instance, if Alice and Bob are talking, and Alice hangs up, then this method might first be invoked with droppedParticipant=Bob, and then again with droppedParticipant=Alice.
Similarly, if Alice and Bob are talking, and the snap-in drops Alice, then then this method might first be invoked with droppedParticipant=Bob, and then again with droppedParticipant=Alice.
call
- The call from which the participant is droppeddroppedParticipant
- The participant dropped from the callcause
- reason the participant dropped from the callCopyright © 2023 Avaya. All rights reserved.