[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  Koochy Black <koochy@a...>
 Subject :  Re: [yate] Creating Handler when routing is done in database
 Date :  Tue, 18 Aug 2009 19:15:33 +0200
@Monica:
Sorry for the late reply....Thank you very much for your Help.
I'm now checking the userauth in the preroute. It's looking, if the
ip_address of the caller, is in the location field of users tabel or if
the username is in teh accounts table.
But I've still one problem...when a call is made from H323...the
parameter ${ip_host} is empty....is this only working with sip?

Thank you again!

monica schrieb:
> Hi,
>
> Nop, resource subscribe is used when sip users are subscribed to
> events from other users.
>
> You must add this in the call.route section (check the username param,
> if empty return error=noauth), or else route the call normally.
>
> Monica Tepelus
>
> Koochy Black wrote:
>> Hi again,
>>
>> I'm trying to block unauth users to make calls over our server. Routing
>> is done per database, mysql.
>> In regexrout.conf there was the [extra] section where I could list some
>> handlers...and it was possible to insert
>> a line ${username}=-;error=noauth  in the sections..how do I realise
>> this in mysql/register.conf
>>
>> I've seen the [resource.subscribe] section, is this suitable?
>> Table:
>>
>> id    |    event    |    operation    |    expires    |   
>> subscriber   |    notifier    |    notifito     |    data
>> ------------------------------------------------------------------------------------------
>>
>> 123 | user.auth |    ${username}^$=-;error=noauth | 999 | user1 | ? |
>> ? | ?
>>
>> Is this correct?
>>
>> Thanks in Advance
>>