Below are overviews of the Diameter example services and resource adaptor used to run them.

Extracting library jars to simulator classpath

Several jars are required to be extracted to run the simulators. Run these commands:

cd simulators/lib
unzip ../../lib/netty-library-*.du.jar netty-library.jar && unzip netty-library.jar "*.jar"
unzip ../../lib/guava-library-*.du.jar guava-library.jar && unzip guava-library.jar "*.jar"
unzip ../../du/jaxb-runtime-library-*du.jar jaxb-runtime-library.jar && unzip jaxb-runtime-library.jar "*.jar"

Example services

The Diameter example services all function similarly:

  • The initial event for the service is a MessageEvent from the example resource adaptor.

  • The service looks at the text in this event, determines the required behaviour, and executes the appropriate operation using the resource adaptor provider interface.

  • Subsequent events may use an attached activity from a previous operation.

  • A basic textual response displays to the user on the open TCP connection.

  • Detailed tracing describes the steps the service is taking.

Below are descriptions of the example services, with the simulators that they use.

Example service What it does Simulator Used

Diameter CCA

Sends Credit-Control-Request messages
and receives Credit-Control-Answer messages.

Online Charging System (OCS) Simulator

Diameter Ro

Sends Credit-Control-Request messages
and receives Credit-Control-Answer messages.

Online Charging System (OCS) Simulator

Diameter Rf

Sends Accounting-Request messages
and receives Accounting-Answer messages.

Charging Data Function (CDF) Simulator

Diameter Base (Accounting)

Sends Accounting-Request messages
and receives Accounting-Answer messages.

Charging Data Function (CDF) Simulator in Base Diameter mode [1]

Diameter Sh

Sends User-Data-Request and Profile-Update-Request messages
and receives User-Data-Answer and Profile-Update-Answer messages.+ Also supports Subscription-Notify-Request and Subscription-Notify-Answer,
and associated Push-Notification-Request and Push-Notification-Answer.

Diameter HSS Simulator

Diameter Base (Extension)

Creates a Diameter Sh message without using the Diameter Sh resource adaptor. It does this by defining a handful of Diameter Sh AVPs as extension AVPs (see Sh-AVP.xml and Diameter-Extensions.xml for the profile data), creating the User-Data-Request as an extension message and receiving the User-Data-Answer as an ExtensionAnswer event.

Diameter HSS Simulator

Note See the instructions for Running the Examples.

Example resource adaptor

The example resource adaptor provides an easy way to trigger the example services without requiring any other software (such as SIP phones or traffic generators). The example resource adaptor simply reads and writes to a TCP socket. The service can therefore be triggered by the telnet utility to send commands to the service, and results display on the same connection.

Warning The example resource adaptor is useful for simple tests and demonstrations, but it is not intended for production use; nor is it supported by Metaswitch for use outside the example services provided. It is Copyright © Metaswitch Networks Limited 2005-2020.

1. To start the CDF simulator in Base Diameter mode, execute the acct-simulator.sh script instead of the cdf-simulator.sh script.
Previous page Next page