CometChatOutgoingCall component is a visual representation of a user-initiated call, whether voice or video. It serves as an interface for managing outgoing calls, providing users with essential options to control the call experience.

AI Integration Quick Reference
AI Integration Quick Reference
Usage
Integration
CometChatOutgoingCall is a custom view controller that offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
- Swift
If you are already using a navigation controller, you can use the
pushViewController function instead of presenting the view controller.Actions
Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.1. SetOnCancelClick
ThesetOnCancelClick action is typically triggered when the call is canceled, carrying out default actions. You can customize or override this default behavior using the following code snippet:
- Swift
2. OnError
You can customize error handling behavior by using the provided code snippet to override theonError callback:
- Swift
Filters
Filters allow you to customize the data displayed in a list within a Component. You can filter the list based on your specific criteria for a more customized experience. Filters can be applied using RequestBuilders of the Chat SDK. The OutgoingCall component does not have any exposed filters.Events
Events are emitted by a Component. By using events, you can extend existing functionality. Being global events, they can be applied in multiple locations and can be added or removed as needed.- Add Listener
Emitting Call Events
- Remove Listener
Customization
To fit your app’s design requirements, you can customize the appearance of the component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.Style
Using Style, you can customize the look and feel of the component in your app. These parameters typically control elements such as the color, size, shape, and fonts used within the component.1. OutgoingCall Style
You can customize the appearance of theOutgoingCall Component by applying the OutgoingCallStyle to it.
Global level styling
- Swift
- Swift

OutgoingCallStyle Properties
Functionality
These are small functional customizations that allow you to fine-tune the overall experience of the component.Advanced
For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your own views, layouts, and UI elements and then incorporate those into the component.SetAvatarView
With this function, you can assign a custom view to the avatar of the OutgoingCall Component.- Swift

CustomAvatarView as a custom UIView:
- Swift
SetCancelView
You can modify the cancel call view of the Outgoing call component using the property below:- Swift

CustomCancelView as a custom UIView:
- Swift
SetTitleView
You can customize the title view of the outgoing call component using the property below:- Swift

CustomTitleView as a custom UIView:
- Swift
SetSubtitleView
You can modify the subtitle view of the outgoing call component using the property below:- Swift

CustomSubtitleView as a custom UIView:
- Swift
Props
All props are optional unless noted.call
The outgoing call object to display.disableSoundForCalls
Disables the outgoing call ringtone.customSoundForCalls
Custom sound file URL for outgoing calls.avatarStyle
Customizes the appearance of the recipient’s avatar.Events
Events emitted by the Outgoing Call component:View Slots
leadingView
You can customize the leading view of an outgoing call component using the property below.- Swift
trailingView
You can customize the trailing view of an outgoing call component using the property below.- Swift
Common Patterns
Initiate Call and Present Outgoing Screen
Start a call and show the outgoing call interface:- Swift
Handle Call Acceptance and Transition to Ongoing Call
Navigate to ongoing call when the recipient accepts:- Swift
Custom Cancel Action with Confirmation
Show confirmation before canceling an outgoing call:- Swift
Related Components
Incoming Call
Display incoming call interface
Ongoing Call
Display active call interface
Call Logs
Display call history