mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Mark Event fields as mandatory to be processed by attributes
This commit is contained in:
committed by
Dan Christian Bogos
parent
bd9e262d76
commit
2329f99855
@@ -139,7 +139,7 @@ func (alS *AttributeService) processEvent(ev *utils.CGREvent) (rply *AttrSProces
|
||||
initEvVal, cast := utils.CastFieldIfToString(initEvValIf)
|
||||
if !cast {
|
||||
utils.Logger.Warning(
|
||||
fmt.Sprintf("<%s> ev: %s, cannot cast field: %s to string",
|
||||
fmt.Sprintf("<%s> ev: %s, cannot cast field: %+v to string",
|
||||
utils.AttributeS, ev, fldName))
|
||||
continue
|
||||
}
|
||||
@@ -151,6 +151,14 @@ func (alS *AttributeService) processEvent(ev *utils.CGREvent) (rply *AttrSProces
|
||||
rply.CGREvent.Event[fldName] = attrVal.Substitute
|
||||
rply.AlteredFields = append(rply.AlteredFields, fldName)
|
||||
}
|
||||
for _, valIface := range rply.CGREvent.Event {
|
||||
if valIface == interface{}(utils.MetaAttributes) {
|
||||
return nil, utils.NewCGRError(utils.AttributeSv1ProcessEvent,
|
||||
utils.AttributesNotFoundCaps,
|
||||
utils.AttributesNotFound,
|
||||
utils.AttributesNotFound)
|
||||
}
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
537
utils/consts.go
537
utils/consts.go
@@ -81,237 +81,227 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
CGRateS = "CGRateS"
|
||||
VERSION = "0.9.1~rc8"
|
||||
GitLastLogFileName = ".git_lastlog.txt"
|
||||
DIAMETER_FIRMWARE_REVISION = 918
|
||||
REDIS_MAX_CONNS = 10
|
||||
POSTGRES = "postgres"
|
||||
MYSQL = "mysql"
|
||||
MONGO = "mongo"
|
||||
REDIS = "redis"
|
||||
MAPSTOR = "mapstor"
|
||||
LOCALHOST = "127.0.0.1"
|
||||
FSCDR_FILE_CSV = "freeswitch_file_csv"
|
||||
FSCDR_HTTP_JSON = "freeswitch_http_json"
|
||||
NOT_IMPLEMENTED = "not implemented"
|
||||
PREPAID = "prepaid"
|
||||
META_PREPAID = "*prepaid"
|
||||
POSTPAID = "postpaid"
|
||||
META_POSTPAID = "*postpaid"
|
||||
PSEUDOPREPAID = "pseudoprepaid"
|
||||
META_PSEUDOPREPAID = "*pseudoprepaid"
|
||||
META_RATED = "*rated"
|
||||
META_NONE = "*none"
|
||||
META_NOW = "*now"
|
||||
ROUNDING_UP = "*up"
|
||||
ROUNDING_MIDDLE = "*middle"
|
||||
ROUNDING_DOWN = "*down"
|
||||
ANY = "*any"
|
||||
UNLIMITED = "*unlimited"
|
||||
ZERO = "*zero"
|
||||
ASAP = "*asap"
|
||||
USERS = "*users"
|
||||
COMMENT_CHAR = '#'
|
||||
CSV_SEP = ','
|
||||
FALLBACK_SEP = ';'
|
||||
INFIELD_SEP = ";"
|
||||
MetaPipe = "*|"
|
||||
FIELDS_SEP = ","
|
||||
InInFieldSep = ":"
|
||||
STATIC_HDRVAL_SEP = "::"
|
||||
REGEXP_PREFIX = "~"
|
||||
FILTER_VAL_START = "("
|
||||
FILTER_VAL_END = ")"
|
||||
JSON = "json"
|
||||
GOB = "gob"
|
||||
MSGPACK = "msgpack"
|
||||
CSV_LOAD = "CSVLOAD"
|
||||
CGRID = "CGRID"
|
||||
TOR = "ToR"
|
||||
ORDERID = "OrderID"
|
||||
OriginID = "OriginID"
|
||||
InitialOriginID = "InitialOriginID"
|
||||
OriginIDPrefix = "OriginIDPrefix"
|
||||
Source = "Source"
|
||||
OriginHost = "OriginHost"
|
||||
RequestType = "RequestType"
|
||||
Direction = "Direction"
|
||||
Tenant = "Tenant"
|
||||
Category = "Category"
|
||||
Context = "Context"
|
||||
Account = "Account"
|
||||
Subject = "Subject"
|
||||
Destination = "Destination"
|
||||
SetupTime = "SetupTime"
|
||||
AnswerTime = "AnswerTime"
|
||||
Usage = "Usage"
|
||||
LastUsed = "LastUsed"
|
||||
PDD = "PDD"
|
||||
SUPPLIER = "Supplier"
|
||||
MEDI_RUNID = "RunID"
|
||||
COST = "Cost"
|
||||
COST_DETAILS = "CostDetails"
|
||||
RATED = "rated"
|
||||
RATED_FLD = "Rated"
|
||||
PartialField = "Partial"
|
||||
DEFAULT_RUNID = "*default"
|
||||
META_DEFAULT = "*default"
|
||||
STATIC_VALUE_PREFIX = "^"
|
||||
CSV = "csv"
|
||||
FWV = "fwv"
|
||||
PartialCSV = "partial_csv"
|
||||
DRYRUN = "dry_run"
|
||||
META_COMBIMED = "*combimed"
|
||||
MetaInternal = "*internal"
|
||||
MetaInline = "*inline"
|
||||
ZERO_RATING_SUBJECT_PREFIX = "*zero"
|
||||
OK = "OK"
|
||||
CDRE_FIXED_WIDTH = "fwv"
|
||||
XML_PROFILE_PREFIX = "*xml:"
|
||||
CDRE = "cdre"
|
||||
CDRC = "cdrc"
|
||||
MASK_CHAR = "*"
|
||||
CONCATENATED_KEY_SEP = ":"
|
||||
FORKED_CDR = "forked_cdr"
|
||||
UNIT_TEST = "UNIT_TEST"
|
||||
HDR_VAL_SEP = "/"
|
||||
MONETARY = "*monetary"
|
||||
SMS = "*sms"
|
||||
MMS = "*mms"
|
||||
GENERIC = "*generic"
|
||||
DATA = "*data"
|
||||
VOICE = "*voice"
|
||||
MAX_COST_FREE = "*free"
|
||||
MAX_COST_DISCONNECT = "*disconnect"
|
||||
HOURS = "hours"
|
||||
MINUTES = "minutes"
|
||||
NANOSECONDS = "nanoseconds"
|
||||
SECONDS = "seconds"
|
||||
OUT = "*out"
|
||||
IN = "*in"
|
||||
META_OUT = "*out"
|
||||
META_ANY = "*any"
|
||||
MetaExists = "*exists"
|
||||
CDR_IMPORT = "cdr_import"
|
||||
CDR_EXPORT = "cdr_export"
|
||||
ASR = "ASR"
|
||||
ACD = "ACD"
|
||||
FILTER_REGEXP_TPL = "$1$2$3$4$5"
|
||||
TASKS_KEY = "tasks"
|
||||
ACTION_PLAN_PREFIX = "apl_"
|
||||
AccountActionPlansPrefix = "aap_"
|
||||
ACTION_TRIGGER_PREFIX = "atr_"
|
||||
REVERSE_ACTION_TRIGGER_PREFIX = "rtr_"
|
||||
RATING_PLAN_PREFIX = "rpl_"
|
||||
RATING_PROFILE_PREFIX = "rpf_"
|
||||
ACTION_PREFIX = "act_"
|
||||
SHARED_GROUP_PREFIX = "shg_"
|
||||
ACCOUNT_PREFIX = "acc_"
|
||||
DESTINATION_PREFIX = "dst_"
|
||||
REVERSE_DESTINATION_PREFIX = "rds_"
|
||||
LCR_PREFIX = "lcr_"
|
||||
DERIVEDCHARGERS_PREFIX = "dcs_"
|
||||
CDR_STATS_QUEUE_PREFIX = "csq_"
|
||||
PUBSUB_SUBSCRIBERS_PREFIX = "pss_"
|
||||
USERS_PREFIX = "usr_"
|
||||
ALIASES_PREFIX = "als_"
|
||||
REVERSE_ALIASES_PREFIX = "rls_"
|
||||
ResourcesPrefix = "res_"
|
||||
ResourceProfilesStringIndex = "rsi_"
|
||||
ResourceProfilesStringRevIndex = "rsr_"
|
||||
ResourceProfilesPrefix = "rsp_"
|
||||
StatQueuesStringIndex = "ssi_"
|
||||
StatQueuesStringRevIndex = "ssr_"
|
||||
ThresholdPrefix = "thd_"
|
||||
ThresholdStringIndex = "tsi_"
|
||||
ThresholdStringRevIndex = "tsr_"
|
||||
TimingsPrefix = "tmg_"
|
||||
FilterPrefix = "ftr_"
|
||||
FilterIndex = "fti_"
|
||||
CDR_STATS_PREFIX = "cst_"
|
||||
TEMP_DESTINATION_PREFIX = "tmp_"
|
||||
LOG_CALL_COST_PREFIX = "cco_"
|
||||
LOG_ACTION_TIMMING_PREFIX = "ltm_"
|
||||
LOG_ACTION_TRIGGER_PREFIX = "ltr_"
|
||||
VERSION_PREFIX = "ver_"
|
||||
LOG_ERR = "ler_"
|
||||
LOG_CDR = "cdr_"
|
||||
LOG_MEDIATED_CDR = "mcd_"
|
||||
StatQueueProfilePrefix = "sqp_"
|
||||
SupplierProfilePrefix = "spp_"
|
||||
SupplierProfilesStringIndex = "spi_"
|
||||
SupplierProfilesStringRevIndex = "spr_"
|
||||
AttributeProfilePrefix = "alp_"
|
||||
AttributeProfilesStringIndex = "ali_"
|
||||
AttributeProfilesStringRevIndex = "alr_"
|
||||
ThresholdProfilePrefix = "thp_"
|
||||
StatQueuePrefix = "stq_"
|
||||
LOADINST_KEY = "load_history"
|
||||
SESSION_MANAGER_SOURCE = "SMR"
|
||||
MEDIATOR_SOURCE = "MED"
|
||||
CDRS_SOURCE = "CDRS"
|
||||
SCHED_SOURCE = "SCH"
|
||||
RATER_SOURCE = "RAT"
|
||||
CREATE_CDRS_TABLES_SQL = "create_cdrs_tables.sql"
|
||||
CREATE_TARIFFPLAN_TABLES_SQL = "create_tariffplan_tables.sql"
|
||||
TEST_SQL = "TEST_SQL"
|
||||
DESTINATIONS_LOAD_THRESHOLD = 0.1
|
||||
META_CONSTANT = "*constant"
|
||||
META_FILLER = "*filler"
|
||||
META_HANDLER = "*handler"
|
||||
META_HTTP_POST = "*http_post"
|
||||
MetaHTTPjson = "*http_json"
|
||||
MetaHTTPjsonCDR = "*http_json_cdr"
|
||||
META_HTTP_JSONRPC = "*http_jsonrpc"
|
||||
MetaHTTPjsonMap = "*http_json_map"
|
||||
MetaAMQPjsonCDR = "*amqp_json_cdr"
|
||||
MetaAMQPjsonMap = "*amqp_json_map"
|
||||
NANO_MULTIPLIER = 1000000000
|
||||
CGR_AUTHORIZE = "CGR_AUTHORIZE"
|
||||
CONFIG_DIR = "/etc/cgrates/"
|
||||
CGR_ACCOUNT = "cgr_account"
|
||||
CGR_SUPPLIER = "cgr_supplier"
|
||||
CGR_DESTINATION = "cgr_destination"
|
||||
CGR_SUBJECT = "cgr_subject"
|
||||
CGR_CATEGORY = "cgr_category"
|
||||
CGR_REQTYPE = "cgr_reqtype"
|
||||
CGR_TENANT = "cgr_tenant"
|
||||
CGR_TOR = "cgr_tor"
|
||||
CGR_OriginID = "cgr_originid"
|
||||
CGR_HOST = "cgr_host"
|
||||
CGR_PDD = "cgr_pdd"
|
||||
DISCONNECT_CAUSE = "DisconnectCause"
|
||||
CGR_DISCONNECT_CAUSE = "cgr_disconnectcause"
|
||||
CGR_COMPUTELCR = "cgr_computelcr"
|
||||
CGR_SUPPLIERS = "cgr_suppliers"
|
||||
CGRFlags = "cgr_flags"
|
||||
KAM_FLATSTORE = "kamailio_flatstore"
|
||||
OSIPS_FLATSTORE = "opensips_flatstore"
|
||||
MAX_DEBIT_CACHE_PREFIX = "MAX_DEBIT_"
|
||||
REFUND_INCR_CACHE_PREFIX = "REFUND_INCR_"
|
||||
REFUND_ROUND_CACHE_PREFIX = "REFUND_ROUND_"
|
||||
GET_SESS_RUNS_CACHE_PREFIX = "GET_SESS_RUNS_"
|
||||
GET_DERIV_MAX_SESS_TIME = "GET_DERIV_MAX_SESS_TIME_"
|
||||
LOG_CALL_COST_CACHE_PREFIX = "LOG_CALL_COSTS_"
|
||||
LCRCachePrefix = "LCR_"
|
||||
MetaRating = "*rating"
|
||||
NOT_AVAILABLE = "N/A"
|
||||
MetaEmpty = "*empty"
|
||||
CALL = "call"
|
||||
EXTRA_FIELDS = "ExtraFields"
|
||||
META_SURETAX = "*sure_tax"
|
||||
SURETAX = "suretax"
|
||||
DIAMETER_AGENT = "diameter_agent"
|
||||
COUNTER_EVENT = "*event"
|
||||
COUNTER_BALANCE = "*balance"
|
||||
EVENT_NAME = "EventName"
|
||||
COMPUTE_LCR = "ComputeLcr"
|
||||
CGR_AUTHORIZATION = "CgrAuthorization"
|
||||
CGR_SESSION_START = "CgrSessionStart"
|
||||
CGR_SESSION_UPDATE = "CgrSessionUpdate"
|
||||
CGR_SESSION_END = "CgrSessionEnd"
|
||||
CGR_LCR_REQUEST = "CgrLcrRequest"
|
||||
CGRateS = "CGRateS"
|
||||
VERSION = "0.9.1~rc8"
|
||||
GitLastLogFileName = ".git_lastlog.txt"
|
||||
DIAMETER_FIRMWARE_REVISION = 918
|
||||
REDIS_MAX_CONNS = 10
|
||||
POSTGRES = "postgres"
|
||||
MYSQL = "mysql"
|
||||
MONGO = "mongo"
|
||||
REDIS = "redis"
|
||||
MAPSTOR = "mapstor"
|
||||
LOCALHOST = "127.0.0.1"
|
||||
FSCDR_FILE_CSV = "freeswitch_file_csv"
|
||||
FSCDR_HTTP_JSON = "freeswitch_http_json"
|
||||
NOT_IMPLEMENTED = "not implemented"
|
||||
PREPAID = "prepaid"
|
||||
META_PREPAID = "*prepaid"
|
||||
POSTPAID = "postpaid"
|
||||
META_POSTPAID = "*postpaid"
|
||||
PSEUDOPREPAID = "pseudoprepaid"
|
||||
META_PSEUDOPREPAID = "*pseudoprepaid"
|
||||
META_RATED = "*rated"
|
||||
META_NONE = "*none"
|
||||
META_NOW = "*now"
|
||||
ROUNDING_UP = "*up"
|
||||
ROUNDING_MIDDLE = "*middle"
|
||||
ROUNDING_DOWN = "*down"
|
||||
ANY = "*any"
|
||||
UNLIMITED = "*unlimited"
|
||||
ZERO = "*zero"
|
||||
ASAP = "*asap"
|
||||
USERS = "*users"
|
||||
COMMENT_CHAR = '#'
|
||||
CSV_SEP = ','
|
||||
FALLBACK_SEP = ';'
|
||||
INFIELD_SEP = ";"
|
||||
MetaPipe = "*|"
|
||||
FIELDS_SEP = ","
|
||||
InInFieldSep = ":"
|
||||
STATIC_HDRVAL_SEP = "::"
|
||||
REGEXP_PREFIX = "~"
|
||||
FILTER_VAL_START = "("
|
||||
FILTER_VAL_END = ")"
|
||||
JSON = "json"
|
||||
GOB = "gob"
|
||||
MSGPACK = "msgpack"
|
||||
CSV_LOAD = "CSVLOAD"
|
||||
CGRID = "CGRID"
|
||||
TOR = "ToR"
|
||||
ORDERID = "OrderID"
|
||||
OriginID = "OriginID"
|
||||
InitialOriginID = "InitialOriginID"
|
||||
OriginIDPrefix = "OriginIDPrefix"
|
||||
Source = "Source"
|
||||
OriginHost = "OriginHost"
|
||||
RequestType = "RequestType"
|
||||
Direction = "Direction"
|
||||
Tenant = "Tenant"
|
||||
Category = "Category"
|
||||
Context = "Context"
|
||||
Account = "Account"
|
||||
Subject = "Subject"
|
||||
Destination = "Destination"
|
||||
SetupTime = "SetupTime"
|
||||
AnswerTime = "AnswerTime"
|
||||
Usage = "Usage"
|
||||
LastUsed = "LastUsed"
|
||||
PDD = "PDD"
|
||||
SUPPLIER = "Supplier"
|
||||
MEDI_RUNID = "RunID"
|
||||
COST = "Cost"
|
||||
COST_DETAILS = "CostDetails"
|
||||
RATED = "rated"
|
||||
RATED_FLD = "Rated"
|
||||
PartialField = "Partial"
|
||||
DEFAULT_RUNID = "*default"
|
||||
META_DEFAULT = "*default"
|
||||
STATIC_VALUE_PREFIX = "^"
|
||||
CSV = "csv"
|
||||
FWV = "fwv"
|
||||
PartialCSV = "partial_csv"
|
||||
DRYRUN = "dry_run"
|
||||
META_COMBIMED = "*combimed"
|
||||
MetaInternal = "*internal"
|
||||
MetaInline = "*inline"
|
||||
ZERO_RATING_SUBJECT_PREFIX = "*zero"
|
||||
OK = "OK"
|
||||
CDRE_FIXED_WIDTH = "fwv"
|
||||
XML_PROFILE_PREFIX = "*xml:"
|
||||
CDRE = "cdre"
|
||||
CDRC = "cdrc"
|
||||
MASK_CHAR = "*"
|
||||
CONCATENATED_KEY_SEP = ":"
|
||||
FORKED_CDR = "forked_cdr"
|
||||
UNIT_TEST = "UNIT_TEST"
|
||||
HDR_VAL_SEP = "/"
|
||||
MONETARY = "*monetary"
|
||||
SMS = "*sms"
|
||||
MMS = "*mms"
|
||||
GENERIC = "*generic"
|
||||
DATA = "*data"
|
||||
VOICE = "*voice"
|
||||
MAX_COST_FREE = "*free"
|
||||
MAX_COST_DISCONNECT = "*disconnect"
|
||||
HOURS = "hours"
|
||||
MINUTES = "minutes"
|
||||
NANOSECONDS = "nanoseconds"
|
||||
SECONDS = "seconds"
|
||||
OUT = "*out"
|
||||
IN = "*in"
|
||||
META_OUT = "*out"
|
||||
META_ANY = "*any"
|
||||
MetaExists = "*exists"
|
||||
CDR_IMPORT = "cdr_import"
|
||||
CDR_EXPORT = "cdr_export"
|
||||
ASR = "ASR"
|
||||
ACD = "ACD"
|
||||
FILTER_REGEXP_TPL = "$1$2$3$4$5"
|
||||
TASKS_KEY = "tasks"
|
||||
ACTION_PLAN_PREFIX = "apl_"
|
||||
AccountActionPlansPrefix = "aap_"
|
||||
ACTION_TRIGGER_PREFIX = "atr_"
|
||||
REVERSE_ACTION_TRIGGER_PREFIX = "rtr_"
|
||||
RATING_PLAN_PREFIX = "rpl_"
|
||||
RATING_PROFILE_PREFIX = "rpf_"
|
||||
ACTION_PREFIX = "act_"
|
||||
SHARED_GROUP_PREFIX = "shg_"
|
||||
ACCOUNT_PREFIX = "acc_"
|
||||
DESTINATION_PREFIX = "dst_"
|
||||
REVERSE_DESTINATION_PREFIX = "rds_"
|
||||
LCR_PREFIX = "lcr_"
|
||||
DERIVEDCHARGERS_PREFIX = "dcs_"
|
||||
CDR_STATS_QUEUE_PREFIX = "csq_"
|
||||
PUBSUB_SUBSCRIBERS_PREFIX = "pss_"
|
||||
USERS_PREFIX = "usr_"
|
||||
ALIASES_PREFIX = "als_"
|
||||
REVERSE_ALIASES_PREFIX = "rls_"
|
||||
ResourcesPrefix = "res_"
|
||||
ResourceProfilesPrefix = "rsp_"
|
||||
ThresholdPrefix = "thd_"
|
||||
TimingsPrefix = "tmg_"
|
||||
FilterPrefix = "ftr_"
|
||||
FilterIndex = "fti_"
|
||||
CDR_STATS_PREFIX = "cst_"
|
||||
TEMP_DESTINATION_PREFIX = "tmp_"
|
||||
LOG_CALL_COST_PREFIX = "cco_"
|
||||
LOG_ACTION_TIMMING_PREFIX = "ltm_"
|
||||
LOG_ACTION_TRIGGER_PREFIX = "ltr_"
|
||||
VERSION_PREFIX = "ver_"
|
||||
LOG_ERR = "ler_"
|
||||
LOG_CDR = "cdr_"
|
||||
LOG_MEDIATED_CDR = "mcd_"
|
||||
StatQueueProfilePrefix = "sqp_"
|
||||
SupplierProfilePrefix = "spp_"
|
||||
AttributeProfilePrefix = "alp_"
|
||||
ThresholdProfilePrefix = "thp_"
|
||||
StatQueuePrefix = "stq_"
|
||||
LOADINST_KEY = "load_history"
|
||||
SESSION_MANAGER_SOURCE = "SMR"
|
||||
MEDIATOR_SOURCE = "MED"
|
||||
CDRS_SOURCE = "CDRS"
|
||||
SCHED_SOURCE = "SCH"
|
||||
RATER_SOURCE = "RAT"
|
||||
CREATE_CDRS_TABLES_SQL = "create_cdrs_tables.sql"
|
||||
CREATE_TARIFFPLAN_TABLES_SQL = "create_tariffplan_tables.sql"
|
||||
TEST_SQL = "TEST_SQL"
|
||||
DESTINATIONS_LOAD_THRESHOLD = 0.1
|
||||
META_CONSTANT = "*constant"
|
||||
META_FILLER = "*filler"
|
||||
META_HANDLER = "*handler"
|
||||
META_HTTP_POST = "*http_post"
|
||||
MetaHTTPjson = "*http_json"
|
||||
MetaHTTPjsonCDR = "*http_json_cdr"
|
||||
META_HTTP_JSONRPC = "*http_jsonrpc"
|
||||
MetaHTTPjsonMap = "*http_json_map"
|
||||
MetaAMQPjsonCDR = "*amqp_json_cdr"
|
||||
MetaAMQPjsonMap = "*amqp_json_map"
|
||||
NANO_MULTIPLIER = 1000000000
|
||||
CGR_AUTHORIZE = "CGR_AUTHORIZE"
|
||||
CONFIG_DIR = "/etc/cgrates/"
|
||||
CGR_ACCOUNT = "cgr_account"
|
||||
CGR_SUPPLIER = "cgr_supplier"
|
||||
CGR_DESTINATION = "cgr_destination"
|
||||
CGR_SUBJECT = "cgr_subject"
|
||||
CGR_CATEGORY = "cgr_category"
|
||||
CGR_REQTYPE = "cgr_reqtype"
|
||||
CGR_TENANT = "cgr_tenant"
|
||||
CGR_TOR = "cgr_tor"
|
||||
CGR_OriginID = "cgr_originid"
|
||||
CGR_HOST = "cgr_host"
|
||||
CGR_PDD = "cgr_pdd"
|
||||
DISCONNECT_CAUSE = "DisconnectCause"
|
||||
CGR_DISCONNECT_CAUSE = "cgr_disconnectcause"
|
||||
CGR_COMPUTELCR = "cgr_computelcr"
|
||||
CGR_SUPPLIERS = "cgr_suppliers"
|
||||
CGRFlags = "cgr_flags"
|
||||
KAM_FLATSTORE = "kamailio_flatstore"
|
||||
OSIPS_FLATSTORE = "opensips_flatstore"
|
||||
MAX_DEBIT_CACHE_PREFIX = "MAX_DEBIT_"
|
||||
REFUND_INCR_CACHE_PREFIX = "REFUND_INCR_"
|
||||
REFUND_ROUND_CACHE_PREFIX = "REFUND_ROUND_"
|
||||
GET_SESS_RUNS_CACHE_PREFIX = "GET_SESS_RUNS_"
|
||||
GET_DERIV_MAX_SESS_TIME = "GET_DERIV_MAX_SESS_TIME_"
|
||||
LOG_CALL_COST_CACHE_PREFIX = "LOG_CALL_COSTS_"
|
||||
LCRCachePrefix = "LCR_"
|
||||
MetaRating = "*rating"
|
||||
NOT_AVAILABLE = "N/A"
|
||||
MetaEmpty = "*empty"
|
||||
CALL = "call"
|
||||
EXTRA_FIELDS = "ExtraFields"
|
||||
META_SURETAX = "*sure_tax"
|
||||
SURETAX = "suretax"
|
||||
DIAMETER_AGENT = "diameter_agent"
|
||||
COUNTER_EVENT = "*event"
|
||||
COUNTER_BALANCE = "*balance"
|
||||
EVENT_NAME = "EventName"
|
||||
COMPUTE_LCR = "ComputeLcr"
|
||||
CGR_AUTHORIZATION = "CgrAuthorization"
|
||||
CGR_SESSION_START = "CgrSessionStart"
|
||||
CGR_SESSION_UPDATE = "CgrSessionUpdate"
|
||||
CGR_SESSION_END = "CgrSessionEnd"
|
||||
CGR_LCR_REQUEST = "CgrLcrRequest"
|
||||
// action trigger threshold types
|
||||
TRIGGER_MIN_EVENT_COUNTER = "*min_event_counter"
|
||||
TRIGGER_MIN_BALANCE_COUNTER = "*min_balance_counter"
|
||||
@@ -361,6 +351,8 @@ const (
|
||||
NotCloneableCaps = "NOT_CLONEABLE"
|
||||
ServerErrorCaps = "SERVER_ERROR"
|
||||
MandatoryIEMissingCaps = "MANDATORY_IE_MISSING"
|
||||
AttributesNotFoundCaps = "ATTRIBUTES_NOT_FOUND"
|
||||
AttributesNotFound = "attributes not found"
|
||||
UnsupportedCachePrefix = "unsupported cache prefix"
|
||||
CDRSCtx = "cdrs"
|
||||
MandatoryInfoMissing = "mandatory information missing"
|
||||
@@ -381,6 +373,7 @@ const (
|
||||
MetaStats = "*stats"
|
||||
MetaThresholds = "*thresholds"
|
||||
MetaSuppliers = "*suppliers"
|
||||
MetaAttributes = "*attributes"
|
||||
Migrator = "migrator"
|
||||
UnsupportedMigrationTask = "unsupported migration task"
|
||||
NoStorDBConnection = "not connected to StorDB"
|
||||
@@ -412,7 +405,6 @@ const (
|
||||
Thresholds = "Thresholds"
|
||||
Suppliers = "Suppliers"
|
||||
StatS = "stats"
|
||||
StatService = "StatS"
|
||||
RALService = "RALs"
|
||||
CostSource = "CostSource"
|
||||
ExtraInfo = "ExtraInfo"
|
||||
@@ -430,7 +422,6 @@ const (
|
||||
BalanceType = "BalanceType"
|
||||
BalanceID = "BalanceID"
|
||||
Units = "Units"
|
||||
ResourceS = "ResourceS"
|
||||
AccountUpdate = "AccountUpdate"
|
||||
BalanceUpdate = "BalanceUpdate"
|
||||
StatUpdate = "StatUpdate"
|
||||
@@ -494,45 +485,18 @@ const (
|
||||
MetaUser = "*User"
|
||||
MetaSubscribers = "*Subscribers"
|
||||
MetaDerivedChargersV = "*DerivedChargers"
|
||||
MetaTpRatingPlans = "*tp_rating_plans"
|
||||
MetaTpFilters = "*tp_filters"
|
||||
MetaTpDestinationRates = "*tp_destination_rates"
|
||||
MetaTpActionTriggers = "*tp_action_triggers"
|
||||
MetaTpAccountActions = "*tp_account_actions"
|
||||
MetaTpActionPlans = "*tp_action_plans"
|
||||
MetaTpActions = "*tp_actions"
|
||||
MetaTpDerivedChargers = "*tp_derived_charges"
|
||||
MetaTpThresholds = "*tp_thresholds"
|
||||
MetaTpSuppliers = "*tp_suppliers"
|
||||
MetaTpStats = "*tp_stats"
|
||||
MetaTpSharedGroups = "*tp_shared_groups"
|
||||
MetaTpRatingProfiles = "*tp_rating_profiles"
|
||||
MetaTpResources = "*tp_resources"
|
||||
MetaTpRates = "*tp_rates"
|
||||
MetaTpTiming = "*tp_timing"
|
||||
MetaTpResource = "*tp_resource"
|
||||
MetaTpAliases = "*tp_aliases"
|
||||
MetaTpUsers = "*tp_users"
|
||||
MetaTpDerivedChargersV = "*tp_derived_chargers"
|
||||
MetaTpCdrStats = "*tp_cdrstats"
|
||||
MetaTpDestinations = "*tp_destinations"
|
||||
MetaTpRatingPlan = "*tp_rating_plan"
|
||||
MetaTpRatingProfile = "*tp_rating_profile"
|
||||
MetaStorDB = "*stordb"
|
||||
MetaDataDB = "*datadb"
|
||||
SupplierS = "SupplierS"
|
||||
MetaWeight = "*weight"
|
||||
MetaLeastCost = "*least_cost"
|
||||
Weight = "Weight"
|
||||
Cost = "Cost"
|
||||
RatingPlanID = "RatingPlanID"
|
||||
AttributeS = "AttributeS"
|
||||
MetaSessionS = "*sessions"
|
||||
FreeSWITCHAgent = "FreeSWITCHAgent"
|
||||
SessionS = "SessionS"
|
||||
)
|
||||
|
||||
//Meta
|
||||
//MetaMetrics
|
||||
const (
|
||||
MetaASR = "*asr"
|
||||
MetaACD = "*acd"
|
||||
@@ -545,9 +509,43 @@ const (
|
||||
MetaAverage = "*average"
|
||||
)
|
||||
|
||||
//Services
|
||||
const (
|
||||
SessionS = "SessionS"
|
||||
AttributeS = "AttributeS"
|
||||
SupplierS = "SupplierS"
|
||||
ResourceS = "ResourceS"
|
||||
StatService = "StatS"
|
||||
FilterS = "FilterS"
|
||||
)
|
||||
|
||||
//Migrator Metas
|
||||
const (
|
||||
MetaSetVersions = "*set_versions"
|
||||
MetaSetVersions = "*set_versions"
|
||||
MetaTpRatingPlans = "*tp_rating_plans"
|
||||
MetaTpFilters = "*tp_filters"
|
||||
MetaTpDestinationRates = "*tp_destination_rates"
|
||||
MetaTpActionTriggers = "*tp_action_triggers"
|
||||
MetaTpAccountActions = "*tp_account_actions"
|
||||
MetaTpActionPlans = "*tp_action_plans"
|
||||
MetaTpActions = "*tp_actions"
|
||||
MetaTpDerivedChargers = "*tp_derived_charges"
|
||||
MetaTpThresholds = "*tp_thresholds"
|
||||
MetaTpSuppliers = "*tp_suppliers"
|
||||
MetaTpStats = "*tp_stats"
|
||||
MetaTpSharedGroups = "*tp_shared_groups"
|
||||
MetaTpRatingProfiles = "*tp_rating_profiles"
|
||||
MetaTpResources = "*tp_resources"
|
||||
MetaTpRates = "*tp_rates"
|
||||
MetaTpTiming = "*tp_timing"
|
||||
MetaTpResource = "*tp_resource"
|
||||
MetaTpAliases = "*tp_aliases"
|
||||
MetaTpUsers = "*tp_users"
|
||||
MetaTpDerivedChargersV = "*tp_derived_chargers"
|
||||
MetaTpCdrStats = "*tp_cdrstats"
|
||||
MetaTpDestinations = "*tp_destinations"
|
||||
MetaTpRatingPlan = "*tp_rating_plan"
|
||||
MetaTpRatingProfile = "*tp_rating_profile"
|
||||
)
|
||||
|
||||
// MetaFilterIndexesAPIs
|
||||
@@ -658,7 +656,6 @@ const (
|
||||
TBLTPSuppliers = "tp_suppliers"
|
||||
TBLTPAttributes = "tp_attributes"
|
||||
TBLVersions = "versions"
|
||||
FilterS = "FilterS"
|
||||
)
|
||||
|
||||
//Cache Name
|
||||
@@ -700,6 +697,20 @@ const (
|
||||
CacheAttributeFilterRevIndexes = "attribute_filter_revindexes"
|
||||
)
|
||||
|
||||
//Prefix for indexing
|
||||
const (
|
||||
ResourceProfilesStringIndex = "rsi_"
|
||||
ResourceProfilesStringRevIndex = "rsr_"
|
||||
StatQueuesStringIndex = "ssi_"
|
||||
StatQueuesStringRevIndex = "ssr_"
|
||||
ThresholdStringIndex = "tsi_"
|
||||
ThresholdStringRevIndex = "tsr_"
|
||||
SupplierProfilesStringIndex = "spi_"
|
||||
SupplierProfilesStringRevIndex = "spr_"
|
||||
AttributeProfilesStringIndex = "ali_"
|
||||
AttributeProfilesStringRevIndex = "alr_"
|
||||
)
|
||||
|
||||
func buildCacheInstRevPrefixes() {
|
||||
CachePrefixToInstance = make(map[string]string)
|
||||
for k, v := range CacheInstanceToPrefix {
|
||||
|
||||
Reference in New Issue
Block a user