[OpenSIPS-Users] Double Registration transaction

bay2x1 rod at racequeen.ph
Mon Mar 16 06:36:12 CET 2009


I tried creating my own registration configuration. Using the ngrep tool I
was able to capture the header packets.  I am wondering why the route(1) is
executed twice everytime that a client registers. This is the code I am
using for registration.


route{

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

	if(method=='REGISTER'){
		
		route(1);
	}
}

route[1] {   
	if(is_uri_host_local()) {
	xlog("Registration Process starts here! \n");
		if(!www_authorize("", "subscriber"))
		{else if (method=='INVITE') {
		
		route(2);
	};
			www_challenge("","1");
			xlog("Registration Process ends here! \n");
			exit;
		};

		if(!check_to()) {
			sl_send_reply("403", "Forbidden");
		};
		save("location");
		exit;
	} else if {
		sl_send_reply("403", "Forbidden");
	};
}
-- 
View this message in context: http://n2.nabble.com/Double-Registration-transaction-tp2484223p2484223.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.




More information about the Users mailing list