我一直被困在同樣的問題上.
如果你可以在沒有android sip api的情況下制作它,你可以查看rtp api,它為你提供了一些較低級別的工具來制作P2P VOIP應用程序,而無需服務器.
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.
對應的是你必須編寫自己的設備發現協議,以便知道audiostream peer使用的端口,如answer中所述.
如果你只打算進行一對一的談話,但如果你想進行一對一的談話,那么問題就不那么難了.
對于一對一的會話,會議主持人必須為他想要呼叫的每個遠程設備實現n audiostream.每個遠程對等體只有一個音頻流鏈接到主機音頻流之一.