[OpenSIPS-Users] Double Registration transaction

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Mar 16 09:22:39 CET 2009


Hi,

Why do you say is executed twice?? Maybe you mistake the 2 REGISTERs 
because of the authentication process... REGISTER + 401 ; REGISTER + 200 OK

Regards,
Bogdan

bay2x1 wrote:
> 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");
> 	};
> }
>   




More information about the Users mailing list