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

前端 未结 3 1056
梦如初夏
梦如初夏 2021-02-04 18:01

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 REGIST

相关标签:
3条回答
  • 2021-02-04 18:17

    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.

    0 讨论(0)
  • 2021-02-04 18:35

    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.

    0 讨论(0)
  • 2021-02-04 18:35

    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
    
    0 讨论(0)
提交回复
热议问题