简体   繁体   English

iOS将RTP VoIP呼叫转移到后台

[英]iOS transfer RTP VoIP call to background

I need some help with a design decision. 我需要一些设计决策方面的帮助。 I am currently building an iOS app that requires VoIP capabilities and I have some questions. 我目前正在构建一个需要VoIP功能的iOS应用,我有一些疑问。

  1. I understand that iOS can only maintain a TCP connection in the background. 我知道iOS只能在后台维护TCP连接。 If I have a RTP connection open during a call will that call be lost when the user enters the background? 如果我在通话过程中打开了RTP连接,当用户进入后台时,该通话会丢失吗? If so how does Skype and others do this? 如果是这样,Skype和其他人如何做到这一点?

  2. If I have to simply stream audio over TCP to keep a conversation going in the background, does anyone have a suggestion on how to keep the audio in sync in the event of the jitter buffer running empty during a call? 如果我仅需要通过TCP流音频以保持对话在后台进行,那么在通话过程中抖动缓冲区为空的情况下,是否有人提出了如何使音频保持同步的建议?

Answer to (1): 回答(1):

iOS VoIP apps may keep a single TCP socket at background, usually your SIP socket, to allow incoming calls (INVITEs). iOS VoIP应用程序可能会在后台保留一个TCP套接字(通常是SIP套接字),以允许传入呼叫(INVITE)。

While your app has an active call, and goes to background, It has no restrictions , you can keep as many sockets as you want. 当您的应用程序正在进行通话并进入后台时, 它没有任何限制 ,您可以根据需要保留任意数量的套接字。

Here is a more detailed answer from another thread 这是另一个线程的更详细的答案

Regarding the SIP stack implementation, you may want to check open-source PJSip stack 关于SIP堆栈实现,您可能需要检查开源PJSip堆栈

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM