USSD EDRs

Introduction

This section describes the Event Data Records generated by the USSD Service Library.

Note that these EDRs are generated directly by the ProcessUssdLuaService and/or UssdNotifyLuaService) service library plugin components, rather than by an n2svcd top-level ‘Application’.

This is because USSD Lua scripting in the n2ttg product uses a relatively direct architecture compared to architecture for Lua scripting of e.g. INAP or SIP.

For USSD, the two applications are:

  1. The `SigtranApp` which handles the TCAP/SCCP/SIGTRAN (does not generate EDRs).
  2. The `LogicApp` which runs the `ProcessUssdLuaService` service library (generates `USSD` and custom EDRs).

By contrast in the N2ACD-SCP case, there is an intermediate application:

  1. The `SigtranApp` which handles the TCAP/SCCP/SIGTRAN (does not generate EDRs).
  2. The `LhoScpApp` which implements the SCP INAP state machine (generates `SCP` EDRs).
  3. The `LhoScpLuaService` service library within the `LogicApp` (generates custom EDRs).

his is because the SCP state machine is much more complex than the USSD session state machine, and a separate application is necessary. For USSD, the simpler two-application model will suffice.

Note of course that neither ProcessUssdLuaService nor Logic app actually performs the EDR file writing. Instead, these components send an EDR-LOG message to the EdrApp which performs the in-memory buffering, EDR encoding, EDR write-to-disk, file managemement, etc.

The USSD EDR Event Types are:

Common Format

The configuration parameters for configuring EDR output including filename structure and location is defined in the configuration documentation for the EdrApp which is a base component provided by the n2svcd package.

All EDRs are written by the EdrApp application using its file and record formatting rules.

Refer to the n2svcd base documentation for more details on configuring and managing EDR streams, and on the syntax/encoding details for N-Squared EDRs.

USSD-PROCESS EDR

The USSD-PROCESS EDR Event is generated by the ProcessUssdLuaService service library when it first accepts the inbound ProcessUnstructuredSSRequest MAP operation and commences execution of the Lua script.

In order for this (or any other EDR) to be generated, the following service loading steps must succeed.

  1. The inbound `TCAP-RECV` must contain a single `Invoke` component with a well-formed `ProcessUnstructuredSSRequest`.
  2. The decoded parameters must match a configured `` rule in the service configuration.

If both of these pre-conditions are met, then a USSD-PROCESS EDR will be generated at the start of the script, and at least one other EDR will be generated at (or before) the end of script processing.

Example:

2021-09-30 05:00:54.079<Logic-1632976990-05f220e1>USSD-PROCESS
|DREF=333:1:6|LTID=195c5d37|MSISDN=27761485722:1:1|OREF=64221420001:1:1|RPC=2068|RSSN=10|RTID=195c5d36|TEXT=%2A%23101%23

Field Type Description
DIRECTION in / out Indicates if the service or agent sent (out) or received (in) the Process USSD Request to/from the network.
DREF String Destination Reference as a concatenation (separated by :) of the Map-Open dialogue (if present):
  • destination_reference_ digits
  • destination_reference_ NOA
  • destination_reference_ NPI
LPC Integer SCCP Local Point Code of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
LRI Integer SCCP Local Routing Indicator of received TCAP BEGIN containing the ProcessUnstructuredSSRequest.
LSSN Integer SCCP Local Sub-System Number of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
LGTD Hex String SCCP Local Global Title Digits of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
LTID Hex String TCAP Local transaction ID of the received TCAP BEGIN containing the InitialDP.
MSISDN String MSISDN (if present) as a concatenation (separated by :) from the ProcessUnstructuredSSRequest-Arg:
  • MSISDN digits
  • MSISDN NOA
  • MSISDN NPI
OREF String Origination Reference as a concatenation (separated by :) of the Map-Open dialogue (if present):
  • origination reference digits
  • origination reference NOA
  • origination reference NPI
