Implemenation of SIP on android platform 2.1 - android

I want to work on SIP and Android. I am supposed to make it possible for two users to call eachother using iptel.org. One way to do this, I can use the demo provided with 2.3 but it needs a real device. As I don't have a real device, I wan't to work at 2.1 platform. I am a beginner, so I need a good step to start so that it would be easy for me to complete it.

PJSIP ( http://www.pjsip.org/) is a good and portable SIP framework. It doesn't still have support for android (even if it is just a matter of time) but you could check out this : http://code.google.com/p/csipsimple/ that is android SIP support built on PJSIP.

Android 2.1 doesn't have built-in support for SIP so you have to find a third party library.

JAIN-SIP http://jsip.java.net/ is also a very good SIP-Stack including a reference implementation of the SIP API.
It works on great on Android <= 2.2.
Here's (http://groups.google.com/group/mobicents-public/browse_thread/thread/e38fbdd874083d49/4fdb4123419e7a74) a nice discussion with further information.

Related

SipApi not supported by some device

I am using native sip apis to implement sip calling in android app and it is working fine but in some devices like CANVAS 3 it was not working .After debugging I found this line of code was returning NULL
**manager = SipManager.newInstance(ctx);**
That measns that device does not support Sip Apis.But on the same device other application for sipcalling like SipDroid etc are working properly.How it is possible ?Are they do not use native sip Apis???
you can go with custom SipLibraries.
Third party open source sip stacks library for Android
Jain sip: http://jsip.java.net/
Pjsip: http://www.pjsip.org/
Mjsip: http://mjsip.org/mjua.html
Doubango: http://www.doubango.org/
There are different open source projects which have used these libraries in their projects.
Jain sip: Not used in a "famous" app.
Sipdroid uses MjSip
Csipsimple uses PjSip
Imsdroid uses doubango.
Open source SIP stacks: Android SDK's default implementation (API > 9)
Advantages : Documentation available. Easy to understand.
Disadvantages : Not all devices are supported due carriers restriction. Works on WiFi only. Can't change codecs.
Third party: JainSIP
Advantages : Oracle (Sun) project ==> Active development. Looks easier than MjSIP (more documentation).
Disadvantages : None
Android 2.3 using external JAIN-SIP(J-SIP) Stack | Classpath
Third party: MjSIP
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).Development almost dead
Third party: Doubango framework
Advantages : IMSDroid is built on it. (source code available)
Disadvantages : Generated apk file size tend to be "heavy" (>15MB as mentioned here)
Followed from
Just to complement SilentKiller response I would forward my answer to this question but, please, keep in mind that choosing a stack is a quite complex task and depends of your goals and preferences.
Android SIP Stack relays on an old JAIN SIP version plus some extensions (IMS, supporting RTP, etc.). Main problem with this stack is that, 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).
On the other hand, pjsip is quite complete, like they say, it's not a SIP stack but a full multimedia communications library. It's really versatile: you can use a huge number of configuration or just run it as a simple user agent. It works with any kind of data connection (not limited to WiFi).
Now the comparison: In my opinion, pjsip is more complete and versatile but more difficult to integrate with you project (with Android SIP Stack everything remains in the SDK environment while, with pjsip, you would need to use the NDK and a JNI library).
My opinion: If you plan to create a very simple SIP app and you don't mind the WiFi limitation, I think, the best would be using native SIP API but, if you plan to improve it and do something more "interesting", I would strongly recommend pjsip. I've used both JAIN SIP and pjsip and, again, my vote goes for psip. But this is just my opinion.
There's also another third party stack that worths checking: Linphone. It is also integrated into your project with a JNI (like pjsip) and is also quite complete but, maybe, a bit more complex and heavy.
Hope this helps.

Android SIP with CSipSimple and pjsip

