Change ReqType to use META(*) as prefix in front of the type for consistency with the rest of the system (eg: prepaid -> *prepaid

This commit is contained in:
DanB
2015-03-15 19:16:50 +01:00
parent 77d9d2ec30
commit dd6977e43d
42 changed files with 160 additions and 156 deletions

View File

@@ -12,7 +12,7 @@
// "rounding_decimals": 10, // system level precision for floats
// "dbdata_encoding": "msgpack", // encoding used to store object data in strings: <msgpack|json>
// "tpexport_dir": "/var/log/cgrates/tpe", // path towards export folder for offline Tariff Plans
// "default_reqtype": "rated", // default request type to consider when missing from requests: <""|prepaid|postpaid|pseudoprepaid|rated>
// "default_reqtype": "*rated", // default request type to consider when missing from requests: <""|*prepaid|*postpaid|*pseudoprepaid|*rated>
// "default_category": "call", // default Type of Record to consider when missing from requests
// "default_tenant": "cgrates.org", // default Tenant to consider when missing from requests
// "default_subject": "cgrates", // default rating Subject to consider when missing from requests

View File

@@ -271,21 +271,21 @@ route[relay] {
route[CGR_HANDLER] {
# These variables should be populated by script admin on need
$avp(cgr_reqtype)="rated";
$avp(cgr_reqtype)="*rated";
$avp(cgr_account)=$fU;
$avp(cgr_subject)=$fU;
$avp(cgr_destination)=$rU;
switch ($avp(cgr_account)) {
case "1002":
$avp(cgr_reqtype)="postpaid";
$avp(cgr_reqtype)="*postpaid";
break;
case "1003":
$avp(cgr_reqtype)="pseudoprepaid";
$avp(cgr_reqtype)="*pseudoprepaid";
break;
}
# End of variables population
if $avp(cgr_reqtype)=="pseudoprepaid" || $avp(cgr_reqtype)=="prepaid" { #Make sure we got enough balance for the call
if $avp(cgr_reqtype)=="*pseudoprepaid" || $avp(cgr_reqtype)=="*prepaid" { #Make sure we got enough balance for the call
$avp(auth_keys) = "cgr_reqtype";
$avp(auth_vals) = $avp(cgr_reqtype);