USSD Query FTL File Parameters

You can use the following header data and body data in the Apache FreeMarker template (FTL) files for processing Unstructured Supplementary Service Data (USSD) queries.

Read Only Header Parameters

Readable Header Values lists the header parameters that you can read in the Apache FreeMarker template.
Table 1. Readable Header Values
Parameter Name Type Description
headers.language String The language of the account contact, if available. Otherwise the language is set to the template.defaultLanguage property value.
headers.notificationFlag Long The bitmap for the notification method bit field of the account contact. Valid values are: 0x0001=Email, 0x0002=SMS, 0x0004=USSD. The lower 8 bits are reserved for MATRIXX. The upper 24 bits are available for custom values.

USSD Query Notification Header Parameters

Header Parameters lists header parameters that you can set in Apache Freemarker template files for USSD query notifications. To set the value of a header parameter, use the Apache FreeMarker setHeader() function within the template file, for example:
<#t>${request.setHeader('sendAsNotify', true)}
Table 2. Header Parameters
Parameter Name Type Description
headers.sendAsNotify Boolean Set this to true if you want the notification text to be sent to the user in a separate USSD Notification message. Otherwise it is sent as a response to the original USSD Query request (this is the default setting).
headers.dataEncodingScheme Integer Overrides the incoming data coding scheme (DCS) of the original query request.
Note: You can override the properties set in the mtx_notifier_camel.yaml file by setting one or more of the following variables. These property values affect only USSD query responses sent in USSD notifications, that is, when sendAsNotify is set to true.
headers.alertingPattern Integer Overrides the alert Camel property. For example:
ussd:
  alert: 0
The alertingPattern field is sent in MAP v2+ USSD notifications by default. If you do not want to send the alertingPattern field, set alertingPattern to "-1" by including the following line in the FreeMarker template:
<#t>${request.setHeader('alertingPattern', -1)}
headers.routingFlag Integer Overrides the routingFlag Camel property. For example:
ussd:
  calledAddress:
    routingFlag: 0
headers.pointCode Integer Overrides the pointCode Camel property. For example:
ussd:
  calledAddress:
    pointCode: 102
headers.subSysId Integer Overrides the subSysId Camel property. For example:
ussd:
  calledAddress:
    subSysId: 6
headers.globalTitleType Integer Overrides the globalTitleType Camel property. For example:
ussd:
  calledAddress:
    globalTitle:
      globalTitleType: 4
headers.translationType Integer Overrides the translationType Camel property. For example:
ussd:
  calledAddress:
    globalTitle:
      translationType: 1
headers.addressPlanFlag Integer Overrides the addressPlanFlag Camel property. For example:
ussd:
  calledAddress:
    globalTitle:
      addressPlanFlag: 1
headers.addressType Integer Overrides the addressType Camel property. For example:
ussd:
  calledAddress:
    globalTitle:
      addressType: 4
headers.globalTitleContent String Overrides the globalTitleContent Camel property. For example:
ussd:
  calledAddress:
    globalTitle:
      globalTitleContent: 1234

USSD Query Notification Body Parameters

Body Parameters lists the body variables that you can use in USSD query notification FTL files.
Table 3. Body Parameters
Parameter Name Type Description
body.ussdString String The USSD string (the ussd-String field in the Process-UnstructuredSS-Request message) entered by the user. For example, **121*1*2#, as defined in the 3GPP TS 22.030 specification.
Note: For USSD callback services, the USSD string specifies the SAN (service access code or service code) and B-party number (called party number)
body.ussdSCP String The service code prefix in the USSD-String. For example, in the USSD string: **121*1*2#, the service code prefix is "**". Valid prefixes are:
  • *
  • **
  • #
  • ##
  • *#
body.ussdSC String The service code in the USSD-String. For example, in the USSD string:
  • **121*1*2#, the service code is 121
  • **124*0722724681234#, the service code is 124
body.ussdSIList List of Strings The list of service information parameters in the USSD-String. For example, in the USSD string: **121*1*2#, the service information parameters are 1 and 2.
body.firstName String The first name of the contact.
body.lastName String The last name of the contact.
body.emailId String The email address of the contact.
body.phoneNumber String The phone number of the contact.
body.timeZone String The time zone of the contact.
body.contactType Long The type of contact. Valid contact types are:
  • 1 — Subscriber
  • 2 — Group admin
  • 3 — Group members
body.notificationTime Date The date and time of the query/notification.
body.subscriber Subscriber Data If enabled in the ussd_query notification type in My MATRIXX, this is the subscriber data appended to the USSD query notification.
body.subscriber.BalanceList List of Balances If enabled in the ussd_query notification type in My MATRIXX, this is the list of subscriber balance data appended to the USSD query notification.
body.groupBalanceList List of Balances If enabled in the ussd_query notification type in My MATRIXX, this is the list of group balance data appended to the USSD query notification.
body.subscriberPurchasedOfferList List of Purchased Offers If enabled in the ussd_query notification type in My MATRIXX, this is the list of subscriber purchased offer data appended to the USSD query notification.
body.groupPurchasedOfferList List of Purchased Offers If enabled in the ussd_query notification type in My MATRIXX, this is the list of group purchased offer data appended to the USSD query notification.
body.devicePurchasedOfferList List of Purchased Offers If enabled in the ussd_query notification type in My MATRIXX, this is the list of device purchased offer data appended to the USSD query notification.
Note: The following body variables are set only if the notification is triggered by the USSD call back service.
body.Result UINT 32 The call initiation attempt result status:
  • 1 — New
  • 2 — In process
  • 3 — Success
  • 4 — Fail
  • 5 — Timed out
Note: For USSD query services, the body.Result variable is always set to 3.
body.ResultDetail UINT 32 The USSD call back call initiation result details:
  • 0 — In progress. The call initiation is in progress.
  • 1 — A-party answered.
  • 2 — A and B parties have answered and have been connected.
  • 3 — System failure.
  • 4 — Unexpected or bad network message.
  • 5 — TCAP message routing error.
  • 6 — Call attempt not allowed due to insufficient funds.
  • 7 — Unknown calling subscriber.
  • 8 — Not allowed, other.
  • 9 — Timed out
  • 10 — A-party did not answer.
  • 11 — A-party busy.
  • 12 — Route select failure calling A-party.
  • 13 — A-party hung up before the call was connected.
  • 14 — B-party did not answer.
  • 15 — B-party busy.
  • 16 – Route select failure calling B-party.
  • 17 — B-party hung up before the call was connected.
  • 18 — Invalid syntax.
  • 19 — Calling number not found.
  • 20 — B-party leg has been initiated.
body.AuthResult UINT 32 The result from Accounting:start for CCF initiated calls.
body.AuthResultDetail UINT 32 The result details from Accounting:start for CCF initiated calls.