Search code examples
iosaudio-streamingvoiprtp

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.

  1. I understand that iOS can only maintain a TCP connection in the background. If I have a RTP connection open during a call will that call be lost when the user enters the background? If so how does Skype and others do this?

  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?


Solution

  • Answer to (1):

    iOS VoIP apps may keep a single TCP socket at background, usually your SIP socket, to allow incoming calls (INVITEs).

    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