How to get remote peer address ip before establishing a connection?

Hello, I am currently developing a video call feature for a React Native app. The problem I am facing is that I cannot choose whom I want to call. The other device automatically receives the call. Currently, I am storing the details of the call in Firebase and I want to add a feature where I can choose whom to call based on the user’s name and IP address. My plan was to extract the IP addresses of all users before establishing a connection with any of them, and then choose the person to call based on their IP address. However, I couldn’t extract the IP addresses before establishing the connection and I’m not sure if my approach is feasible. I’m looking for advice on whether my idea is possible and if not, what other methods I can use to start a call with a selected person instead of it happening automatically. I am new to WebRTC and would appreciate any help. Thank you.

There are many approaches you could take to achieve a workable person to person calling app.
Which means listing options becomes difficult.

But i will at least provide a quick rundown of a possible solution for you.
You will need to do a lot of research.
But here we go.

You’ll need to have a backend to keep track of everything which would include user accounts, firebase cloud messaging registrations linked with the user accounts and WebRTC signalling messages.
You can then use the firebase cloud messaging data notifications to target user devices.
But also say you decide to support socket connections? then you can target user devices based on active user authed real-time connections which can play nicely with background services.
That is effectively an alternative to notifications but also requires some extra considerations.

In a previous app i was developing we used FeathersJS for the backend which was hooked together with the Firebase Admin Node module to handle sending notifications to user devices.
The advantage of using a framework like FeathersJS is that a lot of the bare essentials are already provided by default. For example there is a client module so you can easily link your app to the backend which allows you to send and receive data messages and events.

That being said, you are on a journey and there are many options, simple and complex.
Hopefully what i’ve said has given at least some idea as to the complexity involved when creating such an app, there are tons of things to cover if you want to get things right.

I can provide a more advanced example of all the different ins and outs to consider for a backend if required but as said, it is a pretty large undertaking depending on what type of app you are developing and how reliable you want things to be.