Hello all,
We are moving our registration and location services to dedicated instances geographically
separate from our proxies and then using redirects to locate the registered user. The
idea is to protect the proxies from a potential thundering herd of registrations if there
was some network outage I’m using dispatcher to find a registrar that has a registration
for the user, if a user is not locally registered a 503 is returned and the next server is
contacted. Registrations are replicated to other servers when the client is not behind
NAT. If the client is behind NAT, the registrar where the client initially registered
performs keep-alives and NAT traversal and also acts as an outbound proxy instead of
sending a redirect.
I’m attempting to simplify the configuration by using a dispatcher group to classify
incoming registrations and to select replication targets but the registrar that initially
received the request is in the group as well. Is there an elegant way to chose all
destinations except the local instance? I’m currently doing this with the hack below but
any suggestions would be greatly appreciated.
Also, if anyone has any comments or recommendations on the topology, please share!
Thanks,
Spencer
if (isflagset(FLT_FROMREG))
return;
subst('/^From:(.*)sip:.*@[a-zA-Z0-9.:]+(.*)$/From:\1sip:$au@DOMAIN\2/ig');
subst('/^To:(.*)sip:.*@[a-zA-Z0-9.:]+(.*)$/To:\1sip:$au@DOMAIN\2/ig’);
$rd = "DOMAIN";
$var(local_uri) = "sip:" + $Ri + ":" + $Rp;
ds_select_dst("10", "4");
if ($du != $var(local_uri)) {
t_replicate($du);
}
while (ds_next_dst()) {
if ($du != $var(local_uri)) {
t_replicate($du);
}
}
Show replies by date