From fb49669e65c367580b43a8e401b6a9c5091396c6 Mon Sep 17 00:00:00 2001 From: Brice Heppner Date: Fri, 19 Feb 2016 09:35:21 +0000 Subject: [PATCH] handle extra_fields variables with int/float value --- engine/fscdr.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/fscdr.go b/engine/fscdr.go index 8ab7ad753..6d43cb54e 100644 --- a/engine/fscdr.go +++ b/engine/fscdr.go @@ -22,6 +22,7 @@ import ( "encoding/json" "fmt" "reflect" + "strconv" "strings" "time" @@ -97,6 +98,10 @@ func (fsCdr FSCdr) searchExtraField(field string, body map[string]interface{}) ( if key == field { return v } + case float64: + if key == field { + return strconv.FormatFloat(v, 'f', -1, 64) + } case map[string]interface{}: if result = fsCdr.searchExtraField(field, v); result != "" { return