<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    <font face="monospace">Hi Wadii,<br>
      <br>
      For the calls received from the TRUNKs (so via address table IPs),
      use the db_aliases module to translate from DID to user and after
      that do lookup("location").<br>
      <br>
      Regards,<br>
    </font>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
OpenSIPS Bootcamp 5-16 Dec 2022, online
  <a class="moz-txt-link-freetext" href="https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/">https://www.opensips.org/training/OpenSIPS_eBootcamp_2022/</a></pre>
    <div class="moz-cite-prefix">On 11/12/22 4:47 PM, Wadii ELMAJDI |
      Evenmedia wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:MR1P264MB3585BB8A415EEB76AFEA0B3BCE039@MR1P264MB3585.FRAP264.PROD.OUTLOOK.COM">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
        255, 255);" class="elementToProof ContentPasted0">
        Hello ,<br>
        <br>
        I would like to know what would be the best method for such use
        case : <br>
        My opensip box will play a sip proxy ROLE, handling inbound
        calls fom pstn to my clients (B2BUA PBXs).<br>
        My clients will have to register as some of them dont have a
        static ip.<br>
        <br>
        Client (Asterisk) (A) <==== Registration =====> OPEN SIP
        (B)  <===========> PSTN Trunk (C)<br>
        <br>
        Call sequence is from C to A.<br>
        <br>
        What i'm thinking is the best method, is to create my clients as
        subscribers with my server IP As the domain in order to skip the
        outbound_proxy config for my clients.<br>
        <br>
        The PSTN trunk is using ip auth, i will just have to add its ip
        on my address table.<br>
        <br>
        My question is  how am i supposed to route calls to my clients
        based on the called number ?  <br>
        The only module that does routing rule processing with
        priorities, prefix etc... is DR, but it only route calls to
        gateways.<br>
        <br>
        The alias_db is what is supposed to be used to route calls to
        subscribers, but it has no prefix, that means if i have 500Did ,
        i have to add each one of them to dbaliases table.<br>
        <br>
        Thanks for the help.<br>
        <br>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>