Hi Ivan,
What Kamailio version are you using? If 4.4.2 maybe take a look at the thread I started a
few weeks back:
http://lists.sip-router.org/pipermail/sr-users/2016-July/093682.html
TL;DR: The 4.4.2 release of the permissions module contains some bugs which are already
fixed by Daniel in the repository. So in case you are also dealing with issues caused by
this bug you can either manually compile the latest GIT version or just use 4.4.1 for now
and wait for the 4.4.3 release.
Best Regards,
Tim Balmer
Van: sr-users [mailto:sr-users-bounces@lists.sip-router.org] Namens Ivan Dudko
Verzonden: woensdag 14 september 2016 09:49
Aan: sr-users(a)lists.sip-router.org
Onderwerp: [SR-Users] Permissions module question
Hello!
I am new to kamailio and trying to use it vanilla config.
Now main question is how to use ip based auth.
I found recent post of Daniel-Constantin Mierla:
http://lists.sip-router.org/pipermail/sr-users/2011-December/071147.html
Here he recommends to use 'address' table from permissions module,
I try yo use advice and add this lines at config begin:
#!define WITH_MYSQL
#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio"
#!define WITH_AUTH
#!define WITH_IPAUTH
#!define WITH_USRLOCDB
Database is created and kamailio can access it.
I am add user 1000 to kamailio via kamctl and successful register it with soft-phone.
I create trunk without registration to kamailio on asterisk server. And trying to call
from asterisk to user 1000. Call is successful. I try to create file
/etc/kamailio/permissions.deny with content 'ALL : ALL'. And retry previous call.
It still sucessful. I try to add record with asterisk address to 'address' table
with group 1. And retry previous call. It still sucessful.
I am confused. I do not now how to disable any address for ip_auth except if it in the
'address' table. And allow any address with if it request kamailio with
registration.
--
Best Regards,
Ivan Dudko