Interface CallService
-
public interface CallServiceThe CallService object is accessible from the User object, providing access to call related services and information.The CallService object provides a set of APIs that allow application developers to implement basic SIP telephony features.
Users of the CallService should be aware that precautions are taken to ensure that there are no conflicts with other call-capable applications running on the same device. For example, a call established via the CallService may be placed on hold automatically if the native Phone app on an Android device receives an incoming call. One limitation to be aware of: The CallService is not able to detect new call-capable applications that are installed after the CallService is created.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddListener(CallServiceListener listener)java.lang.StringapplyDialingRulesForEC500(java.lang.String number)Apply dialing rules.CallcreateCall()Create a new outgoing call session.CallcreateCall(CallCreationInfo callCreationInfo)Creates a new outgoing call with information provided in the input argument.CallgetActiveCall()Get current locally established active call.java.util.Collection<Call>getCalls()Get the calls currently in progress.CapabilitygetCreateCallCapability(CallCreationInfo callCreationInfo)Gets Capability object indicating whether the call can be created.java.util.List<java.lang.String>getEmergencyNumbers()Gets List of configured emergency numbers.java.util.Collection<Call>getIgnoredCalls()Get the calls that are currently in ignored state.java.util.List<LineAppearance>getLineAppearances()Get the list of line appearances configured for the user in Avaya Communication Manager environment.CapabilitygetVideoCapability()Gets Capability object indicating whether the video is allowed.CapabilitygetVideoCapability(CallType callType)Gets Capability object indicating whether the video is allowed for specific call type.CapabilitygetVoIPCallingCapability()Gets Capability object indicating whether the voip calling is allowed.CapabilitygetVoIPCallingCapability(CallType callType)Gets Capability object indicating whether the voip calling is allowed for specific call type.booleanhasHeldCall()Is there a call which is in held state ?.booleanhasInitiatingCall()Is there a call initiated ?.booleanisAutoAnswerAdministered()Gets a flag indicating whether auto-answer is administered.voidremoveListener(CallServiceListener listener)
-
-
-
Method Detail
-
addListener
void addListener(CallServiceListener listener)
-
removeListener
void removeListener(CallServiceListener listener)
-
getCalls
java.util.Collection<Call> getCalls()
Get the calls currently in progress.- Returns:
- A read-only collection containing all current Calls. Can be empty if there is no current call.
-
getIgnoredCalls
java.util.Collection<Call> getIgnoredCalls()
Get the calls that are currently in ignored state.- Returns:
- A read-only collection containing all currently ignored Calls. Can be empty if there is no ignored call.
-
createCall
Call createCall()
Create a new outgoing call session.Call object creation is always successful and the newly created Call instance is returned synchronously. Whether the call can be successfully set up is learned after the client application calls Call.start().
- Returns:
- The Call object for the new outgoing call.
-
createCall
Call createCall(CallCreationInfo callCreationInfo)
Creates a new outgoing call with information provided in the input argument.Call object creation is always successful and the newly created Call instance is returned synchronously. Whether the call can be successfully set up is learned after the client application calls Call.start().
- Parameters:
callCreationInfo- Call creation information- Returns:
- The Call object for the new outgoing call.
-
getActiveCall
Call getActiveCall()
Get current locally established active call.An active call is local and in established state. The active call is null if there is no call, or all local calls are in held state.
- Returns:
- The new active call if exist otherwise nil.
-
hasInitiatingCall
boolean hasInitiatingCall()
Is there a call initiated ?.- Returns:
trueif there is at least one call initiated but not yet established,falseotherwise.
-
hasHeldCall
boolean hasHeldCall()
Is there a call which is in held state ?.- Returns:
trueif there is at least one held call,falseotherwise.
-
getVideoCapability
Capability getVideoCapability()
Gets Capability object indicating whether the video is allowed. video capability is calculated based on license, user configuration and available network.- Returns:
- Capability object indicating whether the video is allowed
-
getVideoCapability
Capability getVideoCapability(CallType callType)
Gets Capability object indicating whether the video is allowed for specific call type. For each call type video capability is calculated based on license, user configuration and available network.- Parameters:
callType- the call type.- Returns:
- Capability object indicating whether the video is allowed.
-
getVoIPCallingCapability
Capability getVoIPCallingCapability()
Gets Capability object indicating whether the voip calling is allowed. VoIP calling capability is calculated based on user configuration and available network.- Returns:
- Capability object describing whether VoIP calling is allowed.
-
getVoIPCallingCapability
Capability getVoIPCallingCapability(CallType callType)
Gets Capability object indicating whether the voip calling is allowed for specific call type. For each call type VoIP calling capability is calculated based on user configuration and available network.- Parameters:
callType- the call type.- Returns:
- Capability object indicating whether the voip calling is allowed.
-
getLineAppearances
java.util.List<LineAppearance> getLineAppearances()
Get the list of line appearances configured for the user in Avaya Communication Manager environment.- Returns:
- list of LineAppearances or null otherwise.
-
isAutoAnswerAdministered
boolean isAutoAnswerAdministered()
Gets a flag indicating whether auto-answer is administered. This information is used to indicate how the client will behave when an incoming call is received. Do not use this information to determine if an incoming call should be answered automatically by your client. Instead use the call.canAutoAnswer() method for that purpose. NOTE: The SDK never auto-answers a call. It simply provides info indicating whether the call can be auto-answered. It's up to the client to act on this info and automatically answer the call.- Returns:
- true if auto-answer is administered.
-
applyDialingRulesForEC500
java.lang.String applyDialingRulesForEC500(java.lang.String number)
Apply dialing rules. It is used for applying dialing rules outside of the call service (e.g ec500 calls).- Parameters:
number- The telephone number to which dialing rules logic needs to be applied.- Returns:
- A number that can be dialed or the number as is if the number is not valid or cannot be transformed.
-
getEmergencyNumbers
java.util.List<java.lang.String> getEmergencyNumbers()
Gets List of configured emergency numbers.- Returns:
- List of configured emergency numbers.
-
getCreateCallCapability
Capability getCreateCallCapability(CallCreationInfo callCreationInfo)
Gets Capability object indicating whether the call can be created.- Parameters:
callCreationInfo- The line appearance id and other call creation information.- Returns:
Capabilityobject indicating whether the call can be created.
-
-