WebRTC IOS Client SDK - AudioCodes

Transcription

API Reference GuideAudioCodes WebRTC Solutions for EnterprisesWebRTC iOS Client SDKVersion 1.2.8

API Reference GuideContentsTable of Contents1Introduction . 111.11.21.32iOS SDK . 132.12.22.32.42.52.62.73Purpose .11Scope .11Benefits .11Getting Started .13Installation .13Usage Notes.14Bitcode Support .14Swift .15CallKit Framework .15Simulator Support with Xcode 12. 15API Classes. 173.1AudioCodesUA .183.1.13.1.23.2Standard Methods / Properties .193.1.1.1 getInstance .193.1.1.2 setServerConfig .193.1.1.3 setAccount .193.1.1.4 id AudioCodesEventListener delegate .193.1.1.5 login:(BOOL)autoRegister .203.1.1.6 login .203.1.1.7 logout:(BOOL)forceClose .203.1.1.8 logout .213.1.1.9 call .213.1.1.10 sendInstantMessage .21Advanced Methods / Properties .223.1.2.1 SipHeadersDictionary* registerExtraHeaders .223.1.2.2 SipHeadersDictionary* inviteExtraHeaders.223.1.2.3 NSString* userAgent .223.1.2.4 BOOL verifyServerCertificate .223.1.2.5 NSString* caCertFilePath .223.1.2.6 BOOL contactRewrite.233.1.2.7 BOOL disconnectOnBrokenConnection.233.1.2.8 int regExpires .243.1.2.9 BOOL useSessionTimer.243.1.2.10 ACLogLevel logLevel .243.1.2.11 id ACLoggerProtocol logger .253.1.2.12 handleNetworkChange .253.1.2.13 NSArray AudioCodesSession* * sessions .253.1.2.14 setPushNotification .253.1.2.15 setOauthToken .26AudioCodesSession .273.2.1Version 1.2.8Standard Methods / Properties .283.2.1.1 int sessionID; .283.2.1.2 answer .283.2.1.3 reject .283.2.1.4 Terminate .283.2.1.5 BOOL muteAudio (getter isAudioMuted) .293.2.1.6 BOOL muteVideo (getter isVideoMuted) .293.2.1.7 sendDTMF .293WebRTC

WebRTC iOS Client SDK API3.33.2.1.8 BOOL isOutgoing .293.2.1.9 BOOL hasVideo .293.2.1.10 CallState .303.2.1.11 TerminationInfo terminationInfo .303.2.1.12 NSInteger duration .303.2.1.13 BOOL isLocalHold .303.2.1.14 BOOL isRemoteHold .313.2.1.15 id userData .313.2.1.16 hold .313.2.1.17 switchCamera .313.2.1.18 (void) IView*)remoteView completion:(ACTaskCompletion)completion .323.2.1.19 stopVideo .323.2.1.20 id AudioCodesSessionEventListener delegate .333.2.1.21 RemoteContact *remoteNumber .333.2.1.22 transferCall (Blind Transfer) .333.2.1.23 attendedTransferCall (Attended Transfer) .343.2.1.24 RemoteContact *transferContact .343.2.1.25 CallTransferState transferState .343.2.1.26 NSUUID *callUUID .35WebRTCAudioManager .363.3.13.3.23.3.33.3.4Notes on iOS Audio Routing .36Notes on Using CallKit .37Standard Methods / Properties .383.3.3.1 getInstance .383.3.3.2 id WebRTCAudioRoutesListener delegate .383.3.3.3 setAudioRoute .383.3.3.4 getAudioRoute .383.3.3.5 getAvailableAudioRoutes .393.3.3.6 overrideAudioRouteToSpeaker .393.3.3.7 routeAudioToEnableBluetooth .39Manual Audio Management .403.3.4.1 BOOL useManualAudio.403.3.4.2 BOOL audioEnabled .403.3.4.3 setActiveAudioSession .403.3.4.4 configureAudioSession.403.3.4.5 audioSessionDidActivate.413.3.4.6 audioSessionDidDeActivate .413.4ACConfiguration .423.5Video Configuration .453.6DTMFOptions .463.7RemoteContact .473.8ACAlertInfoAttributes .483.4.1Standard Methods / Properties .423.4.1.1 getConfiguration .423.4.1.2 NSString *version .423.4.1.3 int localServerPort .433.4.1.4 DTMFOptions* dtmfOptions .433.4.1.5 VideoConfiguration* videoConfiguration .443.5.1Camera Parameters .453.6.1DTMF Parameters .463.7.1Standard Methods / Properties .473.7.1.1 NSString *displayName .473.7.1.2 NSString *userName .473.7.1.3 NSString *domain .473.8.1Standard Methods / Properties .483.8.1.1 BOOL autoAnswer .48API Reference Guide4Document #: LTRT-14087

