Adding partial new documentation structure for tariff plans

This commit is contained in:
DanB
2013-08-22 20:45:24 +02:00
parent af64c50fe6
commit 609c821a50
6 changed files with 303 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
ApierV1.SetAccountActions
+++++++++++++++++++++++
+++++++++++++++++++++++++
Process dependencies and load a specific AccountActions profile from storDb into dataDb.

View File

@@ -0,0 +1,59 @@
DestinationRates.csv
++++++++++++++++++++
Bind destination group from Destinations.csv_ with rates defined in Rates.csv_ files.
CSV fields as tabular representation:
+--------------------+------------------+---------------------+
| Tag | DestinationsTag | RatesTag |
+====================+==================+=====================+
| DR_RETAIL_PEAK | GERMANY | LANDLINE_PEAK |
+--------------------+------------------+---------------------+
| DR_RETAIL_OFFPEAK | GERMANY | LANDLINE_OFFPEAK |
+--------------------+------------------+---------------------+
Index 0 - *Tag*
Free-text field used to reference the entry from other files.
Index 1 - *Years*
Years this timing is valid on.
Possibile values:
* Semicolon (;) separated list of years as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 2 - *Months*
Months this timing is valid on.
Possibile values:
* Semicolon (;) separated list of months as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 3 - *MonthDays*
Days of a month this timing is valid on.
Possibile values:
* Semicolon (;) separated list of month days as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 4 - *WeekDays*
Days of a week this timing is valid on. Week days represented as integers where 1=Monday and 7=Sunday
Possibile values:
* Semicolon (;) separated list of week days as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 5 - *Time*
The start time for this time period.
Possibile values:
* String representation of time (hh:mm:ss).
* "\*asap" metatag used to represent time converted at runtime.
.. _Destinations.csv: csv_tpdestinations
.. _Rates.csv: csv_tprates

View File

@@ -0,0 +1,21 @@
Destinations.csv
++++++++++++++++
Group together prefixes into destination groups identified by tag.
CSV fields example as tabular representation:
+------------+--------+
| Tag | Prefix |
+============+========+
| GERMANY | 49 |
+------------+--------+
| GERMANY_O2 | 49176 |
+------------+--------+
Index 0 - *Tag*
Free-text field used to reference the specific destination from other files.
Index 1 - *Prefix*
Destination prefix as group element

77
docs/csv_tprates.rst Normal file
View File

@@ -0,0 +1,77 @@
Rates.csv
+++++++++
Defines the rates on the system.
Each entry is a part of a rate group, each group having at least one entry. Group entries share *Tag*, *ConnectFee*, *Weight* parameters.
CSV fields example as tabular representation:
+---------------------+------------+------+----------+---------------+--------------------+----------------+------------------+---------+
| Tag | ConnectFee | Rate | RateUnit | RateIncrement | GroupIntervalStart | RoundingMethod | RoundingDecimals | Weight |
+=====================+============+======+==========+===============+====================+================+==================+=========+
| LANDLINE_PEAK | 0.02 | 0.02 | 60s | 60s | 0s | \*up | 4 | 10 |
+---------------------+------------+------+----------+---------------+--------------------+----------------+------------------+---------+
| MOBILE_PEAK | 1 | 2 | 60s | 10s | 0s | \*middle | 4 | 10 |
+---------------------+------------+------+----------+---------------+--------------------+----------------+------------------+---------+
| MOBILE_PEAK | 1 | 1 | 60s | 20s | 40s | \*middle | 4 | 10 |
+---------------------+------------+------+----------+---------------+--------------------+----------------+------------------+---------+
| MOBILE_PEAK | 1 | 0 | 60s | 10s | 60s | \*middle | 4 | 10 |
+---------------------+------------+------+----------+---------------+--------------------+----------------+------------------+---------+
Index 0 - *Tag*
Free-text field used to reference the entry from other files.
Index 1 - *ConnectFee*
Connect fee charged at start of each call. Should be the same for all members of a group interval.
Possible values:
* Float or integer value, granularity given by rates administrator and not predefined (eg: cent vs euro).
Index 2 - *Rate*
The rate which will be charged.
Possible values:
* Float or integer value, granularity given by rates administrator and not predefined (eg: cent vs euro).
Index 3 - *RateUnit*
The duration unit which is rated by *Rate* field.
Possible values:
* Duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
Index 4 - *RateIncrement*
The total duration will be split and rounded into smaller intervals based on this (eg: for *RateIncrement* of 60s, total duration of 1m2s will be charged as 2 minutes).
Possible values:
* Duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
Index 5 - *GroupIntervalStart*
The position in the rate group.
Possible values:
* Duration string. A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as "300ms", "1.5h" or "2h45m". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
Index 6 - *RoundingMethod*
The routine which will round the cost on each timespan.
Possible values:
* A *MetaTag* referring the internal routine doing the rounding (eg: \*up, \*down, \*middle)
Index 7 - *RoundingDecimals*
Round the number of decimals of each timespan based on this setting.
Possible values:
* An integer value.
Index 8 - *Weight*
Solve possible conflicts between different rates matching same interval based on this parameter.
Higher *Weight* has bigger priority.
Should be the same for all members of a group interval.
Possible values:
* Float/Integer representing the rate weight on collisions.

