From 77d2048cab82194fd8211248e2b5b67eeb11a435 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Wed, 17 Jun 2015 20:24:29 +0300 Subject: [PATCH] better rating info --- engine/balances.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/balances.go b/engine/balances.go index ca4678913..56fac1c74 100644 --- a/engine/balances.go +++ b/engine/balances.go @@ -314,6 +314,12 @@ func (b *Balance) DebitUnits(cd *CallDescriptor, ub *Account, moneyBalances Bala }, } prefix, destid := b.getMatchingPrefixAndDestId(cd.Destination) + if prefix == "" { + prefix = cd.Destination + } + if destid == "" { + destid = utils.ANY + } ts.setRatingInfo(&RatingInfo{ MatchedSubject: b.Uuid, MatchedPrefix: prefix,