API Reference Guide3.93.8.1.2ContentsNSInteger delay.48TerminationInfo .493.9.1Properties .493.9.1.1 CallTermination termination .493.9.1.2 NSInteger sipStatusCode .493.9.1.3 NSString *sipStatusText .493.9.1.4 NSString *sipReasonHeaderValue .493.9.1.5 NSString *sipMessage .493.10 ACNativeCallService .503.10.1 Class Type Definitions .513.10.1.1 typedef NS ENUM (NSInteger, ACCAllKitExecutionBlockResult) .513.10.1.2 typedef ACCallKitExecutionBlockResult ( ActionExecutionBlock)(void); 513.10.1.3 typedef void ( ACCallKitTaskSetupCompletion)(NSArray * NullableactionUUIDs, NSError * Nullable error) .523.10.2 Standard Methods / Properties .523.10.2.1 sharedInstance .523.10.2.2 BOOL usingCallKit .523.10.2.3 BOOL callGroupSupported .533.10.2.4 *)config .533.10.2.5 invalidate .533.10.2.6 reportNewIncomingCall .543.10.2.7 reportCallTerminated.543.10.2.8 reportCallUpdated .553.10.2.9 reportCallStartedConnecting .553.10.2.10 reportCallEstablished .553.10.2.11 initiateStartCall .563.10.2.12 initiateAnswerCall .563.10.2.13 initiateEndCall .573.10.2.14 initiateHoldCall .573.10.2.15 initiateMuteCall .583.10.2.16 initiateSendDtmfCall .583.10.2.17 isCallAssociatedWithNative.5845API Callbacks / Delegate Protocols / Notifications. 594.1AudioCodesEventListener .594.2AudioCodesSessionEventListener. 604.3WebRTCAudioRouteListener .624.4NSNotifications .634.1.14.1.2Login State Changed Event .59Incoming Call Event .594.2.14.2.24.2.34.2.4callTerminated .60callProgress .60callNotifyEvent .60cameraSwitched .614.3.14.3.2audioRoutesChanged .62currentAudioRouteChanged .624.4.14.4.2AudioCodesSession Notifications .63WebRTCAudioManager Notifications .63Use Case Examples . 655.15.25.35.4User Agent: Create Instance, Set server and Account . 65User Agent: Set Listeners (Callbacks) . 65User Agent Login: Connection to SBC Server and Login . 65Make a Call, Set Call Delegate .66Version 1.2.85WebRTC

WebRTC iOS Client SDK API5.55.65.75.85.95.105.115.125.13Send DTMF During Call .66Mute / Unmute During Call .66Accept Incoming Call (with Video) . 66Reject Incoming Call.67Terminate a Call .67Use of Video .67Using Built-In CallKit Support – ACNativeCallService . 67Using CallKit Manually .71Responding to Remote Control Events – Genesys 3PCC API . 74API Reference Guide6Document #: LTRT-14087

API Reference GuideNoticesNoticeInformation contained in this document is believed to be accurate and reliable at the time ofprinting. However, due to ongoing product improvements and revisions, AudioCodes cannotguarantee accuracy of printed material after the Date Published nor can it accept responsibilityfor errors or omissions. Updates to this document can be downloaded ocuments.This document is subject to change without notice.Date Published: December-16-2020WEEE EU DirectivePursuant to the WEEE EU Directive, electronic and electrical waste must not be disposed ofwith unsorted waste. Please contact your local recycling authority for disposal of this product.Customer SupportCustomer technical support and services are provided by AudioCodes or by an authorizedAudioCodes Service Partner. For more information on how to buy technical

Dec 16, 2020 · WebRTC iOS SDK to build a iOS applicationn . This application will interact with the AudioCodes' server to establish voice and video calls. This Reference Guidemay be used by iOS developers who want to