60
docs/csv_tptimings.rst Normal file
View File

@@ -0,0 +1,60 @@
mings.csv
+++++++++++
Holds time related definitions.
CSV fields examples as tabular representations:
+-----------------+--------+--------+-----------+-----------+----------+
| Tag | Years | Months | MonthDays | WeekDays | Time |
+=================+========+========+===========+===========+==========+
| WORKDAYS | \*any | \*any | \*any | 1;2;3;4;5 | 00:00:00 |
+-----------------+--------+--------+-----------+-----------+----------+
| WEEKENDS | \*any | \*any | \*any | 6;7 | 00:00:00 |
+-----------------+--------+--------+-----------+-----------+----------+
| ALWAYS | \*any | \*any | \*any | \*any | 00:00:00 |
+-----------------+--------+--------+-----------+-----------+----------+
| ASAP | \*any | \*all | \*all | \*all | \*asap |
+-----------------+--------+--------+-----------+-----------+----------+
**Fields**
Index 0 - *Tag*
Free-text field used to reference the entry from other files.
Index 1 - *Years*
Years this timing is valid on.
Possibile values:
* Semicolon (;) separated list of years as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 2 - *Months*
Months this timing is valid on.
Possibile values:
* Semicolon (;) separated list of months as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 3 - *MonthDays*
Days of a month this timing is valid on.
Possibile values:
* Semicolon (;) separated list of month days as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 4 - *WeekDays*
Days of a week this timing is valid on. Week days represented as integers where 1=Monday and 7=Sunday
Possibile values:
* Semicolon (;) separated list of week days as descriptive filter.
* "\*any" metatag used as match-any filter.
Index 4 - *Time*
The start time for this time period.
Possible values:
* String representation of time (hh:mm:ss).
* "\*asap" metatag used to represent time converted at runtime.

85
docs/tariffplans.rst Normal file
View File

@@ -0,0 +1,85 @@
TariffPlans
===========
Major concept within CGRateS architecture, implement mechanisms to load rating as well as account data into CGRateS.
Currently TariffPlans can be loaded using 2 different approaches:
Direct load out of TP-CSV files
-------------------------------
This represents the fastest and easiest way to manage small set of TP definitions. It has the advantage of being simple to define and load but on the other hand as soon as the data set grows it becomes relatively hard to be maintaned.
Due to complex data definition we have split information necessary on each load process in more .csv files, identified by names close to their utility.
Each individual CSV file can have any number of rows starting with comment character (#) which will be ignored on processing.
Depending on CGRateS subsystem, following files are required:
RatingProfiles
~~~~~~~~~~~~~~
.. toctree::
:maxdepth: 2
csv_tptimings
.. toctree::
:maxdepth: 2
csv_tpdestinations
.. toctree::
:maxdepth: 2
csv_tprates
.. toctree::
:maxdepth: 2
csv_tpdestinationrates
.. toctree::
:maxdepth: 2
csv_tpdestratetimings
.. toctree::
:maxdepth: 2
csv_tpratingprofiles
Accounts
~~~~~~~~
.. toctree::
:maxdepth: 2
csv_tptimings
.. toctree::
:maxdepth: 2
csv_tpdestinations
.. toctree::
:maxdepth: 2
csv_tpactions
.. toctree::
:maxdepth: 2
csv_tpactiontimings
.. toctree::
:maxdepth: 2
csv_tpactiontriggers
.. toctree::
:maxdepth: 2
csv_tpaccountactions