[Spce-user] No billing profile with the specified profile-handle found

Marc Storck mstorck at voipgate.com
Fri Jan 10 12:36:39 EST 2014


Good afternoon,

just retested this with an up2date 3.x installation, it doesn't seem to be fixed yet.

The anti fraud lock script seems to be affected by this as well.

I have 1 Customer record where there have been 2 calls for 28.80 cents each, so a total of 57.60 cents. The fraud limit is set to 150 cents. However the query from "ngcp-fraud-daily-lock" :

SELECT 'profile_limit' as type, cdr.source_account_id, SUM(cdr.source_customer_cost) AS daily_cost,        contracts.id,        billing_profiles.fraud_daily_limit, billing_profiles.fraud_daily_lock, billing_profiles.fraud_daily_notify FROM accounting.cdr JOIN billing.contracts ON cdr.source_account_id = contracts.id JOIN billing.billing_mappings ON contracts.id = billing_mappings.contract_id JOIN billing.billing_profiles     ON (billing_profiles.id =          (SELECT m.billing_profile_id          FROM billing.billing_mappings m          WHERE ((m.start_date IS NULL) OR (m.start_date <= NOW()))            AND ((m.end_date IS NULL) OR (m.end_date >= NOW()))            AND (m.contract_id = contracts.id)          ORDER BY m.start_date DESC LIMIT 1         )       ) WHERE (contracts.status = 'active')   AND (DATEDIFF(FROM_UNIXTIME(cdr.start_time), CURDATE()) = 0)   AND (billing_profiles.fraud_daily_limit IS NOT NULL)   AND (billing_profiles.fraud_daily_limit > 0) GROUP BY cdr.source_account_id HAVING (daily_cost > billing_profiles.fraud_daily_limit)  UNION ALL  SELECT 'account_limit' as type, cdr.source_account_id, SUM(cdr.source_customer_cost) AS daily_cost,        contracts.id,        contract_fraud_preferences.fraud_daily_limit, contract_fraud_preferences.fraud_daily_lock,         contract_fraud_preferences.fraud_daily_notify FROM accounting.cdr JOIN billing.contracts ON cdr.source_account_id = contracts.id JOIN billing.contract_fraud_preferences ON contracts.id = contract_fraud_preferences.contract_id WHERE (contracts.status = 'active')   AND (DATEDIFF(FROM_UNIXTIME(cdr.start_time), CURDATE()) = 0) GROUP BY cdr.source_account_id;

returns a total of 172.80 cents:

+---------------+-------------------+------------+----+-------------------+------------------+
| type          | source_account_id | daily_cost | id | fraud_daily_limit | fraud_daily_lock |
+---------------+-------------------+------------+----+-------------------+------------------+
| profile_limit |                10 |     172.80 | 10 |               150 |                2 |
+---------------+-------------------+------------+----+-------------------+------------------+

I haven't examined the SQL request yet, but it seems to count some calls multiple times… 172.80 / 57.60 is exactly 3, so it counts 3 times the amount it should… maybe that helps.

Regards,

Marc


On Dec 10, 2013, at 12:45 PM, Daniel Grotti <dgrotti at sipwise.com> wrote:

> Hi Marc,
> so yes, we are aware of this problem.
> We are working on it but the issue has not been fixed yet.
> Also there are other thread about that, we let you know something here as soon as the issue is fixed.
> 
> Daniel
> 
> 
> 
> 
> On Tuesday, December 10, 2013 12:37 CET, Marc Storck <mstorck at voipgate.com> wrote: 
> 
>> Hello Daniel,
>> 
>> yes. The Customer Account and it's subscriber belong to non default reseller with ID 2. The Billing profile also belongs to non default reseller with ID 2. So all the elements belong to the very same non default reseller.
>> 
>> Best regards,
>> 
>> Marc
>> 
>> On Dec 10, 2013, at 12:36 PM, Daniel Grotti <dgrotti at sipwise.com> wrote:
>> 
>>> Hi Marc,
>>> looks like a well know issue we are trying to fixing.
>>> Most probably this customer belonging to a non default reseller and its billing profile also is belonging to anon default reseller.
>>> I opened an internal ticket about that.
>>> 
>>> Is it your case ?
>>> 
>>> Daniel
>>> 
>>> 
>>> 
>>> On Tuesday, December 10, 2013 12:20 CET, Marc Storck <mstorck at voipgate.com> wrote: 
>>> 
>>>> Good afternoon,
>>>> 
>>>> When logging into CSC with a newly created subscriber I see the following error message in red:
>>>> 
>>>> No billing profile with the specified profile-handle found.
>>>> 
>>>> Does anybody know what went worng and how to fix it?
>>>> 
>>>> Regards,
>>>> 
>>>> Marc
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
> 
> 
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4422 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20140110/75d206b6/attachment.p7s>


More information about the Spce-user mailing list