Re: RAS configuration: on RRQ

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

 



Hey Pierlu,

If I remember correctly I did it in a way similar to this... I added an 
extra dialedDigits field in the database table just for identifying the 
endpoint and then did the query like this:

SELECT 1, aliases FROM sqlauth WHERE ',{%aliases},' LIKE 
CONCAT('%%,',dialedDigits ,',%%')

I had of course all of the aliases I wanted for the endpoint in the 
aliases field of the database and the dialedDigits field had just the 
primary dialedDigits value. Oh well... at least this was the idea behind 
how I did it.

I had to do it like this because of course endpoints usually had at 
least three different aliases and there were no guarantees that the 
endpoints would always provide them in the same order.

Or then again this might work too if you just want to check for the one 
primary alias and let the endpoint keep the aliases it provided:

SELECT 1,'{%aliases}' FROM sqlauth WHERE ',{%aliases},' LIKE 
CONCAT('%%,',dialedDigits,',%%')

- Esa

pierlu kirjoitti:
> Hello everybody.
> 
> I am trying to configure RAS so to register only specific endpoints
> which are already present in a Mysql Database. So i inserted the
> following lines in the GnuGK configuration file:
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> [Gatekeeper::Auth]
> SQLAuth=sufficient;RRQ
> 
> [SQLAuth]
> Driver=MySQL
> Host=xx.xxx.xxx.xx:3306
> Database=test
> Username=user
> Password=password
> RegQuery=SELECT accept, aliases from sqlauth WHERE orig_aliases='%{aliases}';
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> But not all of the endpoints in the zone behave in the same way, so
> that the queries which are sent to the Mysql database are different
> from each other when the %{aliases} is expanded. I.e.
> 
> SELECT accept, aliases from sqlauth WHERE orig_aliases='DAgustin,4011'
> SELECT accept, aliases from sqlauth WHERE orig_aliases='4006'
> SELECT accept, aliases from sqlauth WHERE orig_aliases='2220,TorinoPMN'
> 
> The preceding queries refers to registration attempts by Mirial
> Softphone, PacPhone and an Aethra Codec respectively.
> 
> I would like to avoid inserting different informations in the database
> for each different endpoint and i would also like to avoid the use of
> LIKE in SQL statements.
> 
> I thoughts that the AliasFilterType directive would have helped in
> this case so i added to the configuration file the following lines,
> just before the [Gatekeeper::Auth] lines
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> [RasSrv::RRQFeatures]
> AliasTypeFilter=terminal;dialeddigits
> 
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
> 
> I hoped that by using the preceding line, the %aliases would be
> expanded to dialeddigits only, but it's not so.
> 
> Do you have any suggestions to try to even out this situation? I tried
> also using SQLAuth on GRQ, but it seems it's of no use.
> 
> Thanks for any help. Pierlu
> 
> p.s. GnuGk is version 2.3.0
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________________
> 
> Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
> Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
> Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
> Homepage: http://www.gnugk.org/
> 


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
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