webphone
Class SIPNotification.Status

java.lang.Object
  extended by webphone.SIPNotification
      extended by webphone.SIPNotification.Status
Enclosing class:
SIPNotification

public static class SIPNotification.Status
extends SIPNotification

STATUS notification.
Triggered by: SIP session state chang, such as Init, Register, CallSetup, CallConnect, CallDisconnect, etc
You might receive multiple same or similar notifications for the same call state!
Event: SIPNotificationListener.onStatus
Fields: STATUS,line,statustext,peername,localname,endpointtype,peerdisplayname,[callid],online,registered,incall,mute,hold,encrypted,video,group, rtpsent,rtprec,rtploss,rtplosspercet,videohold,videosent,videorec,serverstats


Field Summary
static intCALL_STATE_CONNECTED
          speaking
static intCALL_STATE_CONNECTING
          setup or ringing
static intCALL_STATE_NO
          not in call
static intCALL_STATE_UNKNOWN
          unknown
static intDIRECTION_IN
          incoming (server endpoint: or inbound sessions such as incoming calls when JVoIP acts as a UAS)
static intDIRECTION_OUT
          outgoing (client endpoint: sessions initiated by JVoIP such as outbound calls, where JVoIP acts as a UAC)
static intDIRECTION_UNKNOWN
          unknown
static intENCRYPTION_STATE_NO
          not encrypted
static intENCRYPTION_STATE_UNKNOWN
          unknown
static intENCRYPTION_STATE_YES
          encrypted
static intENCRYPTION_STATE_YES_STRONG
          encrypted (always strong)
static intENCRYPTION_STATE_YES_WEAK
          encrypted (weak or partially)
static intHOLD_STATE_BOTH
          inactive (full hold)
static intHOLD_STATE_NO
          not in hold
static intHOLD_STATE_RECVONLY
          receiving only (no local recording)
static intHOLD_STATE_SENDONLY
          sending only (no local playback)
static intHOLD_STATE_UNKNOWN
          unknown
static intMUTE_STATE_BOTH
          all muted
static intMUTE_STATE_NO
          not muted
static intMUTE_STATE_PLAY
          playback muted
static intMUTE_STATE_REC
          recording muted
static intMUTE_STATE_UNKNOWN
          unknown
static intNETWORK_STATE_OFFLINE
          no network or internet connection
static intNETWORK_STATE_ONLINE
          connectivity detected
static intNETWORK_STATE_UNKNOWN
          unknown
static intREGISTER_STATE_FAILED
          failed.
