diff --git a/.gitignore b/.gitignore index 791ac5886..5b935a833 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ a.out *.a *.6 *.pyc +*~ .settings *project *workspace diff --git a/README.md b/README.md index 5e08f2000..bb140c64d 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # Rating system designed to be used in VoIP Carriers World # ## Features ## -+ Fast RatingEngine, holds all rating information into memory -+ Unlimited spanned timebased rating: considers both ActiveFrom/RateStartsAt -+ Unlimited rate profiles chanining for fallback -+ Rating Fields: ConnectFee, RateIn, RateOut ++ Rates for prepaid and for postpaid ++ The budget expressed in money and/or minutes (seconds) + High accuracy rating: configurable to miliseconds -+ Flexible rates storage - plugin based rates loading ++ Handles volume dicount ++ Received calls bonus ++ Fully/Easy configurable ++ Very fast (5000+ req/sec) ++ Good documentation ++ Paid support + +## Documentation ## +http://readthedocs.org/docs/cgrates/ \ No newline at end of file diff --git a/docs/apicalls.rst b/docs/apicalls.rst new file mode 100644 index 000000000..440277998 --- /dev/null +++ b/docs/apicalls.rst @@ -0,0 +1,60 @@ +Api Calls +========= + +JSON RPC +-------- +GetCost + Creates a CallCost structure with the cost nformation calculated for the received CallDescriptor. + +DebitBalance + Interface method used to add/substract an amount of cents from user's money budget. + The amount filed has to be filled in call descriptor. + +DebitSMS + Interface method used to add/substract an amount of units from user's sms budget. + The amount filed has to be filled in call descriptor. + +DebitSeconds + Interface method used to add/substract an amount of seconds from user's minutes budget. + The amount filed has to be filled in call descriptor. + +GetMaxSessionTime + Returns the aproximate max allowed session for user budget. It will try the max amount received in the call descriptor + and will decrease it by 10% for nine times. So if the user has little credit it will still allow 10% of the initial amount. + If the user has no credit then it will return 0. + +AddVolumeDiscountSeconds + Interface method used to add an amount to the accumulated placed call seconds to be used for volume discount. + The amount filed has to be filled in call descriptor. + +ResetVolumeDiscountSeconds + Resets the accumulated volume discount seconds (to zero). + +AddRecievedCallSeconds + Adds the specified amount of seconds to the recived call seconds. When the threshold specified in the user's tariff plan is reached then the recived call budget is reseted and the bonus specified in the tariff plan is applyed. + The amount filed has to be filled in call descriptor. + +ResetUserBudget + Resets user budgets value to the amounts specified in the tariff plan. + +Http +---- + +getcost + :Example: curl "http://127.0.0.1:8000/getcost?cstmid=vdf&subj=rif&dest=0257" +debitbalance + :Example: curl "http://127.0.0.1:8000/debitbalance?cstmid=vdf&subj=rif&dest=0257@amount=100" +debitsms + :Example: curl "http://127.0.0.1:8000/debitsms?cstmid=vdf&subj=rif&dest=0257@amount=100" +debitseconds + :Example: curl "http://127.0.0.1:8000/debitseconds?cstmid=vdf&subj=rif&dest=0257@amount=100" +getmaxsessiontime + :Example: curl "http://127.0.0.1:8000/getmaxsessiontime?cstmid=vdf&subj=rif&dest=0257@amount=100" +addvolumediscountseconds + :Example: curl "http://127.0.0.1:8000/addvolumediscountseconds?cstmid=vdf&subj=rif&dest=0257@amount=100" +resetvolumediscountseconds + :Example: curl "http://127.0.0.1:8000/resetvolumediscountseconds?cstmid=vdf&subj=rif&dest=0257" +addrecievedcallseconds + :Example: curl "http://127.0.0.1:8000/addrecievedcallseconds?cstmid=vdf&subj=rif&dest=0257@amount=100" +resetuserbudget + :Example: curl "http://127.0.0.1:8000/resetuserbudget?cstmid=vdf&subj=rif&dest=0257" \ No newline at end of file diff --git a/docs/arhitecture.rst b/docs/arhitecture.rst new file mode 100644 index 000000000..e69de29bb diff --git a/docs/images/general.dia b/docs/images/general.dia new file mode 100644 index 000000000..1b407c1db Binary files /dev/null and b/docs/images/general.dia differ diff --git a/docs/images/general.png b/docs/images/general.png new file mode 100644 index 000000000..6c4a99955 Binary files /dev/null and b/docs/images/general.png differ diff --git a/docs/index.rst b/docs/index.rst index 2631f8e69..6c2ef81c1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,6 +13,7 @@ Contents: intro tutorial + apicalls arhitecture Indices and tables diff --git a/docs/intro.rst b/docs/intro.rst index 45a61334d..0d5b39ba6 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -1,11 +1,18 @@ Introduction ============ +CGRates is a very fast and easy scalable rating enginge targeted especialli for telecom providers. + +It is written in go (http://golang.net) and accesible from any language via JSON RPC. + Features -------- -+ Fast RatingEngine, holds all rating information into memory -+ Unlimited spanned timebased rating: considers both ActiveFrom/RateStartsAt -+ Unlimited rate profiles chanining for fallback -+ Rating Fields: ConnectFee, RateIn, RateOut ++ Rates for prepaid and for postpaid ++ The budget expressed in money and/or minutes (seconds) + High accuracy rating: configurable to miliseconds -+ Flexible rates storage - plugin based rates loading \ No newline at end of file ++ Handles volume dicount ++ Received calls bonus ++ Fully/Easy configurable ++ Very fast (5000+ req/sec) ++ Good documentation ++ Paid support \ No newline at end of file diff --git a/docs/tutorial.rst b/docs/tutorial.rst new file mode 100644 index 000000000..338f57266 --- /dev/null +++ b/docs/tutorial.rst @@ -0,0 +1,13 @@ +Tutorial +======== + +.. image:: ` images/general.png + +Instalation +----------- + +Running +------- + +Data importing +--------------