Description

Feature name

USSD Balance Enquiry

Applicable contexts

USSD service

Prerequisite Features

None

The USSD Balance Enquiry feature performs a balance enquiry request against the OCS for the subscriber and reports the result.

The first step is to validate the received additional arguments for the Balance Enquiry feature, which are submitted via the ‘AdditionalArgument’ session state field.

Note Currently, this feature does not support any additional arguments, and if any are set, ‘featureFailedToExecute’ is reported to the core. No further validation is performed.

If validation succeeds, a balance enquiry request (in the form of an Ro CCR with the RequestedAction AVP set to CHECK_BALANCE) is sent to the OCS.

Note Currently, no mappers are involved when that CCR is produced, so its contents cannot be customised.

If any error case arises from the OCS request, the feature will report featureFailedToExecute and cease execution.

If the OCS responds successfully, a USSD response message is constructed and written to the ‘ResponseMessage’ session state field. The response message is composed of a configurable prefix string and the result of the balance enquiry check. If any errors arise during response construction, such as missing configuration, no message is written, featureFailedToExecute is reported and the feature ceases execution.

Example:

If the configurable ‘Text’ field in the USSDServiceResponseMessage configuration is set to ‘Your account balance is:’ and the current balance returned from the OCS is equivalent to EUR2.65, then the resulting ‘ResponseMessage’ string will be ‘Your account balance is: 2.65 EUR’.

Session State inputs and outputs

Inputs

Name Type Format Description Behaviour if null/invalid

AdditionalArgument

String

Extra USSD parameters supplied to this feature — should be null

Expected value is null

MSISDN

String

MSISDN

The subscriber address provided to the OCS in the balance enquiry CCR

Dependent on OCS behaviour

Outputs

Name Type Format Description

MAPResponseErrorType

int

error code

Indicates the failure mode of USSD Balance Enquiry to the USSD service

OCSRequestSendTime

Long

timestamp

Indicates the time the balance enquiry CCR was sent to the OCS

ResponseMessage

String

Plain text (e.g. “Your account balance is:”)

A configurable response message including the balance, to be forwarded to the subscriber by the USSD service

Error scenarios

Scenario Handling

Sessionstate AdditionalArgument is not null

Increment FailedEnquirySsfFaultCounter
Set sessionstate MAPResponseErrorType to MAP_USSD_ERROR_UNEXPECTED_DATA_VALUE
Report featureFailedToExecute

Error creating Ro Activity or exception sending CCR

Increment FailedEnquirySystemFaultCounter
Set sessionstate MAPResponseErrorType to MAP_USSD_ERROR_SYSTEM_FAILURE
Report featureFailedToExecute

OCS times out

Increment FailedEnquiryOcsFaultCounter
Set sessionstate MAPResponseErrorType to MAP_USSD_ERROR_SYSTEM_FAILURE
Report featureFailedToExecute

OCS response error

Increment FailedEnquiryOcsFaultCounter
Set sessionstate MAPResponseErrorType to MAP_USSD_ERROR_SYSTEM_FAILURE
Report featureFailedToExecute

No configured USSDResponseMessage

Set sessionstate MAPResponseErrorType to MAP_USSD_ERROR_SYSTEM_FAILURE
Report featureFailedToExecute

Feature responses

Response Reason

featureFailedToExecute

failed to send OCS request, OCS response timeout, OCS response error, invalid USSD parameters, and so on

featureHasFinished

feature has finished

Configuration

USSD service configuration:

Parameter Type Description

AccountScaling

Integer

The subscriber account balance scaling (for example, 100, 1000..)

UssdDataEncodingScheme

Byte

The USSD text message encoding type

WaitForConfirmation

Boolean

If the service should wait for a confirmation or not

USSDServiceResponseMessage configuration:

Parameter Type Description

Id

Integer

The response message ID (first digit marks the language)

Description

String

The response message description

Text

String

The text to be used as prefix during the response message construction

Configuration profile naming

Configuration Profile Table Name Description Profile Naming

USSDServiceConfigurationTable

Service configuration

USSDServiceConfiguration

USSDServiceResponseMessageTable

Response message prefixes associated with particular messageIds

messageId, constructed as ‘currency-code*100 + 1’ (for example, 101)

Previous page Next page
Sentinel Express Version 2.7.0