Re: avaya / voice master

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

 



> Message: 1
> Date: Wed, 26 Jul 2006 21:43:33 +0200
> From: "Rushan Sobar" <Rushan@xxxxxxxxxx>
> Subject:  avaya / voice master
> To: <openh323gk-users@xxxxxxxxxxxxxxxxxxxxx>
> Message-ID: <009601c6b0eb$c75509c0$89c09ec3@rushan13257bc1>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hi,
>
> I'm trying to setup avaya exchange to my GNU , also im trying to connect
> voice master gatekeeper to my gnu , my gnu work with radius and sqlbill ,
> the problem that avaya and voice master don't send H323ID to register into
> my gatekeeper , is there any way in sqlbill to add account based on ip
> address not H323ID?
>
> Regards
> Rushan
>
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 27 Jul 2006 04:31:34 +0800
> From: Simon Horne <s.horne@xxxxxxxxxxxxxx>
> Subject: Re:  avaya / voice master
> To: GNU Gatekeeper Users <openh323gk-users@xxxxxxxxxxxxxxxxxxxxx>
> Message-ID: <6.0.0.22.2.20060727042034.0436d128@xxxxxxxxxxxxx>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
>
> The solution is to
>
> 1. create a H323ID entry in sqlbill of the IP address you wish to allow
> 2. Create a sql function like this
>
> CREATE OR REPLACE FUNCTION seth323id(text, text) RETURNS text AS
> $body$
> DECLARE
>     userh323id ALIAS FOR $1;
>     userip ALIAS FOR $2;
>     userid INT := NULL;
> BEGIN
>       SELECT INTO userid u.id FROM voipuser u WHERE u.h323id = userh323id;
>
>       IF NOT FOUND THEN
>           RETURN userip;
>       ELSE
>         RETURN userh323id;
>       END IF;
> END;
> $body$
> LANGUAGE 'plpgsql' STABLE;
>
> This will check if the H323ID is missing and if so then it returns the
> callers IP.
>
> 3. Modify the SQL query in GnuGK
> Replace 'u'  with  seth323id('%u','%{caller-ip}')
>
> This should work
>
> Simon

Hi Simon,

Thanks for the help....

should i replace the finction you post with the function already exist in 
c_functions.sql or creat new functions?

-- This function tries to find an user account based on the specified
-- network address and/or H.323 identifier
-- $1 - H.323 user's identifier to match
-- $2 - user's IP address
CREATE OR REPLACE FUNCTION match_user(TEXT, INET)
 RETURNS INT AS
'
DECLARE
 userh323id ALIAS FOR $1;
 userip ALIAS FOR $2;
 userid INT := NULL;
BEGIN
 IF userip IS NOT NULL THEN
  SELECT INTO userid id FROM voipuser
   WHERE NOT checkh323id AND framedip >>= userip AND NOT disabled;
 END IF;
 IF NOT FOUND OR userid IS NULL THEN
  SELECT INTO userid id FROM voipuser
   WHERE checkh323id AND h323id = userh323id AND NOT disabled;
 END IF;
 RETURN userid;
END;
' LANGUAGE 'plpgsql' STABLE CALLED ON NULL INPUT SECURITY INVOKER;


can you advise on steps in general and files location?

Regards
Rushan



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_id=8549
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/

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

  Powered by Linux