CPCallDelegate
Objective-C
@protocol CPCallDelegate <NSObject>
Swift
protocol CPCallDelegate : NSObjectProtocol
Call related resources
Since
1.0.0-
Address of the user who starts call
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, nonnull) CPUriAddress *callerAddress;
Swift
var callerAddress: CPUriAddress { get set }
Return Value
CPUriAddress
-
Address of the user who is being called
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, nonnull) CPUriAddress *calleeAddress;
Swift
var calleeAddress: CPUriAddress { get set }
Return Value
CPUriAddress
-
Name of the user who starts call
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *callerName;
Swift
var callerName: String? { get set }
Return Value
String
-
Holds video view which retrieved from local camera. Should be linked with GUI object which is a UIView
Since
1.0.0Declaration
Objective-C
@property (strong, nonatomic, nullable) UIView * localVideoView
Return Value
UIView
-
Holds video view which received from remote participant of call. Should be linked with GUI object which is a UIView
Since
1.0.0Declaration
Objective-C
@property (strong, nonatomic, nullable) UIView * remoteVideoView
Return Value
UIView
-
Perform end operation on the call.
Since
1.0.0Declaration
Objective-C
- (void)endCall;
Swift
func endCall()
-
Puts the speaker (microphone) into (in) mute
Since
1.0.0Declaration
Objective-C
- (void)mute;
Swift
func mute()
-
Resumes the speaker
Since
1.0.0Declaration
Objective-C
- (void)unMute;
Swift
func unMute()
-
Stops the video for the call
Since
1.0.0Declaration
Objective-C
- (void)videoStop;
Swift
func videoStop()
-
Starts the video for the call
Since
1.0.0Declaration
Objective-C
- (void)videoStart;
Swift
func videoStart()
-
Perform hold operation on this call
Since
1.0.0Declaration
Objective-C
- (void)holdCall;
Swift
func holdCall()
-
Perform un-hold (resume) operation on this call
Since
1.0.0Declaration
Objective-C
- (void)unHoldCall;
Swift
func unHoldCall()
-
@brief Method used by the application to transfer this call to another endpoint.
Declaration
Objective-C
- (void)transferCall:(CPUriAddress *_Nonnull)newAddress;
Swift
func transferCall(_ newAddress: CPUriAddress)
Parameters
newAddress
address of the endpoint to replace this endpoint in the call @since 1.7.0
-
@brief Method used by the application to transfer this call to another active call.
Declaration
Objective-C
- (void)consultativeTransfer:(id<CPCallDelegate> _Nonnull)call;
Swift
func consultativeTransfer(_ call: CPCallDelegate)
Parameters
call
call information of the endpoint to replace this calee in the call @since 1.8.0
-
@brief Method used by the application to forward this call to another participant.
Declaration
Objective-C
- (void)forwardCall:(CPUriAddress *_Nonnull)toAddress;
Swift
func forwardCall(_ toAddress: CPUriAddress)
Parameters
toAddress
address information of the endpoint to forward this call to @since 2.2.0
-
Inserts Dual Tone Multi Frequency Signal to sending queue and returns the success
Since
1.0.0Declaration
Objective-C
- (BOOL)sendDTMF:(char)tone;
Swift
func sendDTMF(_ tone: CChar) -> Bool
Parameters
tone
character value of DTMF tone. Can only be 0,1…,9,*,#,a,b,c,d,A,B,C,D;
Return Value
YES if tone can be successfully inserted to queue otherwise NO
-
Sets device capture and video resolution to specified position and resolution of the related call. If nil resolution value is provided then resotion value in configuration will be used. If resolution in configuration is set to nil default VGA (640x480) value will be set.
If a resolution value is not suitable to camera session then camera will not be changed and handler will be triggered with an error
Since
1.0.0Declaration
Objective-C
- (void)setCaptureDevice:(AVCaptureDevicePosition)position withVideoResolution:(nonnull NSString *)videoResolution completionHandler:(void (^_Nullable)(CPError *_Nullable))handler;
Swift
func setCaptureDevice(_ position: AVCaptureDevice.Position, withVideoResolution videoResolution: String) async -> CPError?
Parameters
position
AVCaptureDevicePosition of the camera which will be used
videoResolution
that intended to resolution
handler
that returns error
-
Returns Id of the call.
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, readonly, nonnull) NSString *Id;
Swift
var id: String { get }
Return Value
Id unique identifier of call
-
Returns callId that related with CPaaS session id For the outgoing call, this value is not set until establish call is succeeded
Since
1.0.0Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSString *sessionId;
Swift
var sessionId: String? { get }
Return Value
sessionId unique identifier of call that related CPaaS session
-
Retrieve state of the call.
Since
1.0.0Declaration
Objective-C
- (nonnull CPCallState *)getCallState;
Swift
func getCallState() -> CPCallState
Return Value
CallStates state of the call
-
Retrieve media attributes of the call.
Since
1.0.0Declaration
Objective-C
- (nonnull CPMediaAttributes *)getMediaAttributes;
Swift
func getMediaAttributes() -> CPMediaAttributes
Return Value
MediaAttributes attributes of the call’s media
-
Tests if the call is in muted state
Since
1.0.0Declaration
Objective-C
- (BOOL)isMute;
Swift
func isMute() -> Bool
Return Value
YES if call is muted otherwise NO
-
Indicates remote side can send video or not. Local side can receive video if he wishes. It is determined by Remote Session Description direction as follows
sendrecv sendonly recvonly inactive Values true true false false Since
1.0.0Declaration
Objective-C
- (BOOL)canReceiveVideo;
Swift
func canReceiveVideo() -> Bool
Return Value
BOOL
-
Indicates remote side can receive video or not. Local side can send video if he wishes. It is determined by Remote Session Description direction as follows
sendrecv sendonly recvonly inactive Values true false true false Since
1.0.0Declaration
Objective-C
- (BOOL)canSendVideo;
Swift
func canSendVideo() -> Bool
Return Value
BOOL
-
Gets last camera position set. If camera is not active last active camera position will be returned.
Since
1.0.0Declaration
Objective-C
- (AVCaptureDevicePosition)getActiveCamera;
Swift
func getActiveCamera() -> AVCaptureDevice.Position
Return Value
AVCaptureDevicePosition position of the current active camera
-
Gets last camera resolution set. Value can return nil if method is called before camera allocation.
See
AVCaptureSessionPreset
Since
1.0.0
Declaration
Objective-C
- (nullable NSString *)getCameraResolution;
Swift
func getCameraResolution() -> String?
Return Value
NSString camera resolution of the current active camera
-
Gets RTP/RTCP Statistics for related call
Since
1.0.0
Declaration
Objective-C
- (void)getRTPStatistics:(void (^_Nonnull)(NSString *_Nullable))completion;
Swift
func rtpStatistics() async -> String?
Parameters
completion
Completion Block with array which contains RTP/RTCP Statistics as JSON formatted String
-
Returns the list of available and supported codecs
Declaration
Objective-C
- (NSArray<NSDictionary *> *)getAvailableCodecs:(CPCodecType)codecType;
Swift
func getAvailableCodecs(_ codecType: CPCodecType) -> [[AnyHashable : Any]]!
Parameters
codecType
the codec type
Return Value
the list of available codecs