[OpenSIPS-Users] better solution possible? => lookup and routing with 2 location databases

Bogdan-Andrei Iancu bogdan at voice-system.ro
Sun Jun 14 19:59:34 CEST 2009


Hi Uwe,

I think the problem is in the branch management. If I get is right, you 
get the records from locinternal table and if records are present in 
location, you fork a branch to the other server, right ?

If so, you do something like :

route[1] {
if (!loose_route()){
 rewritehostport("domain1.de");
 $var(x) = $rU+"@domain2.de";
 lookup("locinternal");
 if (registered("location","$var(x)")) {
      $rb = $var(x);
 }
}

See: http://www.opensips.org/html/docs/modules/1.5.x/registrar.html#id271315

Regards,
Bogdan

Uwe Kastens wrote:
> Hi,
>
> Perhaps somebody has a better idea to solve the following issue. I have
> two opensips servers. UA can register at both opensips with different
> domains and credentials.
>
> opensips1 will get the calls from pstn and should route them to
> opensips2 , if the UA is registered as well with opensips2.
>
> I would like to have parallel invites to all registered UAs. But the
> invites should come from that opensips, with which the UA is registered.
>
> 1st I was wondering, why a call is forked to opensips2 as well, even if
> no UA is registered there. I think it might be caused by the
> rewritehostport("domain2.de") which is working on the current URI?
>
> route[1] {
> if (!loose_route()){
>  rewritehostport("domain1.de");
>  if lookup("locinternal") {
>   append_branch();
>   }
>   rewritehostport("domain2.de");
>     if (registered("location")) {
>       append_branch("$rU at domain2.de");
>      }
> }
>
>    if (!t_relay()) {
>     sl_reply_error();
>     };
>   t_on_reply("1");
> }
>
>
> BR
>
> Uwe
>   




More information about the Users mailing list