Call States and Statuses
Ongoing Call States
The following values are sent to the application in onCallState
events and are defined in the IVoIPObserver.CallState
enum.
CALL_STATE_INCOMING
The application is receiving an incoming call while in SIP registration workflow and correctly registered. The application should record the call key provided - as this is the first time the SDK is presenting the key and it can be used by the application to operate on the call (such as to hangup) - and should prompt the user to accept or reject the call. Please note that this status is not used in the Registration-Free workflow.
CALL_STATE_STARTING
The application has started an outgoing call using on of the CloudonixSDKClient.dial() API methods . The application should record the call key provided - as this is the first time the SDK is presenting the key and it can be used by the application to operate on the call (such as to hangup). Please note that in the Registration-Free workflow, this status will also be sent when starting to receive an incoming call (i.e. connecting to the SIP gateway "to pickup the call").
CALL_STATE_CALLING
The Cloudonix Mobile SDK has started the SIP session for an outgoing call with the SIP gateway. Please note that in the Registration-Free workflow, this status will also be sent when starting to receive an incoming call (i.e. connecting to the SIP gateway "to pickup the call").
CALL_STATE_RINGING
The outgoing call is ringing on the remote side.. No early media (ringing tone) is received from the remote side, so the application should emulate a ring-back tone to the user.
Please note that CALL_STATE_RINGING
and CALL_STATE_EARLY
have no particular order - depending on the server configuration, CALL_STATE_EARLY
may be received before or after CALL_STATE_RINGING
and the application should make sure to only emulate ring-back if CALL_STATE_RINGING
is received before CALL_STATE_EARLY
and only until CALL_STATE_EARLY
or CALL_STATE_CONFIRMED
is received.
CALL_STATE_EARLY
The outgoing call is ringing on the remote side and early media (ringing tone) is being played from the remote side. If the application is emulating a ring-back tone, it should stop playing that now.
CALL_STATE_CONNECTING
The call it about to connect (i.e. the Cloudonix Mobile SDK has sent a SIP 200 status).
CALL_STATE_CONFIRMED
The call has been connected (i.e. the Cloudonix Mobile SDK has received a SIP 200 status).
CALL_STATE_LOCALHOLD
The call has been put on hold on this side, and no media will be sent to the remote side, until the call is removed from hold.
CALL_STATE_REMOTEHOLD
The Cloudonix Mobile SDK has received a notification that the remote side has put the call on hold and it will not receive any media sent from our side until they remove the call from hold.
CALL_STATE_LOCAL_REMOTE_HOLD
The call has been put on hold both in the local and remote side. Both sides are not sending nor receiving media.
CALL_STATE_MEDIAACTIVE
The call's media has resumed, either after removing the call from hold, or after a media reset has completed successfully.
Call Disconnection Statuses
In addition to the above list of call statues that are sent to the onCallState
event to notify the application of call progress, these additional call statuses (also part of the IVoIPObserver.CallState
enum) are used to let the application know that the call has endded and the reason for the call disconnection. Only one such status will be delivered to let the application know that the call has connected, and after it is processed - the call information may no longer be available to the application using the CloudonixSDKClient.getCall()
.
CALL_STATE_DISCONNECTED
The call was disconnected after completing successfuly, due to either side sending a SIP BYE
message and it being acknowledged correctly.
CALL_STATE_DISCONNECTEDMEDIACHANGED
The call was disconnected after a network change caused media disruption and the Cloudonix Mobile SDK could not re-establish the media session.
CALL_STATE_DISCONNECTEDDUETOBUSY
The call was disconnected before being accepted and the SIP gateway notified that the callee signaled they are busy.
CALL_STATE_DISCONNECTEDDUETONETWORKCHANGE
The call was disconnected after a network change happened and the Cloudonix Mobile SDK failed to re-establish the SIP session (likely due to internet access not being available on the new network).
CALL_STATE_DISCONNECTEDDUETONOMEDIA
The call was disconnected after the Cloudonix Mobile SDK has stopped receiving media, failed to renew the media session (as per the MEDIA_RESET_TIMEOUT
setting) and finally has reached the media timeout (as per the NO_MEDIA_PERIOD
setting).
CALL_STATE_DISCONNECTEDDUETOTIMEOUT
The call was disconnected because the Cloudonix Mobile SDK did not receive a response to a SIP message it sent, after the time specified by the TSX_TIMER
setting has passed.