4

We need to implement realtime voice chat between Android and iOS devices.

It's been done in apps like Viber.

How should we go about it?

Emanuil Rusev
  • 34,563
  • 55
  • 137
  • 201

1 Answers1

5

What you are looking for is SIP

The Session Initiation Protocol (SIP) is a signaling communications protocol, widely used for controlling multimedia communication sessions such as voice and video calls over Internet Protocol (IP) networks.

Android provides the android.net.sip package which...

Provides access to Session Initiation Protocol (SIP) functionality, such as making and answering VOIP calls using SIP.

If you want a demo, please have a look at the documentation

Original Source: VOIP on Android libraries or sample code

another lib for Android :
https://code.google.com/p/csipsimple/
http://www.linphone.org/
http://mjsip.org/mjua.html http://www.doubango.org/


For iOS, you can use PJSIP

PJSIP is a free and open source multimedia communication library written in C language implementing standard based protocols such as SIP, SDP, RTP, STUN, TURN, and ICE. It combines signaling protocol (SIP) with rich multimedia framework and NAT traversal functionality into high level API that is portable and suitable for almost any type of systems ranging from desktops, embedded systems, to mobile handsets.

another lib for iOS :
http://www.linphone.org/
http://www.pjsip.org/
http://sofia-sip.sourceforge.net/development.html
http://savannah.nongnu.org/projects/exosip/

Original Source: How to implement VoIP + SIP in iPhone?

Community
  • 1
  • 1
An SO User
  • 24,612
  • 35
  • 133
  • 221
  • Would this protocol work on iOS devices? – Emanuil Rusev Jun 20 '14 at 10:40
  • 1
    @EmanuilRusev AFAIK, you will need a SIP server which will re-route the voice data. So, what I pointed out is how you will code the app in Android. Similar functionality will exist in iOS, I am sure – An SO User Jun 20 '14 at 10:42
  • the topic is closed but we still can put a comment, nice. @LittleChild,... what about if there's no SIP account? I mean, in ad-hoc communication usage, how would it be? – gumuruh Aug 29 '14 at 03:53
  • @gumuruh I am not sure. Maybe create a one-time-use account every time the user logs in? Sorry for the delayed reply – An SO User Nov 16 '14 at 07:48