[SR-Users] users with or without asterisk integration on the same kamailio database

Daniel Tryba d.tryba at pocos.nl
Fri Jun 19 10:18:10 CEST 2015


On Thursday 18 June 2015 22:35:11 Asterisk wrote:
> Could you show me some tutorials or reference websites?

It depends on your setup, but most likely you can do this source based, 
something like this:

route[AUTHENTICATE]
{
 if($si=asteriskip)
 {
  if (!www_authenticate("$td", "asteriskrttable"))
  {
   www_challenge("$td", "1");
  }
 }
 else
 {
  if (!www_authenticate("$td", "othertable"))
  {
   www_challenge("$td", "1");
  }
 }
}

route[LOCATION]
{
 if (!lookup("asteriskrtlocation") && !lookup("otherlocation"))
 {
  ...
 }
}

route[REGISTER]
{
 if($si=asteriskip)
 {
  save("asteriskrtlocation");
 }
 else
 {
  save("otherlocation");
 }
}




-- 

Telefoon: 088 0100 700
Sales: sales at pocos.nl | Service: servicedesk at pocos.nl
http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 
17097024




More information about the sr-users mailing list