On May 13, 2005 at 15:17, Hendrik Scholz <hendrik.scholz(a)freenet-ag.de> wrote:
Hi!
I'm playing around with the dispatcher module and got it working but ran
into some expected problems.
Once I load-balance registrations I do run into the situation that
I won't be able to know where to redirect an INVITE, i.e. due to aliases.
If I use 'touri' to balance registers (let's pretend all registers
have usernames not phone numbers) I can spread those (almost) evenly
across multiple servers.
Once I receive an invite for a username I can use the dispatcher
function with the 'touri' hash to properly forward the request.
What happens if I INVITE a phone number?
A user might have an alias (aka his phone number) but since he
registered with his username and all we know in the INVITE is the
phone number the hashes might differ.
Balance the REGISTERs after the to uri and the INVITEs after the request
uris (ds_select_dst("..", "3"), not documented but present in
unstable).
If the uri is an alias (e.g. lookup("aliases") returns true) balance the
message again after the request uri/send it back to the load balancer.
An extra round trip might be involved, but if your users don't use
aliases very often it might not be an issue.
Andrei