<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello Pat, <br>
    </p>
    <p><br>
    </p>
    <p>I think that you can ask them to set the From Name as the
      callerid so you can use transformation to take de information [1]<br>
    </p>
    <p><br>
    </p>
    <p>Example:</p>
    <p>                xlog("FROM NAME: $(hdr(From){nameaddr.name})");<br>
                      xlog("FROM USER: $fU");<br>
      <br>
              <br>
    </p>
    <p>Result (on log):</p>
    <p><br>
    </p>
    <p>l 24 22:06:51 opensipsHomolog2 /usr/local/sbin/opensips[7960]:
      FROM NAME: "1016"<br>
      Jul 24 22:06:51 opensipsHomolog2 /usr/local/sbin/opensips[7960]:
      FROM USER: 101600000393<br>
    </p>
    <br>
    <br>
    After the authentication you can use the uac_replace_from[2] and
    change the callerid that you send you carriers.<br>
    <br>
    <br>
    <br>
    [1] - <a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-Tran-2-2">https://www.opensips.org/Documentation/Script-Tran-2-2</a><br>
    [2] -
    <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/devel/uac.html#idp5265536">http://www.opensips.org/html/docs/modules/devel/uac.html#idp5265536</a><br>
    <br>
    <br>
    <div class="moz-cite-prefix">Em 24/07/17 21:32, Pat Burke escreveu:<br>
    </div>
    <blockquote type="cite"
      cite="mid:8d4725b82a890a5fc9af8438f2498bdb@voxtelesys.com">
      <title></title>
      <div class="iw_mail" dir="ltr">Hello,<br>
        <br>
        As a SIP Provider, we implementing the ability to provide SIP
        trunks to customers with a PBX or Dialer that require
        Registration.  With this in mind,<br>
        the customer wants to be able to set the CallerID on at least on
        the basis of the devices connected tho them, but potentially on
        a per call basis.<br>
        <br>
        For the challenge-response to the non-Register methods, we have
        implemented the script as follows (seems to be a very standard
        way).  My question is<br>
        for the case of the CallerID not being the same as the
        username/authorization name, how do we do this?  Because the
        "FROM" user is different from the<br>
        authorized user, the db_check_from fails.  I don't believe all
        phone systems support P-Asserted-ID, so we can't really go that
        route.  So can we just remove<br>
        the "db_check_from"?   What risk does that expose us to?<br>
        <br>
        <pre style="background-color:#ffffff;color:#000000;font-family:'DejaVu Sans Mono';font-size:11.3pt;">if ( !(is_method("REGISTER")) ) {
  if (is_from_local("$var(reg_domain_attr)")) { # from Registered device
      $avp(callee_number_type) := "Registered";

      # authenticate if from local subscriber
      # authenticate all initial non-REGISTER request that pretend to be
      # generated by local subscriber (domain from FROM URI is local)
      if (!proxy_authorize("", "subscriber")) {
         proxy_challenge("", "0");
         exit;
      }

      if (!db_check_from()) {
         sl_send_reply("403","Forbidden auth ID");
         exit;
      }

      consume_credentials();
      # caller authenticated
   }
}
</pre>
        <span data-mce-style="color: #808080; font-family:
          arial,helvetica,sans-serif; font-size: 11pt;" style="color:
          rgb(128, 128, 128); font-size: 11pt;">Regards,</span>
        <div class="signature">
          <div style="font-family: arial, helvetica, sans-serif;
            font-size: 16px;">
            <span data-mce-style="color: #808080; font-family:
              arial,helvetica,sans-serif; font-size: 11pt;"
              style="color: rgb(128, 128, 128); font-size: 11pt;"><strong>Pat
                Burke</strong></span><br>
            <br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <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>
    <div class="moz-signature">-- <br>
      <br>
      <br>
      ​Atenciosamente,<br>
      <img alt="WSU TECNOLOGIA"
src="http://www.wsu.com.br/wp-content/uploads/2012/09/logo_wsu_assintarua.jpg"
        title="WSU TECNOLOGIA" border="0"><br>
      <span style="font-family:arial,helvetica,sans-serif">Mike Tesliuk<br>
        <span style="font-size:8pt">Rua Visconde do Rio Branco
          1630 . Sala 1302 . Curitiba . PR  <br>
          12387 SW 125th ter, Miami, Florida 33186 - USA</span></span><br>
      <span style="font-family:arial,helvetica,sans-serif"><span
          style="font-size:8pt">tel +55 (41) 3941.0650   +1 (786)
          719.6253 </span></span><br>
      <strong><a href="http://www.wsu.com.br/" style="color: rgb(240,
          78, 35); text-decoration: none;" target="_blank">website</a>  |  <a
href="https://www.google.com.br/maps/place/WSU+Tecnologia/@-25.4354389,-49.2779048,17z/data=%213m1%214b1%214m2%213m1%211s0x94dce473a24cf705:0x369fdf05247b568b?hl=pt-BR"
          style="color: rgb(240, 78, 35); text-decoration: none;"
          target="_blank">mapa</a>  |  <a
          href="mailto:contato@wsu.com.br" style="color: rgb(240, 78,
          35); text-decoration: none;" target="_blank">email</a>    </strong><br>
      .<br>
      <br>
    </div>
  </body>
</html>