<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>My idea for now is using DROYTUNG for all trunks because i have
      to work with prefix and priorities.</p>
    <p>Then in failure route use <b>uac_auth</b> function for user
      password trunks</p>
    <p>?<br>
    </p>
    <pre class="moz-signature" cols="72">---
I'm SoCIaL, MayBe</pre>
    <div class="moz-cite-prefix">El 29/02/2024 a las 6:30 p. m.,
      Jehanzaib Younis escribió:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKrJzCw1=K=StqSL3bC_D_OvH2VH2QUU3xD+ZqZ0bN4OvR2OtA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>You can use drouting for IP based authentication trunks. </div>
        <div>For username/password based i think you can use digest_auth
          somethin like</div>
        <div><br>
        </div>
        <div>digest_domain("MySIPTrunkRealm", "<a
            href="http://sip.trunk1.com" moz-do-not-send="true">sip.trunk1.com</a>",
          "username1", "password1")<br>
          digest_domain("MySIPTrunkRealm", "<a
            href="http://sip.trunk2.com" moz-do-not-send="true">sip.trunk2.com</a>",
          "username2", "password2")<br>
        </div>
        <div><br>
        </div>
        <div>in the routing you can do something like the following:- </div>
        <div><br>
        </div>
        <div>if (is_method("INVITE") && has_totag()) {<br>
        </div>
        <div>         $var(dest_ip) = $si;<br>
        </div>
        <div>         if (!digest_auth_check("$var(dest_ip)",
          "MySIPTrunkRealm", "username", "password")) {<br>
                      xlog("L_ERR", "Failed to authenticate call to
          $var(dest_ip)\n");<br>
                      sl_send_reply("403", "Forbidden");<br>
                      exit;<br>
                   }<br>
          <br>
                  # Route the call to the trunk<br>
                  route(SOME_OTHER_ROUTE);</div>
        <div>}</div>
        <div><br>
        </div>
        <div><br clear="all">
          <div>
            <div dir="ltr" class="gmail_signature"
              data-smartmail="gmail_signature">
              <div>Regards,</div>
              <div>Jehanzaib</div>
            </div>
          </div>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2024 at
          12:21 PM Social Boh <<a href="mailto:social@bohboh.info"
            moz-do-not-send="true" class="moz-txt-link-freetext">social@bohboh.info</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">First
          reply;<br>
          <br>
          UAC, UAC AUTH and DROUTING Modules<br>
          <br>
          ?<br>
          <br>
          ---<br>
          I'm SoCIaL, MayBe<br>
          <br>
          El 29/02/2024 a las 4:05 p. m., Social Boh escribió:<br>
          > Hello list,<br>
          ><br>
          > I have to make calls to PSTN using trunks con IP auth y
          trunks with <br>
          > user and password<br>
          ><br>
          > I'd like use DROUTING module but I don't know how solve
          user/password <br>
          > auth trunk<br>
          ><br>
          > Any idea?<br>
          ><br>
          > Thank you<br>
          ><br>
          > Regards<br>
          ><br>
          <br>
          _______________________________________________<br>
          Users mailing list<br>
          <a href="mailto:Users@lists.opensips.org" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
          <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></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>
  </body>
</html>