All pastes #489955 Raw Edit

xpot

public text v1 · immutable
·published 2007-05-15 19:48 UTC
rendered paste body
# --> 
# Added by xpot 2007/05/08
# Dispatcher: Forward Register Requests
modparam("dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list")
# Dispatcher: Enable Failover-Support
#modparam("dispatcher", "flags", 2)
# !-->
 ...

# --> 
	# Added by xpot 2007/05/01
	route {
       	if ( ! mf_process_maxfwd_header( "10" ) ) {
              	 sl_send_reply( "483", "To Many Hops" );
               	drop( );
		       };

       	ds_select_dst("1","0");
       	#ds_select_domain( "1", "0" );

       	forward(uri:host,uri:port);
       	#t_relay( );
		}	
# This was from Doc: Asterisk load balancing and High Availablility with OpenSER
	#	if (method=="INVITE") 
	#	{
	#		# dst_select( "GROUP", "HASH METHOD")
  	#		dst_select("1","4");
  	#		sl_send_reply("100","Trying");
  	#		forward(uri:host,uri:port);
  	#		exit();
	#	};
	# dispatcher for 300 Redirect
	# in this fashion, you can put in a very inexpensive load-balancer for your ast units
	# if (method=="INVITE") {
	# dst_select_domain("1","4");
		# you can also add prefixes, if you need to send account codes
		# like:
		# prefix("123456");
	# sl_send_reply("300","Redirect");
	# exit();
	# }
# !-->