static intREGISTER_STATE_NOTNEEDED
          no need to register (for example if the register parameter is set to 0 or no serveraddress/username/password was provided
static intREGISTER_STATE_UNKNOWN
          unknown
static intREGISTER_STATE_UNREGISTERED
          deregistered
static intREGISTER_STATE_WORKING_NO
          registration in progress.
static intREGISTER_STATE_WORKING_UNKNOWN
          registration in progress, unknown result.
static intREGISTER_STATE_WORKING_YES
          registration in progress.
static intREGISTER_STATE_YES
          registered
static intSTATUS_CALL_CONNECT
          200 OK send or received.
static intSTATUS_CALL_FINISHED
          200 OK or ACK send or received for the call disconnect request.
static intSTATUS_CALL_FINISHING
          BYE or CANCEL send or received.
static intSTATUS_CALL_HOLD
          call in hold
static intSTATUS_CALL_MIDCALL
          any other dialogs during a call
static intSTATUS_CALL_MUTE
          call in muted state
static intSTATUS_CALL_PROGRESS
          100 Trying received or sent
static intSTATUS_CALL_RINGING
          180 Ringing sent or received
static intSTATUS_CALL_SESSIONPROGRESS
          183 Session progress
static intSTATUS_CALL_SETUP
          beginning of an incoming or outgoing call: INVITE send or received
static intSTATUS_CALL_ROUTED
          authenticated and routed
static intSTATUS_CALL_SPEAKING
          ACK for 200 OK send or received.
static intSTATUS_DELETABLE
          Endpoint is marked to be destroyed.
static intSTATUS_ERROR
          Unexpected state error.
static intSTATUS_INITIALIZING
          SIP stack starting
static intSTATUS_MESSAGE
          emitted by IM/chat/SMS endpoints
static intSTATUS_NOTREADY
          not ready to initiate/accept calls
static intSTATUS_OUTBAND
          notify/options/etc.
static intSTATUS_READY
          ready to initiate/accept calls
static intSTATUS_REGISTER
          emitted by register endpoints.
static intSTATUS_REGISTERED
          server answered with 200 OK for the REGISTER request
static intSTATUS_REGISTERFAILED
          register failed.
static intSTATUS_SUBSCRIBE
          emitted by presence or voicemail subscribe/notify endpoints
static intSTATUS_UNKNOWN
          default value, should never be sent
static intSTATUS_UNREGISTER
          endpoint deregistered
static intVIDEO_STATE_INITIALIZED
          video call attempt
static intVIDEO_STATE_NO
          not a video call (audio only)
static intVIDEO_STATE_OFFERED
          video offer received from peer
static intVIDEO_STATE_RTPREADY
          video RTP stream constructed
static intVIDEO_STATE_STARTED
          player/recorder started
static intVIDEO_STATE_STREAMING
          video call in progress
static intVIDEO_STATE_UNKNOWN
          unknown
 
Method Summary
 java.lang.StringgetCallID()
          SIP Call-ID (can be used as an unique identifier for this session)
 intgetEncrypted()
          encryption state (ENCRYPTION_STATE_...
 java.lang.StringgetEncryptedText()
          hold state as string
 intgetEndpointType()
          in or out: one of the DIRECTION_ constrains
 java.lang.StringgetEndpointTypeText()
          direction as string
 java.lang.StringgetGroup()
          group name if any: group string for group chat and conference calls (members separated by | )
 intgetHold()
          is on hold state (HOLD_STATE_...
 java.lang.StringgetHoldText()
          hold state as string
 intgetIncall()
          phone/line is in call (CALL_STATE_...
 java.lang.StringgetIncallText()
          call state as string
 intgetLine()
          the line number for this state (or -1 for the global state)
 java.lang.StringgetLocalname()
          local user name (usually what you provided with the "username" parameter)
 intgetMute()
          is muted state (MUTE_STATE_...
 java.lang.StringgetMuteText()
          mute state as string
 intgetOnline()
          network status (NETWORK_STATE_...
 java.lang.StringgetOnlineText()
          network status as string
 java.lang.StringgetPeer()
          remote user name (the caller or the called party username)
 java.lang.StringgetPeerDisplayname()
          the other party display name if any
 intgetRegistered()
          registration state (REGISTER_STATE_...
 java.lang.StringgetRegisteredText()
          registration status as string
 longgetRtploss()
          number of lost RTP packets (only if endpoint is in call)
 intgetRtplosspercent()
          percent of the lost RTP packets (only if endpoint is in call)
 longgetRtprec()
          number of received RTP packets (only if endpoint is in call)
 longgetRtpsent()
          number of sent RTP packets (only if endpoint is in call)
 java.lang.StringgetServerstats()
          RTP statistics received from the server, if any (only if endpoint is in call)
 intgetStatus()
          the status as int (STATUS_...
 java.lang.StringgetStatusText()
          the status as string (for example: Init, Register, CallSetup, CallConnect, CallDisconnect)
 intgetVideo()
          video state (VIDEO_STATE_...
 java.lang.StringgetVideodText()
          video state as string
 intgetVideoHold()
          is video on hold state (HOLD_STATE_...
 java.lang.StringgetVideoHoldText()
          hold video state as string
 longgetVideoRtprec()
          number of received video RTP packets (only if endpoint is in video call)
 longgetVideoRtpsent()
          number of sent video RTP packets (only if endpoint is in video call)
 
Methods inherited from class webphone.SIPNotification
getNotificationType, toString
   

Field Detail

STATUS_UNKNOWN

public static final int STATUS_UNKNOWN
default value, should never be sent

See Also:
Constant Field Values

STATUS_NOTREADY

public static final int STATUS_NOTREADY
not ready to initiate/accept calls

See Also:
Constant Field Values

STATUS_INITIALIZING

public static final int STATUS_INITIALIZING
SIP stack starting

See Also:
Constant Field Values

STATUS_READY

public static final int STATUS_READY
ready to initiate/accept calls

See Also:
Constant Field Values

STATUS_OUTBAND

public static final int STATUS_OUTBAND
notify/options/etc. usually can be ignored

See Also:
Constant Field Values

STATUS_REGISTER

public static final int STATUS_REGISTER
emitted by register endpoints. you can use the IsRegistered,sRegisteredEx API or GetAccountRegState API to query the exact registration state

See Also:
Constant Field Values

STATUS_REGISTERED

public static final int STATUS_REGISTERED
server answered with 200 OK for the REGISTER request

See Also:
Constant Field Values

STATUS_REGISTERFAILED

public static final int STATUS_REGISTERFAILED
register failed. you can use the GetRegFailReason API to query the reason

See Also:
Constant Field Values

STATUS_UNREGISTER

public static final int STATUS_UNREGISTER
endpoint deregistered

See Also:
Constant Field Values

STATUS_SUBSCRIBE

public static final int STATUS_SUBSCRIBE
emitted by presence or voicemail subscribe/notify endpoints

See Also:
Constant Field Values

STATUS_MESSAGE

public static final int STATUS_MESSAGE
emitted by IM/chat/SMS endpoints

See Also:
Constant Field Values

STATUS_CALL_SETUP

public static final int STATUS_CALL_SETUP

beginning of an incoming or outgoing call: INVITE send or received

See Also:
Constant Field Values

STATUS_CALL_ROUTED

public static final int STATUS_CALL_ROUTED

Authenticated and routed

See Also:
Constant Field Values

STATUS_CALL_PROGRESS

public static final int STATUS_CALL_PROGRESS
100 Trying received or sent

See Also:
Constant Field Values
 

STATUS_CALL_SESSIONPROGRESS

public static final int STATUS_CALL_SESSIONPROGRESS
183 Session progress

See Also:
Constant Field Values

STATUS_CALL_RINGING

public static final int STATUS_CALL_RINGING
180 Ringing sent or received

See Also:
Constant Field Values

STATUS_CALL_CONNECT

public static final int STATUS_CALL_CONNECT
200 OK send or received. Call is (half) connected

See Also:
Constant Field Values

STATUS_CALL_SPEAKING

public static final int STATUS_CALL_SPEAKING
ACK for 200 OK send or received. Call is fully connected

See Also:
Constant Field Values

STATUS_CALL_MIDCALL

public static final int STATUS_CALL_MIDCALL
any other dialogs during a call

See Also:
Constant Field Values

STATUS_CALL_MUTE

public static final int STATUS_CALL_MUTE
call in muted state. Use the getMute() function instead to check the mute state.

See Also:
Constant Field Values

STATUS_CALL_HOLD

public static final int STATUS_CALL_HOLD
call in hold. Use the getHold() function instead to check the hold state

See Also:
Constant Field Values

STATUS_CALL_FINISHING

public static final int STATUS_CALL_FINISHING
BYE or CANCEL send or received. Call is (half) disconnected

See Also:
Constant Field Values

STATUS_CALL_FINISHED

public static final int STATUS_CALL_FINISHED
200 OK or ACK send or received for the call disconnect request. Call is fully disconnected

See Also:
Constant Field Values

STATUS_DELETABLE

public static final int STATUS_DELETABLE
Endpoint is marked to be destroyed. You can ignore this state

See Also:
Constant Field Values

STATUS_ERROR

public static final int STATUS_ERROR
Unexpected state error. This should never be never emitted

See Also:
Constant Field Values

DIRECTION_UNKNOWN

public static final int DIRECTION_UNKNOWN
unknown

See Also:
Constant Field Values

DIRECTION_OUT

public static final int DIRECTION_OUT
outgoing (client endpoint: sessions initiated by JVoIP such as outbound calls, where JVoIP acts as a UAC)

See Also:
Constant Field Values

DIRECTION_IN

public static final int DIRECTION_IN
incoming (server endpoint: or inbound sessions such as incoming calls when JVoIP acts as a UAS)

See Also:
Constant Field Values

NETWORK_STATE_UNKNOWN

public static final int NETWORK_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

NETWORK_STATE_OFFLINE

public static final int NETWORK_STATE_OFFLINE
no network or internet connection

See Also:
Constant Field Values

NETWORK_STATE_ONLINE

public static final int NETWORK_STATE_ONLINE
connectivity detected

See Also:
Constant Field Values

REGISTER_STATE_UNKNOWN

public static final int REGISTER_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

REGISTER_STATE_NOTNEEDED

public static final int REGISTER_STATE_NOTNEEDED
no need to register (for example if the register parameter is set to 0 or no serveraddress/username/password was provided

See Also:
Constant Field Values

REGISTER_STATE_YES

public static final int REGISTER_STATE_YES
registered

See Also:
Constant Field Values

REGISTER_STATE_WORKING_YES

public static final int REGISTER_STATE_WORKING_YES
registration in progress. probably will succeeed, treat it as registered. you might use the IsRegistered,sRegisteredEx API or GetAccountRegState API to query the exact registration state

See Also:
Constant Field Values

REGISTER_STATE_WORKING_UNKNOWN

public static final int REGISTER_STATE_WORKING_UNKNOWN
registration in progress, unknown result. you might use the IsRegistered,sRegisteredEx API or GetAccountRegState API to query the exact registration state

See Also:
Constant Field Values

REGISTER_STATE_WORKING_NO

public static final int REGISTER_STATE_WORKING_NO
registration in progress. probably will fail, treat it as unregistered. you might use the IsRegistered,sRegisteredEx API or GetAccountRegState API to query the exact registration state

See Also:
Constant Field Values

REGISTER_STATE_UNREGISTERED

public static final int REGISTER_STATE_UNREGISTERED
deregistered

See Also:
Constant Field Values

REGISTER_STATE_FAILED

public static final int REGISTER_STATE_FAILED
failed. you can use the GetRegFailReason API to query the reason

See Also:
Constant Field Values

CALL_STATE_UNKNOWN

public static final int CALL_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

CALL_STATE_NO

public static final int CALL_STATE_NO
not in call

See Also:
Constant Field Values

CALL_STATE_CONNECTING

public static final int CALL_STATE_CONNECTING
setup or ringing

See Also:
Constant Field Values

CALL_STATE_CONNECTED

public static final int CALL_STATE_CONNECTED
speaking

See Also:
Constant Field Values

MUTE_STATE_NO

public static final int MUTE_STATE_NO
not muted

See Also:
Constant Field Values

MUTE_STATE_UNKNOWN

public static final int MUTE_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

MUTE_STATE_PLAY

public static final int MUTE_STATE_PLAY
playback muted

See Also:
Constant Field Values

MUTE_STATE_REC

public static final int MUTE_STATE_REC
recording muted

See Also:
Constant Field Values

MUTE_STATE_BOTH

public static final int MUTE_STATE_BOTH
all muted

See Also:
Constant Field Values

HOLD_STATE_NO

public static final int HOLD_STATE_NO
not in hold

See Also:
Constant Field Values

HOLD_STATE_UNKNOWN

public static final int HOLD_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

HOLD_STATE_SENDONLY

public static final int HOLD_STATE_SENDONLY
sending only (no local playback)

See Also:
Constant Field Values

HOLD_STATE_RECVONLY

public static final int HOLD_STATE_RECVONLY
receiving only (no local recording)

See Also:
Constant Field Values

HOLD_STATE_BOTH

public static final int HOLD_STATE_BOTH
inactive (full hold)

See Also:
Constant Field Values

ENCRYPTION_STATE_UNKNOWN

public static final int ENCRYPTION_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

ENCRYPTION_STATE_NO

public static final int ENCRYPTION_STATE_NO
not encrypted

See Also:
Constant Field Values

ENCRYPTION_STATE_YES_WEAK

public static final int ENCRYPTION_STATE_YES_WEAK
encrypted (weak or partially)

See Also:
Constant Field Values

ENCRYPTION_STATE_YES

public static final int ENCRYPTION_STATE_YES
encrypted

See Also:
Constant Field Values

ENCRYPTION_STATE_YES_STRONG

public static final int ENCRYPTION_STATE_YES_STRONG
encrypted (always strong)

See Also:
Constant Field Values

VIDEO_STATE_UNKNOWN

public static final int VIDEO_STATE_UNKNOWN
unknown

See Also:
Constant Field Values

VIDEO_STATE_NO

public static final int VIDEO_STATE_NO
not a video call (audio only)

See Also:
Constant Field Values

VIDEO_STATE_INITIALIZED

public static final int VIDEO_STATE_INITIALIZED
video call attempt

See Also:
Constant Field Values

VIDEO_STATE_OFFERED

public static final int VIDEO_STATE_OFFERED
video offer received from peer

See Also:
Constant Field Values

VIDEO_STATE_RTPREADY

public static final int VIDEO_STATE_RTPREADY
video RTP stream constructed

See Also:
Constant Field Values

VIDEO_STATE_STARTED

public static final int VIDEO_STATE_STARTED
player/recorder started

See Also:
Constant Field Values

VIDEO_STATE_STREAMING

public static final int VIDEO_STATE_STREAMING
video call in progress

See Also:
Constant Field Values
Method Detail

getLine

public int getLine()
the line number for this state (or -1 for the global state)


getStatusText

public java.lang.String getStatusText()
the status as string (for example: Init, Register, CallSetup, CallConnect, CallDisconnect)


getStatus

public int getStatus()
the status as int (STATUS_... constant)


getPeer

public java.lang.String getPeer()
remote user name (the caller or the called party username)


getLocalname

public java.lang.String getLocalname()
local user name (usually what you provided with the "username" parameter)


getEndpointType

public int getEndpointType()
in or out: one of the DIRECTION_ constrains


getPeerDisplayname

public java.lang.String getPeerDisplayname()
the other party display name if any


getCallID

public java.lang.String getCallID()
SIP Call-ID (can be used as an unique identifier for this session)


getOnline

public int getOnline()
network status (NETWORK_STATE_... constant)


getRegistered

public int getRegistered()
registration state (REGISTER_STATE_... constant)


getIncall

public int getIncall()
phone/line is in call (CALL_STATE_... constant)


getMute

public int getMute()
is muted state (MUTE_STATE_... constant)


getHold

public int getHold()
is on hold state (HOLD_STATE_... constant)


getEncrypted

public int getEncrypted()
encryption state (ENCRYPTION_STATE_... constant)


getVideo

public int getVideo()
video state (VIDEO_STATE_... constant)


getGroup

public java.lang.String getGroup()
group name if any: group string for group chat and conference calls (members separated by | )


getRtpsent

public long getRtpsent()
number of sent RTP packets (only if endpoint is in call)


getRtprec

public long getRtprec()
number of received RTP packets (only if endpoint is in call)


getRtploss

public long getRtploss()
number of lost RTP packets (only if endpoint is in call)


getRtplosspercent

public int getRtplosspercent()
percent of the lost RTP packets (only if endpoint is in call)


getVideoHold

public int getVideoHold()
is video on hold state (HOLD_STATE_... constant)


getVideoRtpsent

public long getVideoRtpsent()
number of sent video RTP packets (only if endpoint is in video call)


getVideoRtprec

public long getVideoRtprec()
number of received video RTP packets (only if endpoint is in video call)


getServerstats

public java.lang.String getServerstats()
RTP statistics received from the server, if any (only if endpoint is in call)


getEndpointTypeText

public java.lang.String getEndpointTypeText()
direction as string


getOnlineText

public java.lang.String getOnlineText()
network status as string


getRegisteredText

public java.lang.String getRegisteredText()
registration status as string


getIncallText

public java.lang.String getIncallText()
call state as string


getMuteText

public java.lang.String getMuteText()
mute state as string


getHoldText

public java.lang.String getHoldText()
hold state as string


getEncryptedText

public java.lang.String getEncryptedText()
hold state as string


getVideodText

public java.lang.String getVideodText()
video state as string


getVideoHoldText

public java.lang.String getVideoHoldText()
hold video state as string