RE: SQL Billing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Yes, my mistake. I forgot it was a stored procedure. I am continuing to
check the logs but  will definitely checkout your new version.

Thanks!
 

-----Original Message-----
From: openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx
[mailto:openh323gk-users-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of
Michal Zygmuntowicz
Sent: Friday, August 13, 2004 5:00 PM
To: openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Subject: Re:  SQL Billing


We have to use '' instead of ' in the stored procedure.
Maybe you don't have a matching voiptariff entry 
(with dstid = voiptariffdst.id) or the account has no sufficient balance
or the currency symbol for the account and the tariff does not match. Or
maybe the system cannot find an account for your user. Another way to
check this problem is to look at PostgreSQL log and/or RADIUS log to see
at which moment the authorization fails.

On Fri, 2004-08-13 at 04:11, Abano, Fernando A. (ePerformax) wrote:
> Hi Michal,
> 
> I am still attempting to make sqlbill work. The diffence between your 
> sample voiptariffdst/voiptariff and mine is in the prefix where for 
> example, my prefix=1 while in the sample, it is 001 for the USA. I 
> have edited that prefix in the table to reflect 1 instead of 001 but 
> it still would not compute the price. I then simulated the query and 
> below is the
> result:
> 
> select * from voiptariffdst where active and
> ascii(prefix)=ascii('19017154800') and ('19017154800' like (prefix ||
> ''%'')) limit 1;
> 
> And got this result:
> 
> ERROR:  operator is not unique: "unknown" % "unknown"
> HINT:  Could not choose a best candidate operator. You may need to add

> explicit type casts.
> 
> I changed the query to:
> 
> select * from voiptariffdst where active and
> ascii(prefix)=ascii('19017154800') and ('19017154800' like (prefix ||
> '%')) limit 1;
> 
> And got :
> 
>  id | active | prefix | description
> ----+--------+--------+-------------
>  57 | t      | 1      | USA
> (1 row)
> 
> It appears that the double single quote near the % was creating an 
> error in match_tariff.
> 
> Is my finding correct?




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save
50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

_______________________________________________________

List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

_______________________________________________________

List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Homepage: http://www.gnugk.org/

[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux