I am looking for general advice (technologies, best practice etc.) regarding the development of a VoIP application for Android. Similar questions have been posted, but I included specific questions.
I did quite some research and I noticed that there are several possible solutions (of course I know about the SIP stack in the SDK (also that it includes even voice transmission), but since it's not available on most devices, I don't intend to use it. Also, I read about Adobe Flex implementations but I would like to stick to something native).
What stuck to my mind is the following:
initiate the session using SIP (the server exists). Use SDP in the messages to discribe the session.
establish p2p connection (firewalls/routing may be a problem - STUN could be used - DNS may be involced than)
make actual transmission, I believe that the packets/procols involved are (payload) in -> RTP in -> UDP in -> IP.
This seems quite complicated at the moment so my first question is:
1)is this a standard approach? Is it best practice? I got some hints that, instead, MSRP could be used to transmit content, but I have read that it is only for IM, files etc.
2) Which SIP stack should I use for the best results/performance? I can use Java/Eclipse for development. I was thiking to choose JSIP (or tinysip, based on jsip) but am not sure.
3) Please give me a few hints about how to implement the data transmission in Java for Android (RTP)
As a last note, I am not excluding at all pjsip. I am thinking that it may be actually faster since it uses the NDK (I could switch to C++, np) . I also read that it already includes audio/video transmission.
I just don't know how easy it is to use and extend it and how good it really is. If you have used it, please let me know!
Thank you.
PS: Although not urgent or certain, portability may be an important factor for future.
I will need video transmission as well in the near future.
You should check out the IMSDROID project. It uses Doubango Framework which is written in C and is highly portable. What more, it is open sourced too so you can play around with their code and possibly contribute towards the community.
http://code.google.com/p/imsdroid/
cheers :)
Take a look at teamSpeak. They provide native sdk-s. But they aren't free.
It's not P2P, requires a server (at least as I know)
May worth a minute.
http://www.teamspeak.com/?page=teamspeak3sdk
Writing your own SIP stack takes a few months with only basic features.
I would recommend to use an existing sip stack. There are a few opensource discussed here.
Related
The Desired Functionality:
User A is running your app on an Android or iOS device. User A can automatically find and communicate with other nearby (< 20 meters?) users B and C (Cross-Platform), whether they're running Android or iOS, and without any of the users having an internet connection (Offline).
I believe this is a commonly desired functionality, and having a definitive answer to this question would be a great boon to the mobile development community.
Further requirements/things you'd like to have, in order of importance:
Single Codebase (or at least sharing 90+% of code) for Android and iOS, e.g. through Xamarin or something similar.
Automatically choose the best (perhaps going down a list of preference) signal to use, e.g. choosing WiFi direct or bluetooth (similar to AllJoyn, Multipeer)
Use only Free (or free for certain classes of user) libraries
The Question:
How to achieve the desired functionality?
Sub-question 1
Is it even possible?
Answer: YES. Apps like Firechat and Spaceteam do it, therefore it must be possible.
Rejected Possibilities:
Multipeer: iOS only, doesn't achieve Cross-Platform.
Alljoyn: iOS bindings are Objective-C only, doesn't achieve Single Codebase.
Mono.Zeroconf: Supposedly would require separate platform implementations, so don't achieve Single Codebase?
Open Garden SDK: Would be a great solution, except it doesn't actually exist yet.
I've been researching this topic for several days now, and I haven't been able to find a definitive answer. Part of it is probably that people use so many different terms like mesh networking, ad-hoc networking, zeroconf, DNS-SD, etc., which makes it difficult to search.
If you're interested in some of the research I did on stackoverflow and elsewhere, here are some notes and links (I'm limited in the number of links I put directly in this post).
Not sure if this is what you are looking for but I would highly recommend Xamarin with the library ZeroConf which is native and has Xamarin support.
https://github.com/onovotny/Zeroconf
It works great and that gets you close to your unified codebase with a native and uniform way of discovering other ZeroConf devices.
Edit: It looks like the ZeroConf library only supports subscribing to ZeroConf services and not publishing also and I think you will need publishing as well. But it seems other users have requested it so it seems like a feature they will be adding.
I am developing an Android application, in which I want to make a calls using internet using SIP in android. So I need to maintain my own SIP sever for my app users, how can I create my own SIP server?
I would not advise creating your our sip server as it would take a large number of man years of development and there are a lot of pitfalls.
There are some open source implementations that you could install and setup yourself. Like FreeSwitch or Asterisk. Both are large and complete to setup as there is a lot of domain knowledge required to understand how to set them up correctly.
There are also free server that you could try out as well like Sip2Sip.
Then there is the job of creating a sip client on Android. Again it's not that simple either. I would look at using a open source library here as well, like pjsip. This gives you the advantage of being able to look at examples of full sip clients already developed for Android like csipsimple. pjsip also has the advantage of being cross-platform, so you could reuse it in IOS for example.
Good luck.
The Server
As a communication server, choose for example sip:providerCE v2.6. The easiest way to get started with it is to download the VMware or Virtualbox image and fire it up on a suitable machine. If you get more serious, you want to install the system from scratch on a dedicated server with a public static IP. If you’re new to VoIP and SIP, do NOT try to install it on an Amazon EC2 instance, as they’re using destination NAT, which is a big pain for SIP and needs some experience with the SPCE to tweak it properly for that scenario.
Note that the SPCE is a 64bit system, so in order to run the VM images, you need to turn on 64bit CPU virtualization in your BIOS if VMware or Virtualbox warns you about it.
...There is very good tutorial HERE! on how to set things up.
...Don't forget there is a technical advise concerning SIP check the accepted ANS!
...Least but not last check THIS! VOIP Wiki, It covers everything related to VOIP.
SIP RFC is very easy protocol to implement. Just create a socket listener and implement RFC-3261. Start with with a basic codec GSM, then move up to A-LAW (G.711), as needed.
The tricky parts with SIP are (A) ensuring your call flows are correct (RFC-3665) and (B) media encoding/compresion. Use Asterisk (FreeSwitch) and WireShark to test your call flow. If you need DTMF support you'll need RFC-2833. If you need advanced codecs, consider using open-source library like FFMPEG.
I used uSIPserver on android. It works well and support video call. If you use client app which supports video then you can video call eachother on wifi.
It is so simple to use.
Good luck :-)
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.
Im searching code for RDP Client(OpenSource Google code for Android). Im Strugling to start,
Suggest me, how to start this project?
kumar
The RDP protocol is developed by Microsoft, and the first place to start is with the specification documentation.
http://msdn.microsoft.com/en-us/library/cc240445.aspx
Once you have understood the specification you can design your application to implement them in alignment with the target audience and their specific needs.
There are already RDP client applications available such as Xtralogic, so you should ask if you have or can you identify a real differentiator that will bring people to your app over other already well established and functional ones?
It is a huge project and not something anyone here can (or probably will) write source code for you. I'm sure they will however help with small specific questions related to the overall project.
Good luck!
Is there any configuration to enable VOIP on device? Or these methods really show that my device does not support VOIP?
I think this is a little late to answer, but after a lot of searching, I reached the fact that you are supposed to use any SipStack, because as explained here:
Fusion SIP source code is specifically designed for use in embedded
devices, has a small footprint and is completely ROMable and
re-entrant. The Fusion SIP stack provides a simplified API for easy
integration with the application and transport stack (TCP/IP/UDP).
and when talking about android specifically, as explained in the answer of this question:
All Android devices, which can connect to the Internet, support SIP.
After all SIP is just a protocol which requires connection to the
Internet, and it's very similar to HTTP.
In order to work with SIP, you need SIPStack implementation - doesn't
matter if it's 3rd party or it comes from Android API.
and about examples of SipStacks that can be used, you will find a punch of them like PJSIP and Doubango, and all exists in this question.