mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 15:18:44 +05:00
Added *sipcid field type
This commit is contained in:
committed by
Dan Christian Bogos
parent
ddc1474e41
commit
2c426ff2de
@@ -21,6 +21,7 @@ package engine
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -505,6 +506,15 @@ func ParseAttribute(dp utils.DataProvider, attrType, path string, value config.R
|
||||
reqNr = 0
|
||||
}
|
||||
return usedCCTime + time.Duration(debitItvl.Nanoseconds()*reqNr), nil
|
||||
case utils.MetaSIPCID:
|
||||
values := make([]string, len(value))
|
||||
for i, val := range value {
|
||||
if values[i], err = val.ParseDataProvider(dp); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
sort.Strings(values[1:])
|
||||
out = strings.Join(values, utils.InfieldSep)
|
||||
default:
|
||||
return utils.EmptyString, fmt.Errorf("unsupported type: <%s>", attrType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user