Hello openh323gk-users, I change postgresql.conf like this sql_user_name = "%{Stripped-User-Name:-%{User-Name:-none}}" But now i can't auth incoming calls by framedip like this Fri Jan 21 19:46:31 2005 : Auth: Login incorrect: [xx.xx.xx.xx/allow] (from cli ent OpenH323GK port 0) Fri Jan 21 19:46:31 2005 User-Name = "xx.xx.xx.xx" NAS-IP-Address = 192.168.2.8 NAS-Identifier = "OpenH323GK" NAS-Port-Type = Virtual Service-Type = Login-User Framed-IP-Address = xx.xx.xx.xx Called-Station-Id = "71234555555" Client-IP-Address = 192.168.2.8 Timestamp = 1106325991 sqlbill execute following query radius_get_check_attrs NULLIF('%{Calling-Station-Id}',''), if like this we have Reject voipdb=# SELECT * FROM radius_get_check_arq_attrs('xx.xx.xx.xx', 'xx.xx.xx.xx', FALSE, null, '71234555555'); id | attrname | attrvalue | attrop ----+-----------+-----------+-------- 0 | Auth-Type | Reject | := (1 запись) if like this, all fine voipdb=# SELECT * FROM radius_get_check_arq_attrs('xx.xx.xx.xx', 'xx.xx.xx.xx', FALSE, '', '71234555555'); id | attrname | attrvalue | attrop ----+---------------+-----------+-------- 0 | User-Password | allow | == (1 запись) -- build a list of RADIUS check attribute-value pairs for endpoint call admission request -- $1 - User-Name -- $2 - Framed-IP-Address -- $3 - TRUE - the call is being answered, FALSE - the call is originated -- $4 - calling station id -- $5 - called station id CREATE OR REPLACE FUNCTION radius_get_check_arq_attrs(TEXT, INET, BOOLEAN, TEXT, TEXT) RETURNS SETOF voipradattr AS ' DECLARE framed_ip ALIAS FOR $2; answer_call ALIAS FOR $3; username TEXT; calling_station_id TEXT; called_station_id TEXT; reject_attr voipradattr%ROWTYPE; check_attr voipradattr%ROWTYPE; query_result RECORD; trf voiptariff%ROWTYPE; userid INT; BEGIN RAISE LOG ''sqlbill: ARQ(username: %; IP: %; answer: %; calling: %; called: %)'', $1, $2, $3, $4, $5; -- prepare Auth-Type := Reject avp, as it is referenced very often reject_attr.id := 0; reject_attr.attrname := ''Auth-Type''; reject_attr.attrvalue := ''Reject''; reject_attr.attrop := '':=''; -- check input arguments IF $1 IS NULL OR $2 IS NULL OR $3 IS NULL OR $4 IS NULL OR $5 IS NULL THEN -- there we have Reject RETURN NEXT reject_attr; RETURN; END IF; How i can resolve this problem? -- Best regards, romal mailto:romal@xxxxxxxxxx ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________________ List: Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549 Homepage: http://www.gnugk.org/