Remove CONCATENATED_FIELD type since it is implemented through the use of combined RSRFields

This commit is contained in:
DanB
2015-02-11 19:34:14 +01:00
parent 654e0cfe12
commit 1f459f759b
3 changed files with 25 additions and 26 deletions

View File

@@ -33,20 +33,19 @@ import (
)
const (
COST_DETAILS = "cost_details"
CONCATENATED_CDRFIELD = "concatenated_cdrfield"
DATETIME = "datetime"
META_EXPORTID = "*export_id"
META_TIMENOW = "*time_now"
META_FIRSTCDRATIME = "*first_cdr_atime"
META_LASTCDRATIME = "*last_cdr_atime"
META_NRCDRS = "*cdrs_number"
META_DURCDRS = "*cdrs_duration"
META_SMSUSAGE = "*sms_usage"
META_DATAUSAGE = "*data_usage"
META_COSTCDRS = "*cdrs_cost"
META_MASKDESTINATION = "*mask_destination"
META_FORMATCOST = "*format_cost"
COST_DETAILS = "cost_details"
DATETIME = "datetime"
META_EXPORTID = "*export_id"
META_TIMENOW = "*time_now"
META_FIRSTCDRATIME = "*first_cdr_atime"
META_LASTCDRATIME = "*last_cdr_atime"
META_NRCDRS = "*cdrs_number"
META_DURCDRS = "*cdrs_duration"
META_SMSUSAGE = "*sms_usage"
META_DATAUSAGE = "*data_usage"
META_COSTCDRS = "*cdrs_cost"
META_MASKDESTINATION = "*mask_destination"
META_FORMATCOST = "*format_cost"
)
var err error

View File

