[OpenSIPS-Users] Permissions module calling route reload

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Jun 13 13:29:41 CEST 2012


Hi,

When using the files for permissions, you cannot do a reload at runtime 
- to get around it, better use the allow_trusted() or allow_address() - 
they load data from DB and you can reload via MI using the 
reload_trusted or reload_address. See:
         
http://www.opensips.org/html/docs/modules/1.4.x/permissions.html#id272244

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com


On 06/13/2012 06:36 AM, 刘子尘 wrote:
> Hello
>
> My opensips version is 1.4.5.
>
> I use the permissions module to control the call permission,and use 
> the allow_routing() functions in the opensips.cfg.I use the default 
> permissions file(permissions.allow and permissions.deny).But when I 
> add a new rule into the files,I must restart the opensips server and 
> the it can works.I want add a new MI function in order to reload the 
> rules in the permissions files to the memory realtime.But it doesn't 
> work.Maybe because opensips server has multi-processes,the MI function 
> may reload the rules to only one process's memory and not the all 
> processes.Then I read the source code and find that it has 2 
> memory_malloc function:pkg_malloc and shm_malloc,and the 
> allow_routing() functions use the first one.So I modify it to the 
> shm_malloc and I think it maybe insert the rules to the all 
> processes's memory,but it fails ,too.Can somebody give me some 
> suggestions how to reload the rules in the permissions file to the 
> momory and doesn't need to restart the opensips server?
> The attachment is the source code files that I has modifyed.
>
> Thanks
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120613/5b6d029e/attachment.htm>


More information about the Users mailing list