[OpenSER-Users] HELP - OpenSER 1.3 not parallel forking?

Daryl Sanders daryl.sanders at gmail.com
Sun Mar 9 15:47:53 CET 2008


Hi All,

I am testing parallel forking so I can setup ring groups, but it seem
I cannot get OpenSER 1.3 to parallel fork contacts of the same
q-value. It always seem to use the first record found in MySQL, and
ignores all others. I have tried adding append_branch after
lookup("location") , but that did not seem to help. I've also done
ethereal captures and confirmed that it is only sending an INVITE to
the first contact in MySQL (I've tried db_mode 3 and 1). I'm know I'm
missing something, but not sure what.

I've included relevant portions of my test config below. Any help
would be greatly appreciated.

Regards,
Daryl




route {

# -----------------------------------------------------------------
# Sanity Check, NAT Check & General Routing
# -----------------------------------------------------------------

	if (!mf_process_maxfwd_header("10")) {
		sl_send_reply("483", "Too Many Hops");
		exit;
	}

	if (msg:len > max_len) {
		sl_send_reply("513", "Message Overflow");
		exit;
	}

	if (nat_uac_test("19")) {
		setbflag(6);
		xlog("L_INFO", "NAT CLIENT - M=$rm RURI=$ru F=$fu T=$tu IP=$si\n");
	}

	if (method=="INVITE" || method=="ACK" || method=="BYE") {
		setflag(1);
	}

	if (method!="REGISTER") {
		record_route();
	}

	if (loose_route()) {
            xlog("L_INFO", "LOOSE ROUTING - M=$rm RURI=$ru F=$fu T=$tu
IP=$si ID=$ci\n");
            if (!t_relay()) {
                    sl_reply_error();
            }
            exit;
	}

	if (method=="REGISTER") {
		route(2);
		exit;
	} else if (method=="INVITE") {
		route(3);
		exit;
	}

	route(1);
	exit;
}


route[1] {

# -----------------------------------------------------------------
# Default Message Handler
# -----------------------------------------------------------------

	if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &&
!search("^Route:")){
		sl_send_reply("479", "We don't forward to private IP addresses");
		exit;
	}

	t_on_reply("1");
	t_on_failure("1");

	if (!t_relay()) {
		sl_reply_error();
	}
	exit;
}


route[2] {

# -----------------------------------------------------------------
# REGISTER Message Handler
# -----------------------------------------------------------------

	sl_send_reply("100", "Trying");

	if (!www_authorize("","subscriber")) {
		www_challenge("","0");
		exit;
	}
	consume_credentials();

	if (!save("location")) {
		sl_reply_error();
	}

	xlog("L_INFO", "REGISTER - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
}


route[3] {

# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------

	xlog("L_INFO", "INVITE - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");

	# Trusted IP
	if (src_ip==xxx.xxx.xxx.xxx) {
		strip(2);
		xlog("L_INFO", "FROM PSTN - M=$rm RURI=$ru F=$fu T=$tu IP=$si\n");
	} else {
		if (!proxy_authorize("","subscriber")) {
			proxy_challenge("","0");
			exit;
		}
		consume_credentials();
	}


	if (lookup("location")) {
		xlog( "L_NOTICE", "USER FOUND - M=$rm RURI=$ru F=$fu T=$tu IP=$si\n");
	} else {
		xlog( "L_NOTICE", "USER NOT FOUND! - M=$rm RURI=$ru F=$fu T=$tu IP=$si\n");
	}


	if (isbflagset(6) || !lookup("location")) {
		xlog( "L_NOTICE", "RELAYING MEDIA - M=$rm RURI=$ru F=$fu T=$tu IP=$si\n");
		route(4);
		exit;
	}

	route(1);
	exit;
}


route[4] {

# -----------------------------------------------------------------
# PSTN Handler
# -----------------------------------------------------------------

	force_send_socket(xxx.xxx.xxx.xxx:5060);
	xlog("L_NOTICE", "FORWARDING TO PSTN\n" );

	ds_select_domain("1","0");
	route(1);
	exit;
}




More information about the Users mailing list