On Mon, Nov 21, 2016 at 07:14:57PM +0000, Andrei Mahalean wrote:
> I have my pilot DID setup and registered with Kamailio ok and I can make
> calls in and out through my PSTN gateway, but I'm unsure how to group all
> the other DID's so they are matched against the pilot DID.

You can use dbaliases for that, something like this:

if (is_method("INVITE"))
{
 if(!lookup("location"))
 {
  if(!alias_db_lookup("dbaliases"))
  {
   send_reply("404","Not Found");
  }
 }
}

How to communicate the DID with the destination depends on how the
destinations want it. Easiest is to store $rU before
lookup/alias_db_lookup (which override $rU with the username) and simple
set $rU to stored value:

$avp(callednumber)=$rU;
lookup/dbaliases logic
$rU=$avp(callednumber);

If a destination want the number in the To: header, you probably don't
have to do anything.

All this is assuming trunk registers to kamailio.


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to