0

I'm currently researching about how to make an iOS VoIP app and I wondering how user1 of Skype, Viber, Facebook Messengers... can reach to other user in contact list? In my case, the users can request a call to admins. Then admins can call back to them with their IP address they were request to server.

The big problem is if users connected to a Wi-Fi to request a call to server, app will send their ip address to admins. But if they have to connected to another Wi-Fi, their IP address will difference with the older.

I don't know how to check when user's IP was changed. And how to update the IP if it occurs. Does anyone faced this problem and can you guys give me some solution about this problem?

Pang
  • 9,564
  • 146
  • 81
  • 122
Bad_Developer
  • 537
  • 5
  • 20
  • oh, so many misunderstandings in one question... I suggest you to read about IP networks first, then you will be able to understand concepts behind [hole punching](http://www.brynosaurus.com/pub/net/p2pnat/) – Iłya Bursov May 15 '17 at 03:56
  • @Lashane Yeah, I know this question is very misunderstandings. But I don't know how to describe my question. In short way to describe is: How to update user's IP was sent to my server whenever it changed? – Bad_Developer May 15 '17 at 04:09
  • 1
    assign unique id to every client, every client will send heart beats, every heart beat packet will have ip – Iłya Bursov May 15 '17 at 04:12

1 Answers1

0

For this you have to configure many things.

Usually Skype, Viber, Facebook Messengers configure things like below.

  • Ideally there should be target on specific IP or something.
  • That end point to get connect in video call has to configured and come from server end
  • https://www.vidyo.com/ is really good platform, though have SDK in C++ so in any technology you can configure it easily
  • To know online / offline user's, better approach is websocket
  • list of user will also based on websocket or API response
  • Good platform for websocket - https://github.com/tidwall/SwiftWebSocket
  • Pushkit is also required thing, when app is in killed ( Terminated ) state then using pushkit silent notification with local notification you can notify user about incoming call
Hasya
  • 9,792
  • 4
  • 31
  • 46