Using the Avaya Client SDK, you can easily integrate the ability for users of your application to make and receive audio or video calls.
To receive and answer an incoming audio call, you must complete the following activities.
In order to get notifications for any incoming calls, your application can define an object that implements the <CSCallServiceDelegate> protocol and add this delegate to the CSCallService object to receive call service notifications.
@interface AppCallServiceHandler()
...
@end
@implementation AppCallServiceHandler
- (void) callService:(CSCallService *)callService
didReceiveIncomingCall:(CSCall *)call {
// Called to report that there is an incoming call.
// Add code here to handle this incoming call, eg,
// update UI to alert user, provide options for handling
// the call, ... etc.
}
- (void)callService:(CSCallService *)callService
didRemoveCall:(CSCall *)call {
// Called to report that the call has been removed before
// answer.
// Add code here to handle the removed call, eg,
// update UI to remove the call... etc.
}
...
@end
You can instantiate a call service handler (AppCallServiceHandler) and add it as a delegate to the call service.
AppCallServiceHandler* callServiceHandler =
[[AppCallServiceHandler alloc] init];
CSCallService* callService = user.callService;
callService.delegate = callServiceHandler;
When there is an incoming call, the callService:didReceiveIncomingCall: method is called with a CSCall object in the arguments. You can instantiate a call handler and add that as a delegate to this call object for handling subsequent call events.
To answer the incoming call, you can call the accept method on the incoming call object.
[call accept];
--- title: iOS Communication Services Package version: 4.31.0.0 - Aug 2023 copyright: Copyright © 2013-2023 by Avaya, All Rights Reserved. publisher: devconnectprogram.com publisherAddress: Avaya comments: '' tableOfContents: true tocAccordion: 2 rightPanel: false publicOnly: false leftPanel: true tableOfContentHeader: true showPageTitle: true gridLayout: toc: 2 codePanelPercent: 50 headerHeight: 0 footerHeight: 0 documentSearch: true languageTabs: - objective_c: Objective-C laTexMath: false codeHighlight: true codeHighlightTheme: agate tocSelectors: h2,h3,h4 tocFooters: [] versionLinks: - title: Current link: "/site/global/products_resources/avaya_client_sdk/programming_docs/current/introduction/index.gsp" newTab: false siteLinks: - title: Avaya Home link: "/" newTab: false documentCollectionOptions: tabs: false baseUrl: '' documentCollection: [] source_file: "/home/build/.jenkins/workspace/avaya-slate/source/site/global/products_resources/avaya_client_sdk/programming_docs/current/ios/communication/guide/answering_audio_call.md" sourcePath: "/home/build/.jenkins/workspace/avaya-slate/source/site/global/products_resources/avaya_client_sdk/programming_docs/current/ios/communication/guide" sourceFileName: answering_audio_call sourceType: ".md" url: site/global/products_resources/avaya_client_sdk/programming_docs/current/ios/communication/guide/answering_audio_call.gsp urlPath: site/global/products_resources/avaya_client_sdk/programming_docs/current/ios/communication/guide urlFileName: answering_audio_call urlExtension: ".gsp" titlePage: true gvars: - productFolder: client_sdk - releaseFolder: current BackToPackageOverview: "< Back to Package Overview" BpImages: "/static/images/avaya_client_sdk/programming_docs/current/" DwlAndroidSdk: "Android SDK" DwlIosSdk: "iOS SDK" DwlWindowsSdk: "Windows SDK" DwlMacosSdk: "macOS SDK" DwlJavaScriptSdk: "JavaScript SDK" DwlReleaseNotes: "Avaya Client SDK Release Notes" CSActiveParticipant: "CSActiveParticipant" CSAudioDetails: "CSAudioDetails" CSAudioDevice: "CSAudioDevice" CSAudioInterfaceIOS: "CSAudioInterfaceIOS" CSAudioRecordPlayStatusListener: "CSAudioRecordPlayStatusListener" CSAutodial: "CSAutodial" CSAutomaticGainControlConfiguration: "CSAutomaticGainControlConfiguration" CSACSConfiguration: "CSACSConfiguration" CSAMMConfiguration: "CSAMMConfiguration" CSBasicShape: "CSBasicShape" CSBusyIndicator: "CSBusyIndicator" CSBFCPConfiguration: "CSBFCPConfiguration" CSCall: "CSCall" CSCallCreationInfo: "CSCallCreationInfo" CSCallFeatureService: "CSCallFeatureService" CSCallForwardingInformation: "CSCallForwardingInformation" CSCallForwardingStatus: "CSCallForwardingStatus" CSCallLogItem: "CSCallLogItem" CSCallLogParticipant: "CSCallLogParticipant" CSCallLogService: "CSCallLogService" CSCallPickupAlertParameters: "CSCallPickupAlertParameters" CSCallPickupAlertStatus: "CSCallPickupAlertStatus" CSCallService: "CSCallService" CSCapability: "CSCapability" CSCertificateBasicConstraint: "CSCertificateBasicConstraint" CSCertificateInfo: "CSCertificateInfo" CSCertificateManager: "CSCertificateManager" CSChallenge: "CSChallenge" CSChat: "CSChat" CSChatMessage: "CSChatMessage" CSCircleShape: "CSCircleShape" CSClient: "CSClient" CSClientConfiguration: "CSClientConfiguration" CSClipboardEvent: "CSClipboardEvent" CSCollaboration: "CSCollaboration" CSCollaborationCapabilities: "CSCollaborationCapabilities" CSCollaborationDetails: "CSCollaborationDetails" CSCollaborationReceiveStatistics: "CSCollaborationReceiveStatistics" CSCollaborationService: "CSCollaborationService" CSCollaborationStatistics: "CSCollaborationStatistics" CSConference: "CSConference" CSConferenceConfiguration: "CSConferenceConfiguration" CSConferenceMobileLink: "CSConferenceMobileLink" CSConferenceMobileLinkConnectionDetails: "CSConferenceMobileLinkConnectionDetails" CSConferenceRoomSystemInformation: "CSConferenceRoomSystemInformation" CSConferenceSlide: "CSConferenceSlide" CSConferenceSlideViewer: "CSConferenceSlideViewer" CSConnectionPolicy: "CSConnectionPolicy" CSContact: "<CSContact>" CSContactBoolField: "CSContactBoolField" CSContactDoubleField: "CSContactDoubleField" CSContactEmailAddressField: "CSContactEmailAddressField" CSContactEmailFieldList: "CSContactEmailFieldList" CSContactField: "CSContactField" CSContactIMAddressField: "CSContactIMAddressField" CSContactIMAddressFieldList: "CSContactIMAddressFieldList" CSContactLimits: "CSContactLimits" CSContactMultiValueField: "CSContactMultiValueField" CSContactPhoneField: "CSContactPhoneField" CSContactPhoneFieldList: "CSContactPhoneFieldList" CSContactResolveContactsRequest: "CSContactResolveContactsRequest" CSContactSearchQueryWatcherPair: "CSContactSearchQueryWatcherPair" CSContactService: "CSContactService" CSContactStringField: "CSContactStringField" CSContactStringFieldList: "CSContactStringFieldList" CSContentSharing: "CSContentSharing" CSContentSharingCapabilities: "CSContentSharingCapabilities" CSControllableEndpoint: "CSControllableEndpoint" CSCESConfiguration: "CSCESConfiguration" CSCPUThresholdConfiguration: "CSCPUThresholdConfiguration" CSDataRetrieval: "CSDataRetrieval" CSDataRetrievalWatcher: "CSDataRetrievalWatcher" CSDataSet: "CSDataSet" CSDialingRulesConfiguration: "CSDialingRulesConfiguration" CSDownloadOptionalParameters: "CSDownloadOptionalParameters" CSDownloadResultInfo: "CSDownloadResultInfo" CSDownloadService: "CSDownloadService" CSDownloadServiceConfiguration: "CSDownloadServiceConfiguration" CSDownloadWatcher: "CSDownloadWatcher" CSDroppedParticipant: "CSDroppedParticipant" CSDSCPPrecedenceConfiguration: "CSDSCPPrecedenceConfiguration" CSEditableContact: "CSEditableContact" CSEditableContactBoolField: "CSEditableContactBoolField" CSEditableContactDoubleField: "CSEditableContactDoubleField" CSEditableContactEmailAddressField: "CSEditableContactEmailAddressField" CSEditableContactEmailFieldList: "CSEditableContactEmailFieldList" CSEditableContactIMAddressField: "CSEditableContactIMAddressField" CSEditableContactIMAddressFieldList: "CSEditableContactIMAddressFieldList" CSEditableContactPhoneField: "CSEditableContactPhoneField" CSEditableContactPhoneFieldList: "CSEditableContactPhoneFieldList" CSEditableContactStringField: "CSEditableContactStringField" CSEditableContactStringFieldList: "CSEditableContactStringFieldList" CSEnhancedCallForwardingStatus: "CSEnhancedCallForwardingStatus" CSEnrollmentCredential: "CSEnrollmentCredential" CSEC500Configuration: "CSEC500Configuration" CSFeatureInvocationParameters: "CSFeatureInvocationParameters" CSFeatureParameters: "CSFeatureParameters" CSFeatureStatusParameters: "CSFeatureStatusParameters" CSHTTPClientConfiguration: "CSHTTPClientConfiguration" CSHTTPUserConfiguration: "CSHTTPUserConfiguration" CSIdentified: "CSIdentified" CSIOSDevice: "CSIOSDevice" CSIOSDeviceModel: "CSIOSDeviceModel" CSIOSScreenSharingView: "CSIOSScreenSharingView" CSIOSWhiteboardCanvas: "CSIOSWhiteboardCanvas" CSIPOfficeConfiguration: "CSIPOfficeConfiguration" CSKeyboardEvent: "CSKeyboardEvent" CSLibraryDocument: "CSLibraryDocument" CSLibraryManager: "CSLibraryManager" CSLibrarySharing: "CSLibrarySharing" CSLineAppearance: "CSLineAppearance" CSLocalContactConfiguration: "CSLocalContactConfiguration" CSLDAPConfiguration: "CSLDAPConfiguration" CSMatchedContactsWithMatchLevel: "CSMatchedContactsWithMatchLevel" CSMaxSupportedVideoResolutionsCapability: "CSMaxSupportedVideoResolutionsCapability" CSMediaConfiguration: "CSMediaConfiguration" CSMediaServicesInstance: "CSMediaServicesInstance" CSMediaServicesProvider: "CSMediaServicesProvider" CSMeetingMinutes: "CSMeetingMinutes" CSMessage: "CSMessage" CSMessageBodyPart: "CSMessageBodyPart" CSMessageWaitingStatus: "CSMessageWaitingStatus" CSMessagingAddressValidation: "CSMessagingAddressValidation" CSMessagingAsynchDataRetrieval: "CSMessagingAsynchDataRetrieval" CSMessagingAttachment: "CSMessagingAttachment" CSMessagingConfiguration: "CSMessagingConfiguration" CSMessagingConversation: "CSMessagingConversation" CSMessagingLeaveConversationResponse: "CSMessagingLeaveConversationResponse" CSMessagingLimits: "CSMessagingLimits" CSMessagingParticipant: "CSMessagingParticipant" CSMessagingParticipantPhoneNumber: "CSMessagingParticipantPhoneNumber" CSMessagingQuery: "CSMessagingQuery" CSMessagingSearchConversation: "CSMessagingSearchConversation" CSMessagingService: "CSMessagingService" CSMicrophoneDevice: "CSMicrophoneDevice" CSMinuteMessage: "CSMinuteMessage" CSMouseEvent: "CSMouseEvent" CSOtherPhoneService: "CSOtherPhoneService" CSOutboundSubscriptionConfiguration: "CSOutboundSubscriptionConfiguration" CSParticipant: "CSParticipant" CSPendingParticipant: "CSPendingParticipant" CSPendingParticipantAdmissionCancellationReason: "CSPendingParticipantAdmissionCancellationReason" CSPhysicalAddress: "CSPhysicalAddress" CSPresence: "CSPresence" CSPresenceAccessControlList: "CSPresenceAccessControlList" CSPresenceConfiguration: "CSPresenceConfiguration" CSPresenceListSubscription: "CSPresenceListSubscription" CSPresenceService: "CSPresenceService" CSPresenceWatcher: "CSPresenceWatcher" CSPushNotificationsEncryptionInfo: "CSPushNotificationsEncryptionInfo" CSPushNotificationConfiguration: "CSPushNotificationConfiguration" CSPushNotificationService: "CSPushNotificationService" CSPPMConfiguration: "CSPPMConfiguration" CSRegistrationGroup: "CSRegistrationGroup" CSRenderingBlock: "CSRenderingBlock" CSScreenSharingListener: "CSScreenSharingListener" CSSearchTerminalsRequest: "CSSearchTerminalsRequest" CSSecurityPolicyConfiguration: "CSSecurityPolicyConfiguration" CSServerInfo: "CSServerInfo" CSServiceStatus: "CSServiceStatus" CSSettingsFileParser: "CSSettingsFileParser" CSShape: "CSShape" CSShapePoint: "CSShapePoint" CSSharedControlService: "CSSharedControlService" CSSharingBlock: "CSSharingBlock" CSSharingDisplay: "CSSharingDisplay" CSSignalingServer: "CSSignalingServer" CSSignalingServerGroup: "CSSignalingServerGroup" CSSlide: "CSSlide" CSSlider: "CSSlider" CSSliderSlide: "CSSliderSlide" CSSpaceParticipant: "CSSpaceParticipant" CSSpaceService: "CSSpaceService" CSSpeakerDevice: "CSSpeakerDevice" CSSCEPConfiguration: "CSSCEPConfiguration" CSSIPClientConfiguration: "CSSIPClientConfiguration" CSSIPUserConfiguration: "CSSIPUserConfiguration" CSTeamButton: "CSTeamButton" CSTeamButtonIncomingCall: "CSTeamButtonIncomingCall" CSTerminal: "CSTerminal" CSUnifiedPortalConferencingConfiguration: "CSUnifiedPortalConferencingConfiguration" CSUnifiedPortalConfiguration: "CSUnifiedPortalConfiguration" CSUnifiedPortalMeetingInfo: "CSUnifiedPortalMeetingInfo" CSUnifiedPortalResources: "CSUnifiedPortalResources" CSUnifiedPortalService: "CSUnifiedPortalService" CSUser: "CSUser" CSUserConfiguration: "CSUserConfiguration" CSUserCredential: "CSUserCredential" CSVideoCapturerIOS: "CSVideoCapturerIOS" CSVideoChannel: "CSVideoChannel" CSVideoDetails: "CSVideoDetails" CSVideoFrameFileSource: "CSVideoFrameFileSource" CSVideoInterfaceIOS: "CSVideoInterfaceIOS" CSVideoRendererIOS: "CSVideoRendererIOS" CSVideoResolutionCapability: "CSVideoResolutionCapability" CSVideoResolutionPreference: "CSVideoResolutionPreference" CSVideoResolutionPreferenceForMainVideoStreaming: "CSVideoResolutionPreferenceForMainVideoStreaming" CSVideoResolutionPreferenceForMultiVideoStreaming: "CSVideoResolutionPreferenceForMultiVideoStreaming" CSVideoSinkImpl: "CSVideoSinkImpl" CSVideoSourceImpl: "CSVideoSourceImpl" CSVideoSplitter: "CSVideoSplitter" CSVideoStatistics: "CSVideoStatistics" CSVideoTransmitStatistics: "CSVideoTransmitStatistics" CSVideoUserConfiguration: "CSVideoUserConfiguration" CSVirtualRoom: "CSVirtualRoom" CSVoiceMessagingService: "CSVoiceMessagingService" CSVoiceMessagingStatusParameters: "CSVoiceMessagingStatusParameters" CSVoIPConfigurationAudio: "CSVoIPConfigurationAudio" CSVoIPConfigurationVideo: "CSVoIPConfigurationVideo" CSWhiteboard: "CSWhiteboard" CSWhiteboardSurface: "CSWhiteboardSurface" CSWhiteboardText: "CSWhiteboardText" CSWCSConfiguration: "CSWCSConfiguration" CSZangConfiguration: "CSZangConfiguration" CSActiveParticipantDelegate: "<CSActiveParticipantDelegate>" CSAudioDevicesEventListener: "<CSAudioDevicesEventListener>" CSAudioFilePlayer: "<CSAudioFilePlayer>" CSAudioFilePlayerListener: "<CSAudioFilePlayerListener>" CSAudioInterface: "<CSAudioInterface>" CSCallDelegate: "<CSCallDelegate>" CSCallFeatureServiceDelegate: "<CSCallFeatureServiceDelegate>" CSCallLogServiceDelegate: "<CSCallLogServiceDelegate>" CSCallServiceDelegate: "<CSCallServiceDelegate>" CSCertificateManagerClientIdentityDelegate: "<CSCertificateManagerClientIdentityDelegate>" CSCertificateManagerDelegate: "<CSCertificateManagerDelegate>" CSCertificateManagerEnrollmentDelegate: "<CSCertificateManagerEnrollmentDelegate>" CSChatDelegate: "<CSChatDelegate>" CSClientDelegate: "<CSClientDelegate>" CSCollaborationDelegate: "<CSCollaborationDelegate>" CSCollaborationServiceDelegate: "<CSCollaborationServiceDelegate>" CSConferenceDelegate: "<CSConferenceDelegate>" CSConferenceMobileLinkDelegate: "<CSConferenceMobileLinkDelegate>" CSConferenceSlideViewerDelegate: "<CSConferenceSlideViewerDelegate>" CSContactDelegate: "<CSContactDelegate>" CSContactServiceDelegate: "<CSContactServiceDelegate>" CSContentSharingDelegate: "<CSContentSharingDelegate>" CSContentSharingRemoteControlDelegate: "<CSContentSharingRemoteControlDelegate>" CSCredentialProvider: "<CSCredentialProvider>" CSDataRetrievalDelegate: "<CSDataRetrievalDelegate>" CSDataRetrievalWatcherDelegate: "<CSDataRetrievalWatcherDelegate>" CSDataSetDelegate: "<CSDataSetDelegate>" CSDevice: "<CSDevice>" CSDeviceListener: "<CSDeviceListener>" CSDroppedParticipantDelegate: "<CSDroppedParticipantDelegate>" CSEnrollmentCredentialProvider: "<CSEnrollmentCredentialProvider>" CSLibrarySharingDelegate: "<CSLibrarySharingDelegate>" CSMediaLogProvider: "<CSMediaLogProvider>" CSMeetingMinutesDelegate: "<CSMeetingMinutesDelegate>" CSMessageDelegate: "<CSMessageDelegate>" CSMessagingAttachmentDelegate: "<CSMessagingAttachmentDelegate>" CSMessagingComposingParticipantsWatcherDelegate: "<CSMessagingComposingParticipantsWatcherDelegate>" CSMessagingConversationDelegate: "<CSMessagingConversationDelegate>" CSMessagingServiceDelegate: "<CSMessagingServiceDelegate>" CSOtherPhoneServiceDelegate: "<CSOtherPhoneServiceDelegate>" CSParticipantDelegate: "<CSParticipantDelegate>" CSPendingParticipantDelegate: "<CSPendingParticipantDelegate>" CSPresenceAccessControlDelegate: "<CSPresenceAccessControlDelegate>" CSPresenceListSubscriptionDelegate: "<CSPresenceListSubscriptionDelegate>" CSPresenceServiceDelegate: "<CSPresenceServiceDelegate>" CSPresenceWatcherRequestDelegate: "<CSPresenceWatcherRequestDelegate>" CSPushNotificationServiceDelegate: "<CSPushNotificationServiceDelegate>" CSSettingsFileParserDelegate: "<CSSettingsFileParserDelegate>" CSSharedControlDelegate: "<CSSharedControlDelegate>" CSSliderDelegate: "<CSSliderDelegate>" CSSlideDelegate: "<CSSlideDelegate>" CSUnifiedPortalServiceDelegate: "<CSUnifiedPortalServiceDelegate>" CSUserAdminEventDelegate: "<CSUserAdminEventDelegate>" CSUserExternalAppInterfaceDelegate: "<CSUserExternalAppInterfaceDelegate>" CSUserRegistrationDelegate: "<CSUserRegistrationDelegate>" CSVideoCapturerDelegate: "<CSVideoCapturerDelegate>" CSVideoInterface: "<CSVideoInterface>" CSVideoInterfaceDelegate: "<CSVideoInterfaceDelegate>" CSVideoSink: "<CSVideoSink>" CSVideoSource: "<CSVideoSource>" CSVoiceMessagingServiceDelegate: "<CSVoiceMessagingServiceDelegate>" CSWhiteboardDelegate: "<CSWhiteboardDelegate>" CSWhiteboardSurfaceDelegate: "<CSWhiteboardSurfaceDelegate>"