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

Uwe Kastens kiste at kiste.org
Sun Jun 14 14:13:26 CEST 2009


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

kiste lat: 54.322684, lon: 10.13586



More information about the Users mailing list