better rating info

This commit is contained in:
Radu Ioan Fericean
2015-06-17 20:24:29 +03:00
parent 4fdc4bfd87
commit 77d2048cab

View File

@@ -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,