@@ -71,7 +71,7 @@ var contentJsnCfgFlds = []*config.CdrFieldJsonCfg{
Padding: utils.StringPointer("right")},
&config.CdrFieldJsonCfg{Tag: utils.StringPointer("Filler"), Type: utils.StringPointer(utils.FILLER), Width: utils.IntPointer(8)},
&config.CdrFieldJsonCfg{Tag: utils.StringPointer("Filler"), Type: utils.StringPointer(utils.FILLER), Width: utils.IntPointer(8)},
&config.CdrFieldJsonCfg{Tag: utils.StringPointer("TerminationCode"), Type: utils.StringPointer(CONCATENATED_CDRFIELD), Value: utils.StringPointer("operator,product"),
&config.CdrFieldJsonCfg{Tag: utils.StringPointer("TerminationCode"), Type: utils.StringPointer(utils.CDRFIELD), Value: utils.StringPointer("operator;product"),
Width: utils.IntPointer(5), Strip: utils.StringPointer("right"), Padding: utils.StringPointer("right")},
&config.CdrFieldJsonCfg{Tag: utils.StringPointer("Cost"), Type: utils.StringPointer(utils.CDRFIELD), Value: utils.StringPointer(utils.COST), Width: utils.IntPointer(9),
Padding: utils.StringPointer("zeroleft")},

View File

@@ -79,17 +79,17 @@
{"tag": "ToR", "type": "constant", "value": "10", "width": 2},
{"tag": "Filler1", "type": "filler", "width": 3},
{"tag": "FileType", "type": "constant", "value": "SIP", "width": 3},
{"tag": "FileSeqNr", "type": "metatag", "cdr_field_id": "*export_id", "padding": "zeroleft", "width": 5},
{"tag": "LastCdr", "type": "metatag", "cdr_field_id": "*last_cdr_atime", "layout": "020106150405", "width": 12},
{"tag": "FileCreationfTime", "type": "metatag", "cdr_field_id": "*time_now", "layout": "020106150405", "width": 12},
{"tag": "FileSeqNr", "type": "metatag", "value": "export_id", "padding": "zeroleft", "width": 5},
{"tag": "LastCdr", "type": "metatag", "value": "last_cdr_atime", "layout": "020106150405", "width": 12},
{"tag": "FileCreationfTime", "type": "metatag", "value": "time_now", "layout": "020106150405", "width": 12},
{"tag": "FileVersion", "type": "constant", "value": "01", "width": 2},
{"tag": "Filler2", "type": "filler", "width": 105},
], // template of the exported header fields
"content_fields": [ // template of the exported content fields
{"tag": "ToR", "type": "constant", "value": "20", "width": 2},
{"tag": "Subject", "type": "cdrfield", "cdr_field_id": "subject", "width": 12, "padding": "right", "mandatory": true},
{"tag": "Subject", "type": "cdrfield", "value": "subject", "width": 12, "padding": "right", "mandatory": true},
{"tag": "ConnectionNumber", "type": "constant", "value": "00000", "width": 5},
{"tag": "CallerId", "type": "cdrfield", "cdr_field_id": "~callerid:s/\\+(\\d+)/00$1/", "strip": "xright", "width": 15, "padding": "right"},
{"tag": "CallerId", "type": "cdrfield", "value": "~callerid:s/\\+(\\d+)/00$1/", "strip": "xright", "width": 15, "padding": "right"},
{"tag": "Destination", "type": "cdrfield", "value": "~destination:s/^\\+311400(\\d+)/$1/:s/^\\+311412\\d\\d112/112/:s/^\\+31(\\d+)/0$1/:s/^\\+(\\d+)/00$1/",
"strip": "xright", "width": 24, "padding": "right", "mandatory": true},
{"tag": "TypeOfService", "type": "constant", "value": "00", "width": 2},
@@ -106,17 +106,17 @@
{"tag": "FillerVolume2", "type": "filler", "width": 8},
{"tag": "DestinationSubId", "type": "cdrfield", "value": "~cost_details:s/MatchedDestId:.+_(\\w{5})/$1/:s/(\\w{6})/$1/", "width": 5},
{"tag": "Cost", "type": "cdrfield", "value": "cost", "padding": "zeroleft", "width": 9},
{"tag": "MaskDestination", "cdr_field_id": "*mask_destination", "type": "metatag", "width": 1},
{"tag": "MaskDestination", "type": "metatag", "value": "mask_destination", "width": 1},
],
"trailer_fields": [
{"tag": "ToR", "type": "constant", "value": "90", "width": 2},
{"tag": "Filler1", "type": "filler", "width": 3},
{"tag": "FileType", "type": "constant", "value": "SIP", "width": 3},
{"tag": "FileSeqNr", "cdr_field_id":"*export_id", "type": "metatag", "padding": "zeroleft", "width": 5},
{"tag": "TotalRecords", "cdr_field_id":"*cdrs_number", "type": "metatag", "padding": "zeroleft", "width": 6},
{"tag": "TotalDuration", "cdr_field_id":"*cdrs_duration", "type": "metatag", "value": "", "padding": "zeroleft", "width": 8},
{"tag": "FirstCdrTime", "cdr_field_id":"*first_cdr_atime", "type": "metatag", "layout": "020106150405", "width": 12},
{"tag": "LastCdrTime", "cdr_field_id": "*last_cdr_atime", "type": "metatag", "layout": "020106150405", "width": 12},
{"tag": "FileSeqNr", "type": "metatag", "value": "export_id", "padding": "zeroleft", "width": 5},
{"tag": "TotalRecords", "type": "metatag", "value": "cdrs_number", "padding": "zeroleft", "width": 6},
{"tag": "TotalDuration", "type": "metatag", "value": "cdrs_duration", "padding": "zeroleft", "width": 8},
{"tag": "FirstCdrTime", "type": "metatag", "value": "first_cdr_atime", "layout": "020106150405", "width": 12},
{"tag": "LastCdrTime", "type": "metatag", "value": "last_cdr_atime", "layout": "020106150405", "width": 12},
{"tag": "Filler1", "type": "filler", "width": 93},
], // template of the exported trailer fields
}