RTID Hex String TCAP Remote transaction ID of the received TCAP BEGIN containing the ProcessUnstructuredSSRequest.
RPC Integer SCCP Remote Point Code of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
RRI Integer SCCP Remote Routing Indicator of received TCAP BEGIN containing the ProcessUnstructuredSSRequest.
RSSN Integer SCCP Remote Sub-System Number of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
RGTD Hex String SCCP Remote Global Title Digits of received TCAP BEGIN containing the ProcessUnstructuredSSRequest (if present).
TEXT String The decoded/uncompressed text string as supplied by the user.

USSD-PROCESS-R EDR

The USSD-PROCESS-R EDR Event is generated by the ProcessUssdLuaService service library when sending the final result back to the handset. This will be present in all cases except when:

Example:

2021-09-30 21:42:02.997<Logic-1633038118-7274949c>USSD-PROCESS-R
|TEXT=NAME ONE/64221420001/333/%2A%23101%23

Field Type Description
TEXT String The decoded/uncompressed text string as supplied by the service logic.

USSD-PROCESS-E EDR

The USSD-PROCESS-E EDR Event is generated by the ProcessUssdLuaService service library when sending back a final ReturnError component. This happens only when expressly requested by the service logic, using the close USSD service library method.

Example:

2021-09-30 21:42:02.997<Logic-1633038118-7274949c>USSD-PROCESS-R
|TEXT=NAME ONE/64221420001/333/%2A%23101%23

Field Type Description
ERROR_CODE Integer The error code number sent in the ReturnError sent back for the ProcessUnstructuredSSRequest.

USSD-REQUEST EDR

The USSD-REQUEST EDR Event is generated by the ProcessUssdLuaService service library whenever an UnstructuredSSRequest Invoke is sent. This happens when specifically requested by the service logic, using the menu Lua service method.

Example:

2021-09-30 23:14:23.362<Logic-1633043654-4c61bd9a>USSD-REQUEST
|TEXT=1. Add-ons%0A2. Packages%0A3. Account Services%0A4. Other Services

Field Type Description
DIRECTION in / out Indicates if the service or agent sent (out) or received (in) the USSD Request to/from the network.
TEXT String The decoded/uncompressed text string as supplied by the service logic.

USSD-PROCESS-R EDR

The USSD-PROCESS-R EDR Event is generated by the ProcessUssdLuaService service library when any of the following cases occur.

Example:

2021-09-30 23:14:22.253<Logic-1633043654-4c61bd99>USSD-REQUEST-R
|CONTROLLED=1|REASON=Input|TEXT=2

Field Type Description
CONTROLLED 0 / 1 This is 1 iff the ReturnResult was contained within TCAP CONTINUE.
DISCARDED 0 / 1 This is 1 iff the ReturnResult was ignored because it arrived after the service logic timeout.
REASON Timeout / Abandon / Input The decoded/uncompressed text string as supplied by the handset.
REASON = Input - A TEXT value was supplied by the handset within the timeout window.
REASON = Timeout - No TEXT value was supplied by the handset within the timeout window.
REASON = Abandon - A TCAP Empty END or TCAP ABORT was received.
TEXT String The decoded/uncompressed text string as supplied by the handset.

USSD-PROCESS-E EDR

The USSD-PROCESS-R EDR Event is generated by the ProcessUssdLuaService service library when a ReturnError for the most recent sent UnstructuredSSRequest Invoke is received from the handset.

Example:

2021-09-30 23:14:23.361<Logic-1633043654-4c61bd9a>USSD-REQUEST-E
|CONTROLLED=1|ERROR_CODE=5

Field Type Description
CONTROLLED 0 / 1 This is 1 iff the ReturnError was contained within TCAP CONTINUE.
DISCARDED 0 / 1 This is 1 iff the ReturnError was ignored because it arrived after the service logic timeout.
ERROR_CODE Integer The error code number sent in the ReturnError sent back for the ProcessUnstructuredSSRequest.

USSD-NOTIFY EDR

