In an online charging system (Online Charging System, OCS) of an existing CDMA (Code Division Multiple Access, code division multiple access) network, online charging is performed by an SCP (Service Control Point, service control point) that exchanges messages with the OCS through a CCR (Credit Control Request, credit control request)/CCA (Credit Control Answer, credit control answer) procedure.
After a calling party initiates a call, an SSP (Service Switching Point, service switching point) reports an ORREQ message to the SCP, and the SCP sends a CCR Initial (CCR initial) request message to the OCS. The CCR Initial request message includes requested service units (such as call duration and traffic). The OCS creates a session according to the CCR Initial request message, performs authentication, and reserves a balance after rating the requested service units. If the balance is reserved successfully, the OCS returns a CCA Initial response message to the SCP, where the CCA Initial response message carries granted service units (such as call duration and traffic). After receiving the CCA Initial response message, the SCP delivers an orreq (continue to call) message to a mobile switching center, and the called party rings. After the called party picks up the phone, the SSP reports an OANSWER message to the SCP, and begins a conversation.
The SCP sends a CCDIR message to the SSP at intervals (such as 5 minutes) to check whether a call exists. The SSP returns a ccdir response message to the SCP, and the SCP, through a CCR Update (CCR update) message, reports the used service unit to the OCS, and requests a new reserved service unit. The OCS deducts a fee, reserves a next service unit, and returns a CCA Update message to the SCP. Such steps occur repeatedly in a conversation process.
After a user (including a calling party or a called party) hangs up, the SSP sends an ODISCONNECT message to the SCP, and the SCP sends a CCR Termination (CCR termination) message to the OCS to report the final used service unit. The OCS deducts a fee and releases the session, and returns a CCA Termination message to the SCP. The SCP returns an odisconnect response message to the SSP to end the session.
For example, after user A initiates a call to user B, the OCS creates a session, performs rating, and reserves a service unit in the account of user A. If user A hangs up initiatively before user B puts through the call, the SSP reports no message to the SCP, and the SCP cannot send any CCR Termination message to the OCS, and the reserved service unit on the OCS cannot be released in time. Upon timeout (expiry of a timeout period of 15 seconds, for example), the SCP initiatively sends a CCDIR message to query the SSP and obtain the state, and then can report a CCR Termination message to the OCS.
In a timeout period (such as 15 seconds), when user A initiates a call to other users again, since the balance is partly reserved for a previous session, a possibility that the balance may be not enough to initiate a call exists, which reduces the call completion rate and affects the service for the end user.