how to perform a outgoing audio call using livekit...
# ask-ai
d
how to perform a outgoing audio call using livekit in react-native expo also how to mantain a session in background for the current call what configurations needed to set in a react-native expo app, please provide a step by step guide
t
Thanks for reaching out, Kanchan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It sounds like you want a step-by-step for making an outgoing audio call in a React Native Expo app and keeping the call active in background. Below is the minimal end-to-end flow. High-level flow • The app connects to a LiveKit room. • Your server triggers the outbound call by creating a SIP participant into that room. • The app publishes mic audio and plays the SIP participant’s audio. Rooms/participants, Connecting, SIP overview 1) Set up project and keys • Create a LiveKit project; note your wsUrl, LIVEKIT_API_KEY, LIVEKIT_API_SECRET. Project setup 2) Prepare React Native + Expo • Use a dev build (Expo Go isn’t supported). Install the RN SDK and WebRTC dependency; call
registerGlobals()
on startup. • Follow platform install steps for iOS/Android. Expo quickstart, React Native quickstart 3) Configure outbound calling (server-side) • Create/configure a SIP outbound trunk (provider credentials, transport, numbers). • From your server, call CreateSIPParticipant with
sip_trunk_id
,
sip_call_to
,
room_name
(plus optional fields like
sip_number
,
wait_until_answered
,
play_dialtone
). SIP APIs, Make outbound calls, Making outbound calls 4) App: connect and handle audio • Request mic permission, then connect to the room using
wsUrl
+ token. • Publish local microphone and subscribe to remote audio (the SIP participant will appear when the call connects). Connecting to LiveKit, Camera & microphone 5) Keep the call active in background • iOS: enable Background Modes → “Audio, AirPlay, and Picture in Picture” and add mic/camera privacy strings in
Info.plist
. • Android: handle runtime mic permission and audio focus; use a foreground service when required by platform features. iOS background + permissions, Android permissions/notes Would you like a minimal example for: • A server endpoint that calls CreateSIPParticipant, or • The RN client code to connect/publish/subscribe in Expo? Sources: Rooms, participants, and tracks | LiveKit docs | SIP overview | LiveKit Docs | SIP participant | LiveKit Docs | SIP Integration & Telephony | livekit/livekit_composite | DeepWiki | SIP APIs | LiveKit Docs
d
yes
t
You said “yes” to examples—would you like: • A minimal server endpoint that calls CreateSIPParticipant to place the call, or • The React Native (Expo) client code to connect, publish mic, and play the SIP participant audio? If helpful, I can provide both, but which should I start with?
d
give me both examples and repo reference code
t
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!
d
i have to perform in-app voice call in react-native ios what method do i need to use for calling and persisting the call in background mode