mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Updating tutorial2 sample .csvs and few of the docs for installing with OpenSIPS
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
#ID[0],UniqueID[1],ThresholdType[2],ThresholdValue[3],Recurrent[4],MinSleep[5],ExpiryTime[6],ActivationTime[7],BalanceTag[8],BalanceType[9],BalanceCategories[10],BalanceDestinationIDs[11],BalanceRatingSubject[12],BalanceSharedGroup[13],BalanceExpiryTime[14],BalanceTimingIDs[15],BalanceWeight[16],BalanceBlocker[17],BalanceDisabled[18],ActionsID[19],Weight[20]
|
||||
|
||||
# STANDARD_TRIGGERS *min_balance will call the action <TOPUP_BONUS_10SMS> when the monetary balance will go bellow 2 units
|
||||
STANDARD_TRIGGERS,,*min_balance,2,,,,,,*monetary,,,,,,,,,,TOPUP_BONUS_10SMS,10
|
||||
|
||||
# STANDARD_TRIGGERS *max_balance will call <DISABLE_ACCOUNT> action when the monetary balance will go above 100 units
|
||||
STANDARD_TRIGGERS,,*max_balance,100,,,,,,*monetary,,,,,,,,,,DISABLE_ACCOUNT,10
|
||||
|
@@ -1,11 +1,12 @@
|
||||
# Tenant,ID,Contexts,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight
|
||||
|
||||
# CRG_RESELLER1 replaces Category->reseller1 and RequestType->*rated for *sessions and *cdrs events
|
||||
cgrates.org,ATTR_CRG_SUPPLIER1,*sessions;*cdrs,,,,*req.Category,*constant,reseller1,false,0
|
||||
cgrates.org,ATTR_CRG_SUPPLIER1,,,,,*req.RequestType,*constant,*rated,,
|
||||
|
||||
# ATTR_1001_AUTH returns the Password value for the account 1001 in context <auth>
|
||||
cgrates.org,ATTR_1001_AUTH,auth,*string:~*req.Account:1001,,,*req.Password,*constant,CGRateS.org,false,20
|
||||
|
||||
cgrates.org,ATTR_1002_AUTH,auth,*string:~*req.Account:1002,,,*req.Password,*constant,CGRateS.org,false,20
|
||||
cgrates.org,ATTR_1003_AUTH,auth,*string:~*req.Account:1003,,,*req.Password,*constant,CGRateS.org,false,20
|
||||
#Tenant,ID,Contexts,FilterIDs,ActivationInterval,AttributeFilterIDs,Path,Type,Value,Blocker,Weight
|
||||
cgrates.org,ATTR_1001,*any,*string:~*req.Account:1001,,,,,,false,10
|
||||
cgrates.org,ATTR_1001,,,,,*req.Password,*constant,CGRateS.org,,
|
||||
cgrates.org,ATTR_1001,,,,,*req.RequestType,*constant,*prepaid,,
|
||||
cgrates.org,ATTR_1001,,,,,*req.PaypalAccount,*constant,cgrates@paypal.com,,
|
||||
cgrates.org,ATTR_1001,,,,,*req.LCRProfile,*constant,premium_cli,,
|
||||
cgrates.org,ATTR_1002,*any,*string:~*req.Account:1002,,,,,,false,10
|
||||
cgrates.org,ATTR_1002,,,,,*req.Password,*constant,CGRateS.org,,
|
||||
cgrates.org,ATTR_1002,,,,,*req.RequestType,*constant,*postpaid,,
|
||||
cgrates.org,ATTR_1003,*any,*string:~*req.Account:1003,,,,,CGRateS.org,false,10
|
||||
cgrates.org,ATTR_1003,,,,,*req.Password,*constant,CGRateS.org,false,10
|
||||
cgrates.org,ATTR_1003,,,,,*req.RequestType,*constant,*pseudoprepaid,,
|
||||
|
@@ -1,8 +1,3 @@
|
||||
# Tenant,ID,FilterIDs,ActivationInterval,RunID,AttributeIDs,Weight
|
||||
|
||||
# CGR_DEFAULT is the default charger for events
|
||||
cgrates.org,CGR_DEFAULT,,,*default,*none,0
|
||||
|
||||
# CGR_RESELLER1 creates an additional CDR for calculating reseller costs
|
||||
# uses ATTR_CRG_RESELLER1 to replace Category and RequestType in events
|
||||
cgrates.org,CRG_RESELLER1,,,reseller1,ATTR_CRG_RESELLER1,1
|
||||
#Tenant,ID,FilterIDs,ActivationInterval,RunID,AttributeIDs,Weight
|
||||
cgrates.org,CHRG_DEFAULT,,,*default,*none,0
|
||||
cgrates.org,CHRG_SUPPLIER,*exists:~*req.Supplier:,,supplier,*constant:*req.RequestType:*rated;*constant:*req.Category:~*req.Supplier,0
|
||||
|
@@ -1,13 +1,19 @@
|
||||
#ID,DestinationsID,RatesID,RoundingMethod,RoundingDecimals,MaxCost,MaxCostStrategy
|
||||
DR_10_120C,DST_10,RT_120C,*up,4,,
|
||||
DR_10_60C,DST_10,RT_60C,*up,4,,
|
||||
DR_2030_120C,DST_2030,RT_120C,*up,4,,
|
||||
DR_20_60C,DST_20,RT_60C,*up,4,,
|
||||
DR_VOICEMAIL_FREE,DST_VOICEMAIL,RT_0,*up,4,,
|
||||
DR_1002_60C,DST_1002,RT_60C,*up,4,,
|
||||
DR_ANY_10C_CN,*any,RT_10C_CN,*up,4,,
|
||||
DR_ANY_1024_1,*any,RT_1024_1,*up,4,,
|
||||
DR_1002_10C1,DST_1002,RT_10C1,*up,4,,
|
||||
DR_10_20C1,DST_10,RT_20C1,*up,4,,
|
||||
DR_1CNT,*any,RT_1CNT,*up,4,,
|
||||
DR_10CNT,*any,RT_10CNT,*up,4,,
|
||||
|
||||
DR_DEFAULT,DST_10,RT_120_20_60,*up,5,,
|
||||
DR_DEFAULT,DST_20,RT_180_10_60,*up,5,,
|
||||
DR_DEFAULT,*any,RT_240_30_60,*up,5,,
|
||||
|
||||
DR_1001,DST_20,RT_120_10_60,*up,5,,
|
||||
|
||||
DR_SMS,DST_10,RT_5_1,*up,5,,
|
||||
DR_SMS,*any,RT_10_1,*up,5,,
|
||||
|
||||
DR_DATA,*any,RT_10_1024,*up,5,,
|
||||
|
||||
DR_SPL1,DST_10,RT_60_60,*up,5,,
|
||||
DR_SPL1,DST_20,RT_120_60,*up,5,,
|
||||
|
||||
DR_SPL2,DST_10,RT_30_60,*up,5,,
|
||||
|
||||
DR_SPECIAL_BLC,*any,RT_15_0_1,*up,5,,
|
||||
|
@@ -1,8 +1,3 @@
|
||||
#ID,Prefix
|
||||
DST_10,10
|
||||
DST_20,20
|
||||
DST_2030,20
|
||||
DST_2030,30
|
||||
DST_VOICEMAIL,voicemail
|
||||
DST_1002,1002
|
||||
DST_50,50
|
||||
|
||||
|
2
data/tariffplans/tutorial2/Filters.csv
Normal file
2
data/tariffplans/tutorial2/Filters.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
#Tenant[0],ID[1],Type[2],Element[3],Values[4],ActivationInterval[5]
|
||||
cgrates.org,FLTR_ACNT_1001_1002,*string,~*req.Account,1001;1002,2014-07-29T15:00:00Z
|
||||
|
@@ -1,29 +1,37 @@
|
||||
#ID,ConnectFee,Rate,RateUnit,RateIncrement,GroupIntervalStart
|
||||
|
||||
# RT_120C charges 0.20 units as connect fee and 1.2 in 1 minute increment in the first minute and second increments after that
|
||||
RT_120C,0.2,1.2,1m,1m,0
|
||||
RT_120C,,1.2,1m,1s,1m
|
||||
# RT_120_20_60 charges 0.20 units as connect fee and 1.2 in 1 minute increment in the first minute and second increments after that ,,,,,
|
||||
RT_120_20_60,0.2,1.2,1m,1m,0
|
||||
RT_120_20_60,,1.2,1m,1s,1m
|
||||
|
||||
# RT_60C charges 0.1 connect fee and 0.01 units each second
|
||||
RT_60C,0.1,0.01,1s,1s,0
|
||||
# RT_180_10_60 charges 0.10 units as connect fee and 1.8 in 1 minute increment in the first minute and second increments after that ,,,,,
|
||||
RT_180_10_60,0.1,1.8,1m,1m,0
|
||||
RT_180_10_60,,1.8,1m,1s,1m
|
||||
|
||||
# RT_0 charges 0 units rounding each call per minute
|
||||
RT_0,0,0,1m,1m,0
|
||||
# RT_240_30_60 charges 0.3 units as connect fee and 2.4 in 1 minute increment in the first minute and second increments after that ,,,,,
|
||||
RT_240_30_60,0.3,2.4,1m,1m,0
|
||||
RT_240_30_60,,2.4,1m,1s,1m
|
||||
|
||||
# RT_10C_CN charges 0.1 units as connect/call fee
|
||||
RT_10C_CN,0.1,0,0,1s,0
|
||||
# RT_120_10_60 charges 0.1 units as connect fee and 1.2 in 1 minute increment ,,,,,
|
||||
RT_120_10_60,0.1,1.2,1m,1m,0
|
||||
|
||||
# RT_1024_1 will be used to charge 1 unit per every 1024 of usage in increments of 1024
|
||||
RT_1024_1,0,1,1024,1024,0
|
||||
# RT_5_1 charges 0.05 units per 1 unit of usage (SMS) ,,,,,
|
||||
RT_5_1,,0.05,1,1,0
|
||||
|
||||
# RT_10C1 charges 0.1 units of cost every 1 unit of usage
|
||||
RT_10C1,0,0.1,1,1,0
|
||||
# RT_10_1 charges 0.1 units per 1 unit of usage (SMS) ,,,,,
|
||||
RT_10_1,,0.1,1,1,0
|
||||
|
||||
# RT_20C1 charges 0.2 units of cost every 1 unit of usage
|
||||
RT_20C1,0,0.2,1,1,0
|
||||
# RT_10_1024 charges 0.1 units per 1024 units of usage in increments of 1024 units(DATA) ,,,,,
|
||||
RT_10_1024,,0.1,1024,1024,0
|
||||
|
||||
# RT_1CNT charges 0.01 units of cost for each 1s of usage
|
||||
RT_1CNT,0,0.01,1s,1s,0
|
||||
# RT_60_60 charges 0.6 per minute in second increments ,,,,,
|
||||
RT_60_60,,0.6,1m,1s,0
|
||||
|
||||
# RT_10CNT charges 0.1 units of cost for each call connected
|
||||
RT_10CNT,0.1,0,1s,1s,0
|
||||
# RT_120_60 charges 1.2 per minute in second increments ,,,,,
|
||||
RT_120_60,,1.2,1m,1s,0
|
||||
|
||||
# RT_30_60 charges 0.3 per minute in second increments ,,,,,
|
||||
RT_30_60,,0.3,1m,1s,0
|
||||
|
||||
# RT_15_0_1 charges 0.15 per call ,,,,,
|
||||
RT_15_0_1,0.15,,1s,1s,0
|
||||
|
||||
|
@@ -1,15 +1,22 @@
|
||||
#ID,DestinationRatesID,TimingID,Weight
|
||||
RP_STANDARD,DR_10_120C,PEAK,10
|
||||
RP_STANDARD,DR_10_60C,OFFPEAK_MORNING,10
|
||||
RP_STANDARD,DR_10_60C,OFFPEAK_EVENING,10
|
||||
RP_STANDARD,DR_10_60C,OFFPEAK_WEEKEND,10
|
||||
RP_STANDARD,DR_2030_120C,*any,10
|
||||
RP_STANDARD,DR_20_60C,NEW_YEAR,20
|
||||
RP_STANDARD,DR_VOICEMAIL_FREE,*any,10
|
||||
RP_1001,DR_1002_60C,*any,10
|
||||
RP_SPECIAL_BLC,DR_ANY_10C_CN,*any,10
|
||||
RP_DATA,DR_ANY_1024_1,*any,10
|
||||
RP_SMS,DR_1002_10C1,*any,10
|
||||
RP_SMS,DR_10_20C1,*any,10
|
||||
RP_1CNT,DR_1CNT,*any,0
|
||||
RP_10CNT,DR_10CNT,*any,0
|
||||
#Id,DestinationRatesId,TimingTag,Weight
|
||||
|
||||
# RP_DEFAULT definition ,,,
|
||||
RP_DEFAULT,DR_DEFAULT,*any,0
|
||||
|
||||
# RP_1001 definition ,,,
|
||||
RP_1001,DR_1001,*any,0
|
||||
|
||||
# RP_SMS definition ,,,
|
||||
RP_SMS,DR_SMS,*any,0
|
||||
|
||||
# RP_DATA definition ,,,
|
||||
RP_DATA,DR_DATA,*any,0
|
||||
|
||||
# RP_SPL1 definition ,,,
|
||||
RP_SPL1,DR_SPL1,*any,0
|
||||
|
||||
# RP_SPL2 definition ,,,
|
||||
RP_SPL2,DR_SPL2,*any,0
|
||||
|
||||
# RP_SPECIAL_BLC definition ,,,
|
||||
RP_SPECIAL_BLC,DR_SPECIAL_BLC,*any,0
|
||||
|
||||
|
@@ -1,9 +1,21 @@
|
||||
#Tenant,Category,Subject,ActivationTime,RatingPlanID,FallbackSubject
|
||||
cgrates.org,call,*any,2019-03-01T00:00:00Z,RP_STANDARD,
|
||||
cgrates.org,call,1001,2019-03-01T00:00:00Z,RP_1001,*any
|
||||
cgrates.org,call,RPF_SPECIAL_BLC,2019-03-01T00:00:00Z,RP_SPECIAL_BLC,
|
||||
cgrates.org,data,*any,2019-03-01T00:00:00Z,RP_DATA,
|
||||
cgrates.org,sms,*any,2019-03-01T00:00:00Z,RP_SMS,
|
||||
#Tenant,Category,Subject,ActivationTime,RatingPlanId,RatesFallbackSubject
|
||||
|
||||
# Standard rates for calls,,,,,
|
||||
cgrates.org,call,*any,2014-01-14T00:00:00Z,RP_DEFAULT,
|
||||
|
||||
# Custom rates for Subject 1001,,,,,
|
||||
cgrates.org,call,1001,2014-01-14T00:00:00Z,RP_1001,*any
|
||||
|
||||
# Default rates for data and SMS,,,,,
|
||||
cgrates.org,data,*any,2014-01-14T00:00:00Z,RP_DATA,
|
||||
cgrates.org,sms,*any,2014-01-14T00:00:00Z,RP_SMS,
|
||||
|
||||
# Supplier rates selected via CHRG_SUPPLIER or Suppliers.csv,,,,,
|
||||
cgrates.org,supplier1,*any,2014-01-14T00:00:00Z,RP_SPL1,
|
||||
cgrates.org,supplier2,*any,2014-01-14T00:00:00Z,RP_SPL2,
|
||||
|
||||
# Special rating subject for balances paying per call,,,,,
|
||||
cgrates.org,call,RPF_SPECIAL_BLC,2014-01-14T00:00:00Z,RP_SPECIAL_BLC,
|
||||
|
||||
|
||||
|
||||
# reseller1 will pay 0.1 per call, independent of duration
|
||||
cgrates.org,reseller1,*any,2019-03-01T00:00:00Z,RP_10CNT,
|
||||
|
||||
|
2
data/tariffplans/tutorial2/Resources.csv
Normal file
2
data/tariffplans/tutorial2/Resources.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],ActivationInterval[3],TTL[4],Limit[5],AllocationMessage[6],Blocker[7],Stored[8],Weight[9],ThresholdIDs[10]
|
||||
cgrates.org,ResGroup1,*prefix:~*req.Account:100,2014-07-29T15:00:00Z,-1,7,,,true,,*none
|
||||
|
4
data/tariffplans/tutorial2/Stats.csv
Normal file
4
data/tariffplans/tutorial2/Stats.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],ActivationInterval[3],QueueLength[4],TTL[5],MinItems[6],Metrics[7],MetricFilterIDs[8],Stored[9],Blocker[10],Weight[11],ThresholdIDs[12]
|
||||
cgrates.org,STATS_1,FLTR_ACNT_1001_1002,2014-07-29T15:00:00Z,100,-1,,,,,true,,*none
|
||||
cgrates.org,STATS_1,,,,,,*tcc;*asr,,,,,
|
||||
cgrates.org,STATS_1,,,,,,*sum:~*req.Usage,,,,,
|
||||
|
8
data/tariffplans/tutorial2/Suppliers.csv
Normal file
8
data/tariffplans/tutorial2/Suppliers.csv
Normal file
@@ -0,0 +1,8 @@
|
||||
#Tenant,ID,FilterIDs,ActivationInterval,Sorting,SortingParamameters,SupplierID,SupplierFilterIDs,SupplierAccountIDs,SupplierRatingPlanIDs,SupplierResourceIDs,SupplierStatIDs,SupplierWeight,SupplierBlocker,SupplierParameters,Weight
|
||||
cgrates.org,SPL_ACNT_1001,*string:~*req.Account:1001,2017-11-27T00:00:00Z,*weight,,,,,,,,,,,10
|
||||
cgrates.org,SPL_ACNT_1001,,,,,supplier1,,,,,,10,,,
|
||||
cgrates.org,SPL_ACNT_1001,,,,,supplier2,,,,,,20,,,
|
||||
cgrates.org,SPL_ACNT_1002,*string:~*req.Account:1002,2017-11-27T00:00:00Z,*lc,,,,,,,,,,,10
|
||||
cgrates.org,SPL_ACNT_1002,,,,,supplier1,,,RP_SPL1,,,,,,
|
||||
cgrates.org,SPL_ACNT_1002,,,,,supplier2,,,RP_SPL2,,,,,,
|
||||
|
||||
|
2
data/tariffplans/tutorial2/Thresholds.csv
Normal file
2
data/tariffplans/tutorial2/Thresholds.csv
Normal file
@@ -0,0 +1,2 @@
|
||||
#Tenant[0],Id[1],FilterIDs[2],ActivationInterval[3],MaxHits[4],MinHits[5],MinSleep[6],Blocker[7],Weight[8],ActionIDs[9],Async[10]
|
||||
cgrates.org,THD_ACNT_1001,*string:~*req.Account:1001;*gte:~*req.Usage:2m,2014-07-29T15:00:00Z,1,1,1s,false,10,ACT_LOG_WARNING,true
|
||||
|
Reference in New Issue
Block a user