[Users] Dispatcher module - Does it actually work?

Douglas Garstang dgarstang at oneeighty.com
Thu Nov 24 18:53:19 CET 2005


The request URI from the phones is always going to be the same. Doesn't that mean that OpenSER will always just use the same Asterisk box then? I'm trying to round-robin as evenly (as possible) and distribute call load amonst multiple Asterisk systems.

	-----Original Message----- 
	From: Daniel-Constantin Mierla [mailto:daniel at voice-system.ro] 
	Sent: Thu 11/24/2005 10:25 AM 
	To: Douglas Garstang 
	Cc: users at openser.org 
	Subject: Re: [Users] Dispatcher module - Does it actually work?
	
	

	On 11/24/05 01:37, Douglas Garstang wrote:
	> After many many fruitless hours spent on trying to get OpenSER to work with DNS SRV records (I made a post to the group earlier today on this), I stumbled across the dispatcher module, and have been trying to get it to work instead.
	> 
	> The module was designed to load balance, right? It doesn't seem to have been designed very well, unless I am missing something.
	>  
	If you read carefully the documentation of the module, you will see the
	scope and limitations of the module:
	http://openser.org/docs/modules/1.0.x/dispatcher.html
	
	If something is not according to the documentation, then it is a bug.
	Stateless means that the module does not keep any state, so it cannot
	select the same destination using algorithm 4 (round robin) after a
	authentication request, choose another algorithm (hashing r-uri,
	callid). Also, being stateless, it cannot try the next address if the
	selected destination fails.
	
	The module was not designed to be load balancer, but a request
	dispatcher. Load balancing is something more complex.
	
	In the last weeks I added destination failover support in dispatcher
	(serial forking within the destination set, with auto-detection of
	failed destinations). It will be on cvs very soon, I have to update the
	documentation and do some testing.
	
	Cheers,
	Daniel
	
	> 
	> If you set the algorithm with ds_select_dst() to 4, round robin, it doesn't work! Here's what happens.
	> 
	> 1. UA sends INVITE to OpenSER
	> 2. OpenSER forwards INVITE to the first proxy in the dispatcher list.
	> 3. Proxy sends back a digest challenge for authorisation credentials to OpenSER.
	> 4. OpenSER forwards the challenge back to the UA.
	> 5. The UA sends the INVITE again to OpenSER, this time with the requested credentials.
	> 6. OpenSER forwards the new INVITE to the _OTHER_ proxy in the dispatcher list.
	> 
	> This is where things start to fall over. This proxy has not issued a challenge request yet so it _again_ sends a digest challenge back to the UA through OpenSER. The UA does not like to receive a second challenge to what it's already sent and gives up.
	> 
	> If you set the algorithm to something else besides 4, say 0, to hash to the callid, then OpenSER tries to use an arbitrary proxy from the list. Given that it's hashed against the callid it doesn't switch proxies like it does above in mid call. However, if that proxy is down, it _NEVER_ tries another proxy, thus rending the dispatcher module as a load balancer completely useless.
	> 
	> If this module was designed to be a load balancer, how have people gotten it to work? I find it incredibly hard to believe that the dispatcher module was not designed with the above scenarios in mind. I'm so frustrated because what I am trying to do is so simple (had issues with SRV behaving in a similar way). Send requests from OpenSER to another proxy/pbx in a redundant and load balanced fashion. If a system is down, simply go to the next! It's that simple!
	> 
	> Btw, the 'proxy' that OpenSER is forwarding too is Asterisk (yeah ok so it isn't a proxy) and the UA's are Polycom 301/501/601 phones.
	> 
	> Help very much appreciated!
	> 
	> Thanks.
	> 
	> 
	>  
	> ------------------------------------------------------------------------
	>
	> _______________________________________________
	> Users mailing list
	> Users at openser.org
	> http://openser.org/cgi-bin/mailman/listinfo/users
	>  
	



More information about the sr-users mailing list