Working status diagram of CS call
In the analysis of telephony workflow, always contact the transition of various states, and different kinds of state is easy to confuse, overwhelmed, this article based on the memory of the work, according to the diagram, a brief analysis of the various states in the telephony.
Several states in the telephony.
Figure 1,drivercall State/call State/phone State
Drivercall State
The Drivercall state is updated from the Ril interface, which has 6 states, namely:
- ACTIVE,
- HOLDING,
- dialing,//MO call only
- Alerting,//MO call only
- INCOMING,//MT call only
- Waiting; MT Call only
Exactly corresponds to the ril_callstate in Ril.h. When the Ril_request_get_current_calls REQUEST is issued, Drivercall state updates its status according to the status information carried by response.
Call State
There are three kinds of call:ringingcall,foregroundcall and Backgroundcall in Gsmcall. That is ringing telephone, front desk telephone, backstage telephone.
Each call has a maximum of 5 connections, but at the same time 3 call together cannot exceed 7 connections.
The call state also contains the 6 states that the Drivercall has, but there are 3 different states in the meantime:
-IDLE
-Disconnecting
-Disconnected
When call executes handlepollcalls each time, active,holding,dialing is updated according to driver call, alerting,incoming,waiting these 6 states, but for idle, Disconnecting and disconnected these three additional states are a bit more complicated.
IDLE:
If a call is empty, then it is in the idle state, specifically how to understand the empty, look down.
Disconnecting:
If the machine hangs up this call. Call will become disconnecting state, (if the other side hangs up, call will not enter the disconnecting state)
Disconnected:
If the caller calls, but this connection because of local rejection (rejected) or no answer (MISSED). Or the active connection is interrupted by a local hang-up or hang-up, or the phone is not valid. Then this connection will be marked as disconnected.
When a call has only the disconnected connections. Then this call is called disconnected.
The disconnected state of the connection (connections) will be removed from the call connections queue, if the connections queue becomes empty, then the state of call will become idle
Phone State
The Phone state is updated from call state according to the Updatephonestate method.
If the ringing call (Ringingcall) is in the incoming/waiting state, then the phone state is ringing.
When a call is in the idle/disconnected/disconnecting state, it is called inactive and is activated if it is not in these three states.
When a power-off object (PENDINGMO) is non-empty, or at least one of the foreground and background calls is active. So this is the phone state is the off-hook (offhook) status.
If the phone is neither a ringing state nor a offhook state, it is in an idle state.
Shows the conversion state diagram of the phone and call states.
注意:只有本地挂断会导致DISCONNECTING状态,对方挂断或者信号原因导致的断开,会直接跳到Disconnected状态。(本图中没有体现)
Telephony Call status Diagram