[Spce-user] LCR not working

Richard Fuchs rfuchs at sipwise.com
Thu Mar 26 10:59:43 EDT 2015


On 26/03/15 06:54 AM, Mark van Herpen wrote:

> No, I only see a query for each peer on the billing_fees_history table:
> 
> SELECT id, destination, onpeak_init_rate, onpeak_init_interval,
> onpeak_follow_rate, onpeak_follow_interval, offpeak_init_rate,
> offpeak_init_interval, offpeak_follow_rate, offpeak_follow_interval,
> billing_zones_history_id, use_free_time FROM
> billing.billing_fees_history WHERE billing_profile_id = 4 AND bf_id IS
> NOT NULL AND type = 'call' AND direction = 'out' AND
> concat('316<SNIP-DESTNR>','@','<SNIP-DESTDOMAIN>') REGEXP(destination)
> AND concat('<SNIP-SRCNR>','@','<SNIP-SOURCEDOMAIN>') REGEXP(source)
> ORDER BY LENGTH(destination) DESC, LENGTH(source) DESC LIMIT 1
> 
> This query is done 3 times, each time with a different
> billing_profile_id which is according with the 3 peers I've configured I
> guess.

The billing_fees table is already joined into this query, so you don't
see a separate query for it. The reason the peers apparently aren't
sorted is because the sorting is based on the init_rate, and all of your
init_rates are zero. Is this intentional?

Cheers



More information about the Spce-user mailing list