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 make an audio call, you must complete the following activities:
Creating a CSCall object allows you to set various properties for the call before the call is actually placed.
The CSCall object is created from the CSCallService.
CSCallService* callService = user.callService;
CSCall* call = [callService createCall];
You can specify the phone number to dial by setting the remote address.
call.remoteAddress = callNumber;
To monitor call progress events, the <CSCallDelegate> protocol provided by the CSCall object can be used. This protocol provides notification as the call state changes.
Your application can define an object that implements the <CSCallDelegate> methods and can add it to the CSCall object to receive callback notifications.
@interface AppCallHandler()
...
@end
@implementation AppCallHandler
- (void)callDidStart:(CSCall *)call {
// Called to report that call has started (ie, call is in progress).
// Add code here to update the UI as appropriate.
}
- (void)callDidBeginRemoteAlerting:(CSCall *)call
withEarlyMedia:(BOOL)hasEarlyMedia {
// Called to report that an outgoing call is ringing at the far end.
// Add code here to update the UI as appropriate.
}
- (void)callDidEstablish:(CSCall *)call {
// Called to report that an outgoing call has been established
// (ie, far end has answered and speechpath has been established).
// Add code here to update the UI as appropriate.
}
- (void)callDidEnd:(CSCall *)call reason:(CSCallEndReason)reason {
// Called to report that call has ended.
// Add code here to update the UI as appropriate.
}
- (void)call:(CSCall *)call didFailWithError:(NSError *)error {
// Called to report that call has failed and the failure reason
// is described in the error parameter.
// Add code here to update the UI as appropriate.
}
...
@end
You can instantiate an application call handler (AppCallHandler) and add that as a delegate to the call.
AppCallHandler *callHandler = [[AppCallHandler alloc] init];
call.delegate = callHandler;
Once a call delegate has been added, you can call the start method on the CSCall object. Call progress events will be provided through the <CSCallDelegate> protocol.
[call start];
To terminate the call, you can call the end method on the CSCall object.
[call end];
The callDidEnd:reason: callback event is sent to the call delegate when the call has been ended. You can use this event to update the UI of your application.
--- title: macOS 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/macos/communication/guide/making_an_audio_call.md" sourcePath: "/home/build/.jenkins/workspace/avaya-slate/source/site/global/products_resources/avaya_client_sdk/programming_docs/current/macos/communication/guide" sourceFileName: making_an_audio_call sourceType: ".md" url: site/global/products_resources/avaya_client_sdk/programming_docs/current/macos/communication/guide/making_an_audio_call.gsp urlPath: site/global/products_resources/avaya_client_sdk/programming_docs/current/macos/communication/guide urlFileName: making_an_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" DwlExternalApiProgDoc: "External Application API Programming Documentation" CSActiveParticipant: "CSActiveParticipant" CSAudioDetails: "CSAudioDetails" CSAudioDevice: "CSAudioDevice" 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" 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" CSOSXScreenSharingView: "CSOSXScreenSharingView" CSParticipant: "CSParticipant" CSPendingParticipant: "CSPendingParticipant" CSPendingParticipantAdmissionCancellationReason: "CSPendingParticipantAdmissionCancellationReason" CSPhysicalAddress: "CSPhysicalAddress" CSPresence: "CSPresence" CSPresenceAccessControlList: "CSPresenceAccessControlList" CSPresenceConfiguration: "CSPresenceConfiguration" CSPresenceListSubscription: "CSPresenceListSubscription" CSPresenceService: "CSPresenceService" CSPresenceWatcher: "CSPresenceWatcher" CSPresentationSlidesListener: "CSPresentationSlidesListener" CSPresentationSlideCanvas: "CSPresentationSlideCanvas" CSPPMConfiguration: "CSPPMConfiguration" CSRegistrationGroup: "CSRegistrationGroup" CSRenderingBlock: "CSRenderingBlock" CSScreenCapturerOSX: "CSScreenCapturerOSX" CSScreenSharingListener: "CSScreenSharingListener" CSScreenSharingView: "CSScreenSharingView" CSSearchTerminalsRequest: "CSSearchTerminalsRequest" CSSecurityPolicyConfiguration: "CSSecurityPolicyConfiguration" CSServerInfo: "CSServerInfo" CSServiceStatus: "CSServiceStatus" CSSettingsFileParser: "CSSettingsFileParser" CSShape: "CSShape" CSShapePoint: "CSShapePoint" CSSharedControlService: "CSSharedControlService" CSSharingApplicationWindow: "CSSharingApplicationWindow" 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" CSVideoCapturerOSX: "CSVideoCapturerOSX" CSVideoCaptureDevice: "CSVideoCaptureDevice" CSVideoCaptureFormat: "CSVideoCaptureFormat" CSVideoChannel: "CSVideoChannel" CSVideoDetails: "CSVideoDetails" CSVideoFrameFileSource: "CSVideoFrameFileSource" CSVideoRendererOSX: "CSVideoRendererOSX" 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" CSWhiteboardCanvas: "CSWhiteboardCanvas" 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>" 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>"