[OpenSIPS-Users] Registration permissions per username
Răzvan Crainea
razvan at opensips.org
Fri Jul 5 08:28:06 EDT 2019
Hi, Alexey!
Getting back to your question regarding doing this based using
permissions, you can use the `pattern` argument in the `check_address()`
function[1] to match against the `pattern` field in the database[2].
Hope this helps you.
[1]
https://opensips.org/html/docs/modules/2.4.x/permissions.html#func_check_address
[2]
https://www.opensips.org/Documentation/Install-DBSchema-2-4#GEN-DB-ADDRESS
Best regards,
Răzvan
On 7/2/19 12:10 PM, Alexey Kazantsev via Users wrote:
> Being more accurate, it's worth mentioning the following:
>
>
> * SIP-accounts:
> --------------------------------------------
> lexus at alexeyka.zantsev.com
> lexus2 at alexeyka.zantsev.com
> lexus3 at alexeyka.zantsev.com
>
>
> * register.deny file contents:
> --------------------------------------------
> ALL : ALL
>
> * register.allow file contents:
> --------------------------------------------
> # works and allows both lexus and lexus2 to REGISTER
> "^sip:lexus[23]?@alexeyka.zantsev.com" : ALL
>
> # DOESN'T work, though the regexp seems to be correct
> "^sip:lexus[\d]?@alexeyka.zantsev.com" : ALL
>
>
>
> -----------------------------------------------
> BR, Alexey
> http://alexeyka.zantsev.com/
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
More information about the Users
mailing list