Peer-to-peer SIP call with Android SIP Stack?
Asked Answered
U

3

8

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.

Underwater answered 25/1, 2013 at 16:15 Comment(1)
As far as I know, it is not possible to make SIP calls without registering at a SIP server with the Android SIP API. I use Kamailio (OpenSER) in my network as a server to make SIP calls. It works pretty good and it is open source. A tutorial to setup a Kamailio server can be found here:kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-gitFerryboat
H
6

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.

Harpoon answered 31/12, 2014 at 10:58 Comment(0)
M
5

You can do this with CSipSimple, which is open source: http://code.google.com/p/csipsimple/

You set up local accounts, register to yourself instead of a server, then make a phone call using TXT mode and dial remote_account_name@remote_ip_address.

Maletta answered 28/5, 2013 at 20:12 Comment(2)
I am looking specifically for APIs that can be used in proprietary software (LGPL or BSD-type licences).Underwater
Okay, I didn't know that was part of your requirement. Thanks for the downvote.Maletta
S
-1

Sip peer is like an extension number used to configure in sip phone . Please find details for creating sip peer . I am using centos 6.9 64 bit and having installed asterisk 11 You can create sip peer using asterisk server . Goto vi /etc/asterisk/sip.conf

[1001]
username=1001
secret=123
qualify=yes
type=friend
disallow=all
allow=ulaw,alaw,gsm
host=dynamic

For more detail and easy understanding. Please refer given below link

https://youtu.be/27wm-fu25SM

or

http://rulariteducation.blogspot.in/2017/07/how-to-add-sip-peer-in-asterisk.html
Spheroid answered 26/7, 2017 at 7:38 Comment(1)
This really does not contribute to the question asked.Underwater

© 2022 - 2024 — McMap. All rights reserved.