Erlang Diameter Credit Control (DCCA) OTP Client
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dia
include
src
.gitignore
Emakefile
Makefile
Readme.md
rebar
rebar.cmd
rebar.config
rebar3

Readme.md

Erlang Diameter Credit Control Client

This repository contains an example OTP DCCA application client built in Erlang.

To build the modules and diameter dictionaries, use rebar:

./rebar get-deps compile

or

make all

To start the module use:

erl -pa deps/ebin ebin

application:start(diameter).
application:start(dccaclient).

Or use the provided Makefile:

make compile
make shell

on Windows, use make wshell.

Testing

To test the client, use the server module from dcca-server-OTP.

The accepted commands are:

Test DCCA with a simulated event

dccaclient:test().

Simulate with your own values

dccaclient:charge_event({gprs, {MSISDN, IMSI, ServiceId, RatingGroup, VolumeBytes, TimeToWait}}).

ex:
dccaclient:charge_event({gprs, {"5511985231234", "72412345678912", 1, 100, 1000000, 1}}).

Where:

Field Type Description
MSISDN String User MSISDN
IMSI String User IMSI
ServiceId Int Session ServiceId
RatingGroup Int Session RatingGroup
VolumeBytes Int Session volume in bytes to be consumed
TimeToWait Int Time wo wait between each intermediate request