Since: API Level 9
package

android.net.sip

Classes | Description

Provides access to Session Initiation Protocol (SIP) functionality, such as making and answering VOIP calls using SIP.

To get started, you need to get an instance of the SipManager by calling newInstance().

With the SipManager, you can initiate SIP audio calls with makeAudioCall() and takeAudioCall(). Both methods require a SipAudioCall.Listener that receives callbacks when the state of the call changes, such as when the call is ringing, established, or ended.

Both makeAudioCall() also requires two SipProfile objects, representing the local device and the peer device. You can create a SipProfile using the SipProfile.Builder subclass.

Once you have a SipAudioCall, you can perform SIP audio call actions with the instance, such as make a call, answer a call, mute a call, turn on speaker mode, send DTMF tones, and more.

If you want to create generic SIP connections (such as for video calls or other), you can create a SIP connection from the SipManager, using open(). If you only want to create audio SIP calls, though, you should use the SipAudioCall class, as described above.

Note: Not all Android-powered devices support VOIP functionality with SIP. Before performing any SIP activity, you should call isVoipSupported() to verify that the device supports VOIP calling and isApiSupported() to verify that the device supports the SIP APIs.

Your application must also request the INTERNET and USE_SIP permissions in order to use the SIP APIs.