[Serusers] double INVITE problem (newbie)

Wojciech Ziniewicz WojtekZ at Optocomp.PL
Sun May 8 01:23:32 CEST 2005


Hello serusers,

In the latest post I did not my self clear. Here's my ser.cfg . I would like
to get ONE INVITE to flag #2 but dont have any idea how to do it. I'm rather
newbie to SER and please be patient :)

Thank you in advance!

main routing from my ser.cfg :
[...]
modparam("acc", "radius_config", "/etc/radiusclient/radiusclient.conf")
modparam("acc", "radius_flag", 2)
modparam("acc", "db_url", "mysql://ser:heslo@localhost/ser")

# main routing logic

route{

	if (uri==myself) {

		if (method=="REGISTER") {
			if (!www_authorize("domenet.pl", "subscriber")) {
				www_challenge("domenet.pl", "0");
				break;
									};
				save ("location");
				sl_send_reply("200","Welcome user.");
					

				break;
					};
			 };
	
	 #if (method == "BYE" | method == "CANCEL") {end_media_session(); };
	
	
	if (method=="INVITE" | method=="BYE" ) { setflag(2); };
	
	if (!method=="REGISTER") { record_route();}
	
		if (loose_route()) 
		{ 
		#if (method=="BYE" ) {
		#setflag(2);
		t_relay(); 
		break; 
		#};
		};	 
	
	

	if (uri=~"^sip:8@*"  { 
	
	if ( method=="INVITE" || method=="ACK"){
		rewritehostport ("192.168.0.163:5060");
		setflag(2);	
		t_relay(); 
		break; };
		
				
		};		

	
									
	
	if (uri=~"^sip:1@*")  { 
		if (method=="INVITE" || method=="ACK"){
		rewritehostport ("192.168.0.166:5060");
		setflag(2);	
		t_relay();
		break;	
						};
	};
	
		
		setflag(2);
	
	if (!lookup("location")) {
	sl_send_reply("404", "Not Found");
	break;
	 };
	 
	 lookup("aliases");
	 
	 if (!t_relay()) {
	sl_reply_error();
	log (1, "...local call");
	};
	 
}






-- 
Pozdrawiam, 
Wojciech Ziniewicz 
Optocomp sp.z.o.o, www.optocomp.pl
mailto: wojtekz at optocomp.pl
+48(0)691031535





More information about the sr-users mailing list