I have cgrates configured as follows:
::::::::::::::
AccountActions.csv
::::::::::::::
Tenant,Account,Direction,ActionTimingsTag,ActionTriggersTag
cgrates.org,1001,_out,AT_FS10,STANDARD_TRIGGERS
cgrates.org,1002,_out,AT_FS10,STANDARD_TRIGGERS
cgrates.org,1003,_out,AT_FS10,STANDARD_TRIGGERS
cgrates.org,1004,_out,AT_FS10,STANDARD_TRIGGERS
cgrates.org,1005,*out,AT_FS10,STANDARD_TRIGGERS
::::::::::::::
Actions.csv
::::::::::::::
ActionsTag,Action,BalanceType,Direction,Units,ExpirationDate,DestinationTag,RateType,RateValue,MinutesWeight,Weight
TOPUP_10,_topup_reset,_monetary,_out,10,_unlimited,*any,,,,10
::::::::::::::
ActionTimings.csv
::::::::::::::
Tag,ActionsTag,TimingTag,Weight
AT_FS10,TOPUP_10,ASAP,10
::::::::::::::
ActionTriggers.csv
::::::::::::::
Tag,BalanceTag,Direction,ThresholdType,ThresholdValue,DestinationTag,ActionsTag,Weight
STANDARD_TRIGGERS,_monetary,_out,_min_balance,2,,LOG_BALANCE,10
STANDARD_TRIGGERS,_monetary,_out,_max_balance,20,,LOG_BALANCE,10
STANDARD_TRIGGERS,_monetary,_out,_max_counter,15,FS_USERS,LOG_BALANCE,10
::::::::::::::
DestinationRates.csv
::::::::::::::
DR,PSTN_70,GBP_70
DR,PSTN_71,GBP_71
DR,PSTN_72,GBP_72
::::::::::::::
DestinationRateTimings.csv
::::::::::::::
DRT,DR,ALWAYS,10
::::::::::::::
Destinations.csv
::::::::::::::
PSTN_70,70
PSTN_71,71
PSTN_72,72
::::::::::::::
Rates.csv
::::::::::::::
GBP_70,0.000000,2.22222,1s,1s,0s,_up,4,20
GBP_71,0.000000,5.55555,1s,1s,0s,_up,4,20
GBP_72,0.000000,7.77777,1s,1s,0s,_up,4,20
::::::::::::::
RatingProfiles.csv
::::::::::::::
Tenant,TOR,Direction,Subject,ActivationTime,DestinationRateTimingTag,RatesFallbackSubject
cgrates.org,call,_out,_any,2012-01-01T00:00:00Z,DRT,
::::::::::::::
Timings.csv
::::::::::::::
Tag,Years,Months,MonthDays,WeekDays,Time
ALWAYS,_any,_any,_any,_any,00:00:00
ASAP,_any,_any,_any,_any,*asap
I have a python script that makes a call of the following form:
cd = {"Direction":"*out", "TOR":"call", "Tenant": "cgrates.org", "Subject": "1001", "Destination": "7054567", "TimeStart": "2013-08-07T17:30:00Z", "TimeEnd": "2013-08-07T17:31:00Z"}
result = ""
result = rpc.call("Responder.GetCost", cd)
print(result)
The output I get is:
{u'Direction': u'*out', u'TOR': u'call', u'Destination': u'70', u'Account': u'', u'ConnectFee': 0, u'Cost': 466.6662, u'Timespans': [{u'MinuteInfo': None, u'Interval': {u'RoundingDecimals': 0, u'Weight': 10, u'MonthDays': [], u'Months': [], u'WeekDays': [], u'Years': [], u'ConnectFee': 0, u'RoundingMethod': u'', u'StartTime': u'00:00:00', u'Prices': [{u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 2.2222200000000001}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 5.5555500000000002}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 7.7777700000000003}], u'EndTime': u''}, u'CallDuration': 0, u'TimeEnd': u'2013-08-07T17:31:00Z', u'TimeStart': u'2013-08-07T17:30:00Z', u'Cost': 466.6662, u'ActivationPeriod': {u'Intervals': [{u'RoundingDecimals': 0, u'Weight': 10, u'MonthDays': [], u'Months': [], u'WeekDays': [], u'Years': [], u'ConnectFee': 0, u'RoundingMethod': u'', u'StartTime': u'00:00:00', u'Prices': [{u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 2.2222200000000001}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 5.5555500000000002}, {u'RateIncrement': 1000000000, u'GroupIntervalStart': 0, u'RateUnit': 1000000000, u'Value': 7.7777700000000003}], u'EndTime': u''}], u'ActivationTime': u'2012-01-01T00:00:00Z'}}], u'Tenant': u'cgrates.org', u'Subject': u'1001'}
I am confused as to why it identifies the destination as 70, then applies the amount that is applicable to a destination of 72. I also don't understand why it responds with pricing for all 3 destinations.
If I change the destination to something that matches 71 or 72 I get exactly the same response other than the matched destination changes.
Am I doing something wrong here?
Thanks
Paul
Crocodile RCS