VoIP library for Android [closed]
Asked Answered
I

3

55

I need to integrate VoIP service in my Android application.
Is there any free (best open source) library ?

I need that the library at least allows voice call over internet and not necessarily internet to phone (like 2 Skype account).

Ikhnaton answered 22/11, 2012 at 11:5 Comment(0)
A
61

From android version 2.3 SIP API is added in Android. you can use either inbuilt SipStack library or third party open source sip stacks.

Refer Android Developer's Guide

There are different open source sip stack libraries as well as projects are available on internet. You can download the source code of that projects.

Here is the List of some popular open source sip stack libraries which allows to voice call over internet.

1.Pjsip
2.Mjsip
3.doubango
4.belle-sip

There are different open source projects which have used these libraries in their projects.like Sipdroid uses MjSip, Csipsimple uses PjSip, imsdroid uses doubango and Linphone uses belle-sip.

You may also like to refer this Android SIP stack - what to use?

Alembic answered 22/11, 2012 at 11:31 Comment(12)
are you able to call and sign in on TLS i am trying using douubango but not luck over TLS on UDP it is working fineDogmatist
@Dogmatist sorry,I didn't dig very deep into this but yeah you can try Lumicall which supports TLS and its also an open sourceAlembic
I tried to implement CSIPSimple it having 4 or 5 projects and also it shows and error how do you configure itDogmatist
@Dogmatist you have to follow this steps to build its source code.google.com/p/csipsimple/wiki/HowToBuild and yes make sure to install all the dependenciesAlembic
Good luck getting the Android SIP interface to work. A quick google for any working examples outside of their supposed demo will be fruitless. I've spent hours trying to get the demo to connect to a SIP server that works in other clients with no luck, and nobody seems able/cares to address this problem, which is widely reported. It also depends on javax, and even after attempting to build the entire SIP stack in my project can't be done unless you want to build the entire Android OS.Lineberry
@juned if i will use android sip apis , which server will host the voip calls ?! google ? or i have to search for a server to host the call?Panta
@Gemi, no google will not host your calls. You can create your own server by installing any telephony engine in your system (local or remote) like Asterisk or Freeswitch, then you're good to goAlembic
Thank you very much @juned I couldn't up vote an comment so I up voted your answerPanta
Its absolutely fine @Gemi, still you face any problem with setting up a server then let me kknow ;)Alembic
Have you ever build pjsip for android?Merely
I've used it with CSIpSimple @MuhammadBabarAlembic
I've tried to use Android's native sip. But, it does not support TLS. So, I've used PJSIP in Android. It has two libraries, one in C (PJSUA) and another in C++ (PJSUA2). PJSUA2 is a wrapper of PJSUA in such a way that other OOP language bindings can be created like Java, C#, python. The library is very fast. Like many open source project, the documentation is not that great. Although, Java binding are generated, You have to have knowledge of JNI, C/C++ to successfully use that.Here is a link for android - trac.pjsip.org/repos/wiki/Getting-Started/AndroidAneurysm
F
40

Open source SIP stacks :

  1. Android SDK's default implementation (API > 9) :
    Advantages : Documentation available. Easy to understand.
    Disadvantages : not all devices are supported. Can't change codecs.

  2. Third Party

Java :

  • JainSIP (license : Public Domain)

Advantages : Oracle (Sun) project ==> Active development. Looks easier than MjSIP (more documentation).
Disadvantages : Not used in a "famous" app.

  • MjSIP (license : GNU GPL)

Advantages : SipDroid is built on it. (source code available) (red5phone is another project) Disadvantages : Not fully compliant with RFC?. Lack of tutorials (Javadocs available though). SOPHISTICATED. Development almost dead.

  • Doubango framework [android-ngn-stack] (license : GNU GPLv3)

Advantages : IMSDroid is built on it. (source code available)
Disadvantages : Generated apk file size tend to be "heavy" (>15MB as mentioned here)

C/C++ :

  • Native SIP Stacks

Advantages : Various choice (PjSip [CSipSimple], GNU oSIP/eXoSIP [Linphone, which has made their own stack belle-sip]). Full compliance with RFC?. Better performance.
Disadvantages : Android NDK/JNI for a beginner.

Sources (old and mainly C/C++):

http://www.cs.columbia.edu/sip/implementations.html
http://www.pernau.at/kd/voip/bookmarks-sip-stacks.html

Fork answered 25/3, 2013 at 0:34 Comment(6)
"Works on WiFi only" --- Hmmm, strange, I just call myself via 3G normallyHols
Is there any document reference of "Works on Wifi only" ?Utley
@Utley "in most devices, it only works via WiFi, no 3G or LTE (note that android.net.sip.SipManager contains method isSipWifiOnly to know if this limitation is enabled)." sourceFork
@Fork Thank you for your patience. By the way, I found the audio quality always turns bad, with too much noise, when I am using loud speaker both end. (I am trying to use sip stack of android sdk and linphone.) Do you have any idea of that?Utley
No sorry I can't help you with that.Fork
A miss interpretation! Disadvantages : not all devices are supported. Works on WiFi only on most devices. Can't change codecs. From the docs: SIP runs over a wireless data connection, so your device must have a data connection (with a mobile data service or Wi-Fi).Merely
K
5

If you need VoIP but not SIP, check out WebRTC http://www.webrtc.org/

Kinch answered 18/6, 2013 at 14:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.