Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Peer-to-peer SIP call with Android SIP Stack?

Tags:

android

voip

sip

I have been looking for a way to set up the Android SIP stack to be able to establish a SIP call between two devices on the same network, in an ad-hoc manner. i.e without REGISTERing to a SIP server.

I have not been able to get this to work, as the SIP Demo includes server registration, and I cannot get it to make or receive a call without this step.

I am not even sure if this is supposed to be possible. The little mention of this I have been able to find is conflicting (some say it can be done with a specific set up which they do not say what is, and some say the Android SIP API is not meant for this).

I was wondering if anyone has got this to work or has any clues as to how I could go about configuring the API for this, as I would like to use the built in SIP API before looking at third party ones.

The application I am developing is an internal one which will always be running on the same devices, so the fact that the SIP API is not present on all devices will not be an issue for me.

like image 963
tristan2468 Avatar asked Jan 25 '13 16:01

tristan2468


People also ask

What is SIP protocol in Android?

Android - SIP Protocol. SIP stands for (Session Initiation Protocol). It is a protocol that let applications easily set up outgoing and incoming voice calls, without having to manage sessions, transport-level communication, or audio record or playback directly. Applications. Some of the common applications of SIP are.

Does VoIP studio support SIP calling on Android?

For instance, VoIPstudio is a great service that supports the SIP protocol, so a customer can use their account credentials on any Android SIP client to make calls. There are many third-party VoIP phone apps that support SIP calling, whether or not they offer VoIP services.

What is SIP-based Internet telephony?

This lets you add SIP-based internet telephony features to your applications. Android includes a full SIP protocol stack and integrated call management services that let applications easily set up outgoing and incoming voice calls, without having to manage sessions, transport-level communication, or audio record or playback directly.

What is a SIP application?

SIP stands for (Session Initiation Protocol). It is a protocol that let applications easily set up outgoing and incoming voice calls, without having to manage sessions, transport-level communication, or audio record or playback directly. Some of the common applications of SIP are. Here are the requirements for developing a SIP application −


1 Answers

I have been stuck on the same problematic.

If you can make it without the android sip api, you can look at the rtp api which gives you a bit lower-level tools to make a P2P VOIP application without the need of a server.

To support audio conferencing and similar usages, you need to instantiate two classes as endpoints for the stream:

AudioStream specifies a remote endpoint and consists of network mapping and a configured AudioCodec. AudioGroup represents the local endpoint for one or more AudioStreams. The AudioGroup mixes all the AudioStreams and optionally interacts with the device speaker and the microphone at the same time.

The counterpart is that you have to write your own device discovery protocol in order to know the port used by the audiostream peer as explained in this answer

The problem is not so hard if you only intend to make one-to-one conversation but is a little bit trickier if you want to make one-to-n conversation.

For a one-to-n conversation, the conference host has to instanciate n audiostream for each remote device he wants to call. Each remote peer has only one audiostream linked to one of the host audiostream.

like image 56
syl8o Avatar answered Nov 03 '22 02:11

syl8o