The USSD-NOTIFY EDR Event is generated by the ProcessUssdLuaService service library whenever an UnstructuredSSNotify Invoke is sent. This happens when specifically requested by the service logic, using the notify Lua service method.

Alternatively, the USSD-NOTIFY EDR Event is generated by the UssdNotifyLuaService service library whenever an UnstructuredSSNotify Invoke is received. This happens at the start of the service logic when the script is initiated.

Example:

2021-10-01 00:15:19.256<Logic-1633047210-2ab08933>USSD-NOTIFY
|TEXT=Top-up Completed Successfully

Field Type Description
DIRECTION in / out Indicates if the service or agent sent (out) or received (in) the USSD Notify to/from the network.
TEXT String The decoded/uncompressed text string as supplied by the service logic.

USSD-NOTIFY-R EDR

The USSD-NOTIFY-R EDR Event is generated by the ProcessUssdLuaService service library when a ResultResult for the most recent sent UnstructuredSSNotify Invoke is received from the handset.

Alternatively, the USSD-NOTIFY-R EDR Event is generated by the UssdNotifyLuaService service library when it sends a ResultResult for an inbound UnstructuredSSNotify Invoke that was received from the handset.

Example:

2021-09-30 23:14:23.361<Logic-1633043654-4c61bd9a>USSD-REQUEST-E
|CONTROLLED=1

Field Type Description
CONTROLLED 0 / 1 This is 1 iff the ReturnResult was contained within TCAP CONTINUE.
DISCARDED 0 / 1 This is 1 iff the ReturnResult was ignored because it arrived after the service logic timeout.

USSD-NOTIFY-E EDR

The USSD-NOTIFY-E EDR Event is generated by the ProcessUssdLuaService service library when a ReturnError for the most recent sent UnstructuredSSNotify Invoke is received from the handset.

Alternatively, the USSD-NOTIFY-E EDR Event is generated by the UssdNotifyLuaService service library when it sends a ReturnError for an inbound UnstructuredSSNotify Invoke that was received from the handset.

Example:

2021-09-30 23:14:23.361<Logic-1633043654-4c61bd9a>USSD-REQUEST-E
|CONTROLLED=1|ERROR_CODE=5

Field Type Description
CONTROLLED 0 / 1 This is 1 iff the ReturnError was contained within TCAP CONTINUE.
DISCARDED 0 / 1 This is 1 iff the ReturnError was ignored because it arrived after the service logic timeout.
ERROR_CODE Integer The error code number sent in the ReturnError received or sent.

USSD-ABORT EDR

The USSD-ABORT EDR Event indicates that the handset/network abandoned the USSD session by sending or receiving a TCAP ABORT.

Example:

2021-09-30 23:14:23.361<Logic-1633043654-4c61bd9a>USSD-ABORT
|DIRECTION=in

Field Type Description
DIRECTION in / out Indicates if the service or agent sent (out) or received (in) the TCAP ABORT to/from the network.

USSD-END EDR

The USSD-END EDR Event indicates that the handset/network abandoned the USSD session by sending or receiving TCAP Empty END.

Example:

2021-09-30 23:14:23.361<Logic-1633043654-4c61bd9a>USSD-ABORT
|DIRECTION=in

Field Type Description
DIRECTION in / out Indicates if the service or agent sent (out) or received (in) the TCAP END to/from the network.

USSD-SHUTDOWN EDR

The USSD-SHUTDOWN EDR Event indicates that the USSD service logic ended with an internal processing error because of:

This EDR is generated independently of any other USSD EDRs associated with the EDR. In most cases, there will be other USSD EDRs associated with this instance containing additional protocol information.

Example:

2021-09-30 23:14:36.360<Logic-1633043654-4c61bda0>USSD-SHUTDOWN
|EXCEPTION=Received unsupported ReturnResult operation code 61 on USSD transaction.

Field Type Description
EXCEPTION String [Always Present] Description of the reason for the unexpected instance shutdown.