SipSession
classSipSession
kotlin.Any | |
↳ | android.net.sip.SipSession |
Represents a SIP session that is associated with a SIP dialog or a standalone transaction not within a dialog.
You can get a SipSession
from SipManager
with createSipSession()
(when initiating calls) or getSessionFor()
(when receiving calls).
Summary
Nested classes | |
---|---|
Listener for events relating to a SIP session, such as when a session is being registered ("on registering") or a call is outgoing ("on calling"). |
|
Defines SIP session states, such as "registering", "outgoing call", and "in call". |
Public methods | |
---|---|
Unit |
answerCall(sessionDescription: String!, timeout: Int) Answers an incoming call with the specified session description. |
Unit |
changeCall(sessionDescription: String!, timeout: Int) Changes the session description during a call. |
Unit |
endCall() Ends an established call, terminates an outgoing call or rejects an incoming call. |
String! |
Gets the call ID of the session. |
String! |
Gets the IP address of the local host on which this SIP session runs. |
SipProfile! |
Gets the SIP profile that this session is associated with. |
SipProfile! |
Gets the SIP profile that this session is connected to. |
Int |
getState() Gets the session state. |
Boolean |
isInCall() Checks if the session is in a call. |
Unit |
makeCall(callee: SipProfile!, sessionDescription: String!, timeout: Int) Initiates a call to the specified profile. |
Unit |
Performs registration to the server specified by the associated local profile. |
Unit |
setListener(listener: SipSession.Listener!) Sets the listener to listen to the session events. |
Unit |
Performs unregistration to the server specified by the associated local profile. |
Public methods
answerCall
funanswerCall(
sessionDescription: String!,
timeout: Int
): Unit
Deprecated: Deprecated in Java.
Answers an incoming call with the specified session description. The method is only valid to call when the session state is in State#INCOMING_CALL
.
Parameters | |
---|---|
sessionDescription |
String!: the session description to answer this call |
timeout |
Int: the session will be timed out if the call is not established within timeout seconds. Default value (defined by SIP protocol) is used if timeout is zero or negative. |
changeCall
funchangeCall(
sessionDescription: String!,
timeout: Int
): Unit
Deprecated: Deprecated in Java.
Changes the session description during a call. The method is only valid to call when the session state is in State#IN_CALL
.
Parameters | |
---|---|
sessionDescription |
String!: the new session description |
timeout |
Int: the session will be timed out if the call is not established within timeout seconds. Default value (defined by SIP protocol) is used if timeout is zero or negative. |
endCall
funendCall(): Unit
Deprecated: Deprecated in Java.
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 State#IN_CALL
, State#INCOMING_CALL
, State#OUTGOING_CALL
or State#OUTGOING_CALL_RING_BACK
.
getCallId
fungetCallId(): String!
Deprecated: Deprecated in Java.
Gets the call ID of the session.
Return | |
---|---|
String! |
the call ID |
getLocalIp
fungetLocalIp(): String!
Deprecated: Deprecated in Java.
Gets the IP address of the local host on which this SIP session runs.
Return | |
---|---|
String! |
the IP address of the local host |
getLocalProfile
fungetLocalProfile(): SipProfile!
Deprecated: Deprecated in Java.
Gets the SIP profile that this session is associated with.
Return | |
---|---|
SipProfile! |
the SIP profile that this session is associated with |
getPeerProfile
fungetPeerProfile(): SipProfile!
Deprecated: Deprecated in Java.
Gets the SIP profile that this session is connected to. Only available when the session is associated with a SIP dialog.
Return | |
---|---|
SipProfile! |
the SIP profile that this session is connected to |
getState
fungetState(): Int
Deprecated: Deprecated in Java.
Gets the session state. The value returned must be one of the states in State
.
Return | |
---|---|
Int |
the session state |
isInCall
funisInCall(): Boolean
Deprecated: Deprecated in Java.
Checks if the session is in a call.
Return | |
---|---|
Boolean |
true if the session is in a call |
makeCall
funmakeCall(
callee: SipProfile!,
sessionDescription: String!,
timeout: Int
): Unit
Deprecated: Deprecated in Java.
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 State#READY_TO_CALL
.
Parameters | |
---|---|
callee |
SipProfile!: the SIP profile to make the call to |
sessionDescription |
String!: the session description of this call |
timeout |
Int: the session will be timed out if the call is not established within timeout seconds. Default value (defined by SIP protocol) is used if timeout is zero or negative. |
See Also
register
funregister(duration: Int): Unit
Deprecated: Deprecated in Java.
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 State#READY_TO_CALL
.
Parameters | |
---|---|
duration |
Int: duration in second before the registration expires |
See Also
setListener
funsetListener(listener: SipSession.Listener!): Unit
Deprecated: Deprecated in Java.
Sets the listener to listen to the session events. A SipSession
can only hold one listener at a time. Subsequent calls to this method override the previous listener.
Parameters | |
---|---|
listener |
SipSession.Listener!: to listen to the session events of this object |
unregister
fununregister(): Unit
Deprecated: Deprecated in Java.
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 State#READY_TO_CALL
.
See Also