I am writing a custom Android application that allows the user to make VOIP calls using SIP. When the user presses a button, a voice call is initiated with another SIP user. That's it. The only other requirements are that it has to work on 2.3+ Android devices and must not be limited to wifi only.
Android already includes a SIP stack (as of 2.3) and I was able to modify the Walkie-Talkie sample project to work exactly how I wanted it to. Unfortunately I was not able to use this app with certain devices (Casio Commando being one of them), and worse, the application only works over wifi (as I mentioned, unacceptable for my project).
I started searching for another SIP stack with an easy to use API and came across CSimpleSip. I compiled it and ran their demo project (SipHome) and it worked perfectly on my unsupported phones (including the Commando) and it also worked over wifi, satisfying my requirements. I was so excited... until I looked at the source code for CSipSimple. I have no idea how to begin extracting out the actual calls to the underlying pjsip API, nor was I able to get the pjsip demo application working after 10+ hours.
Has anyone deconstructed CSipSimple and separated out the SIP parts from their incredibly complicated UI, or does anyone know of a simpler to use SIP library? With the native SIP API I was able to make a 200 line Android activity that made the call perfectly... how can I accomplish this with a third party SIP stack that supports non-wifi?
Thanks for any input, I know quite a few people have gotten stuck at this same stage.
Instead of going for the more complicated CSipSimple, you should maybe attack the most basic apjsua, which runs the same pjsip stack, so it should hopefully fit your requirements too: http://trac.pjsip.org/repos/wiki/Getting-Started/Android.
I totally agree with Balint, apjsua is the app which helps you for a better understanding, however it may be not obvious to start with it when you're not familiar with C (like I was) but it's much more efficient this way.
You can take a look to www.pjsip.org, take just care about the package you'll download because the tutorial isn't so clear: for instance they talk you a lot about apjsua (the android implementation of pjsua) and this app is not included in the download link they provide, you can see my question here about that:
where's apjsua?
And of course you'll have to watch the tutorial for android in the pjsip website.
Hope this helps.
Use csipsimple as a library project.There is a api in csipsimple project for using it as library.You can bind to csipsimple service and make calls.
Register broadcastrecievers and intent filters for get call back from csipsimple. Analyse Incall activity in csipsimple for more details.

Android SIP library VS pjsip: which one?

I intend to write an SIP client for Android (and maybe other systems but let's make Android first) and I was wondering which library would be the best to use: the one we got on the android sdk or pjsip? And why?
Has anyone got some feedback with pjsip?
Thanks for your answers
In my opinion, PJSIP is the best one. It is free and open source multimedia communication library. It is designed to be very small in footprint, have high performance, and very flexible.

Where can I find some documentation for BlueZ?

I am developing an android application for an embedded device that uses android 2.1. The bluetooth protocol stack is bluez. I cannot find any documentation related to bluez, and the source code is quite hard to read as it is not commented at all! There seems to have been a bluez wiki, but that site has been down for some time now...
Any help regarding where I might be able to find any help/documentation regarding how the bluez stack functions will be appreciated.
Thanks!
Actually not all Android devices use BlueZ stack as the underline bluetooth stack. It would be a good idea to stick with Android SDK bluetooth API if you want portability.
This being said, http://people.csail.mit.edu/albert/bluez-intro/ is a nice bluez tutorial.
Aniruddha, you may want to try using DBus Interface to invoke BlueZ APIs.
For the official BlueZ documentation you can obtain it from their git site:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc
For additional information you can visit BlueZ site: http://www.bluez.org/
Depending on the platform you're using you may need to use D-Bus. There are a lot of different D-Bus libraries depending on which language you're using. I will warn that using BlueZ directly has a high learning curve and requires some knowledge of the Bluetooth specification.
For Android I would recommend using the Bluetooth classes that are packaged with the Android Platform API if possible.
For Android application you should refer to the Android APIs.
http://developer.android.com/reference/android/bluetooth/package-summary.html
Application need not know the underlying BlueZ libraries and its functionalities

Titanium compatibility with Android

Will Titanium work properly on all android sdk versions (1.5, 1.6, 2.0, 2.1, 2.2).....
Based on the research I've done, yes, I believe so. I'd recommend trying it out.
Yes it is.
But be warned that while Titanium has its strengths, it also has its weaknesses (ie; memory).
If you're working on a project for a client or are just starting your journey into mobile development, I would recommend learning how to code a native application. At least that gives you some options if you run into troubles. I've been burned a couple of times.
Titanium works with all android SDKs .You just have to make some changes to make it work with all SDKs. Titanium works with sdk 2.1 and below without any changes. But in order to make it work with 2.2 and above you have to add a symbolic link of adb file which is in
platform-tools(source) folder to tools(target).
Occasionally the platform-level support for a particular feature is different between the iOS and Android. For instance, the underlying audio support is significantly better on iOS; many features are simply missing on Android (we eventually patched them ourselves).
In addition, the way that the underlying platform's primitives are wrapped differs, so that code that is correct Javascript will result in incorrect Java on Android. An example we came across was related to the treatment of null and undefined when used with the Ti.App.Properties.setXXX functions. This issues are becoming fewer and farther between, as mentioned, but there are still issues not just related to UI.
I suggest you make a point of continuously developing and testing on both platforms; you'll find incompatibilities (mostly related to leaky abstractions) and their workarounds more easily that way.
Well it works great for the cross platform Execution.
The Only problem is that when user want to compare the iphone version & Android Version by developing same code.
iphone is excellent as per its gesture supports & fine UI works.While Android is still improving the terms.
So you should firstly check your terms and requirement then Go a head with Titanium. OtherWise
Appcelerator consistently working around all the native support as well as common features.
you need to find the possibilities in proposal for the Framework.it will be great approach & future perception as well.

Categories

Resources