[OpenSIPS-Users] Double Registration transaction

bay2x1 rod at racequeen.ph
Tue Mar 17 01:21:27 CET 2009


Using the ngrep tool I was able to capture two request generated for every
registration so I am getting two Register + 401 and Register + 200 OK.



Bogdan-Andrei Iancu wrote:
> 
> Hi,
> 
> Why do you say is executed twice?? Maybe you mistake the 2 REGISTERs 
> because of the authentication process... REGISTER + 401 ; REGISTER + 200
> OK
> 
> using the syslog the xlog("Registration Process ends here! \n"); code is
> twice printed everytime a registration occurs.
> Is this okay? 
> 
> 
> 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");
>> 	};
>> }
>>   
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Double-Registration-transaction-tp2484223p2489181.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.




More information about the Users mailing list