[OpenSIPS-Users] Registered trunks

Pat Burke pat at voxtelesys.com
Mon Jul 24 20:32:20 EDT 2017


Hello,

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,
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.

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 
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 
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 
the "db_check_from"?   What risk does that expose us to?


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
   }
}

Regards,Pat Burke



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170724/a9f924cc/attachment.html>


More information about the Users mailing list