<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=GB2312" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>Hi,<br>
      <br>
      I see - than use dialplan module
      (<a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.4.x/dialplan">http://www.opensips.org/html/docs/modules/1.4.x/dialplan</a>) - you
      can define a set of regexps you can test from script against
      whatever info (like RURI in your case) - so you can use it to
      control the routing. And the module has&nbsp; a reload mi command -
      dp_reload.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
    <br>
    On 06/18/2012 10:14 AM, Áõ×Ó³¾ wrote:
    <blockquote
cite="mid:CAB2WX4qvmj2SUXWpzchimEZZMX9iNg-LCbGcZzRWruMzwddjzQ@mail.gmail.com"
      type="cite">Hi,<br>
      <br>
      Thanks for your reply.But in my system,I want to determine the
      call route by the from and R-URI,so I must use allow_route().The
      allow_trusted() and allow_address() don't fit for my
      requirement.And I want to know why the allow_route() must use the
      permissions file,and doesn't use the DB store like the
      allow_trusted() and allow_address()?<br>
      <br>
      Thanks<br>
      <br>
      <div class="gmail_quote">2012/6/13 Bogdan-Andrei Iancu <span
          dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span><br>
        <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
          0.8ex; border-left: 1px solid rgb(204, 204, 204);
          padding-left: 1ex;">
          <div bgcolor="#ffffff" text="#000000"> <tt>Hi,<br>
              <br>
              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:<br>
              &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
              <a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/1.4.x/permissions.html#id272244"
                target="_blank">http://www.opensips.org/html/docs/modules/1.4.x/permissions.html#id272244</a><br>
              <br>
              Regards,<br>
            </tt>
            <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
            <div>
              <div class="h5"> <br>
                On 06/13/2012 06:36 AM, Áõ×Ó³¾ wrote: </div>
            </div>
            <blockquote type="cite">
              <div>
                <div class="h5">Hello<br>
                  <br>
                  My opensips version is 1.4.5.<br>
                  <br>
                  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?<br>
                  The attachment is the source code files that I has
                  modifyed.<br>
                  <br>
                  Thanks </div>
              </div>
              <pre><fieldset></fieldset>
_______________________________________________
Users mailing list
<a moz-do-not-send="true" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
  </body>
</html>