FileDocCategorySizeDatePackage
ISipSession.javaAPI DocAndroid 5.1 API20350Sat Mar 14 02:05:32 GMT 2015android.net.sip

ISipSession

public interface ISipSession implements android.os.IInterface
A SIP session that is associated with a SIP dialog or a transaction that is not within a dialog.
hide

Fields Summary
Constructors Summary
Methods Summary
public voidanswerCall(java.lang.String sessionDescription, int timeout)
Answers an incoming call with the specified session description. The method is only valid to call when the session state is in {@link SipSessionState#INCOMING_CALL}.

param
sessionDescription the session description to answer this call
param
timeout the session will be timed out if the call is not established within {@code timeout} seconds

public voidchangeCall(java.lang.String sessionDescription, int timeout)
Changes the session description during a call. The method is only valid to call when the session state is in {@link SipSessionState#IN_CALL}.

param
sessionDescription the new session description
param
timeout the session will be timed out if the call is not established within {@code timeout} seconds

public voidendCall()
Ends an established call, terminates an outgoing call or rejects an incoming call. The method is only valid to call when the session state is in {@link SipSessionState#IN_CALL}, {@link SipSessionState#INCOMING_CALL}, {@link SipSessionState#OUTGOING_CALL} or {@link SipSessionState#OUTGOING_CALL_RING_BACK}.

public java.lang.StringgetCallId()
Gets the call ID of the session.

return
the call ID

public java.lang.StringgetLocalIp()
Gets the IP address of the local host on which this SIP session runs.

return
the IP address of the local host

public android.net.sip.SipProfilegetLocalProfile()
Gets the SIP profile that this session is associated with.

return
the SIP profile that this session is associated with

public android.net.sip.SipProfilegetPeerProfile()
Gets the SIP profile that this session is connected to. Only available when the session is associated with a SIP dialog.

return
the SIP profile that this session is connected to

public intgetState()
Gets the session state. The value returned must be one of the states in {@link SipSessionState}.

return
the session state

public booleanisInCall()
Checks if the session is in a call.

return
true if the session is in a call

public voidmakeCall(android.net.sip.SipProfile callee, java.lang.String sessionDescription, int timeout)
Initiates a call to the specified profile. The session listener is called back upon defined session events. The method is only valid to call when the session state is in {@link SipSessionState#READY_TO_CALL}.

param
callee the SIP profile to make the call to
param
sessionDescription the session description of this call
param
timeout the session will be timed out if the call is not established within {@code timeout} seconds
see
ISipSessionListener

public voidregister(int duration)
Performs registration to the server specified by the associated local profile. The session listener is called back upon success or failure of registration. The method is only valid to call when the session state is in {@link SipSessionState#READY_TO_CALL}.

param
duration duration in second before the registration expires
see
ISipSessionListener

public voidsetListener(android.net.sip.ISipSessionListener listener)
Sets the listener to listen to the session events. A {@link ISipSession} can only hold one listener at a time. Subsequent calls to this method override the previous listener.

param
listener to listen to the session events of this object

public voidunregister()
Performs unregistration to the server specified by the associated local profile. Unregistration is technically the same as registration with zero expiration duration. The session listener is called back upon success or failure of unregistration. The method is only valid to call when the session state is in {@link SipSessionState#READY_TO_CALL}.

see
ISipSessionListener