-->

how to customise AppRTC to receive call

2019-06-06 16:43发布

问题:

I have integrated AppRTC in my project and I am able to join the WebRTC call in the room of https://apprtc.appspot.com using RoomName

    appClient = ARDAppClient(delegate: self)
    appClient?.createLocalMediaStream()
    appClient?.connectToRoomWithId(String(roomId), options: nil)

I am able to hardcode a RoomName in my app and install the app in two devices A & B and if I make a call from both the devices at same time in A & B then I am able to successfully have a WebRTC call between them.

Now I'd like to do a real VOIP call that is make a call from my app in device A and receive the call at my app in device B.

AFAIK I have to do SIGNALING part right here to connect to the app in device B from device A.

Any help is highly appreciated !

回答1:

What you need is a signaling server. Both peers connect to it and they can negotiate a room name through it before starting a call. When a room name is decided, both peers can simply connect to that room and they will be able to see each other.

There are a few signaling servers designed for WebRTC available online or you can make your own, it's not that complex. Really all it needs to do is register clients and act as a mailman between them.