[Kamailio-Users] i want to stop second registration request if user already registered

Daniel-Constantin Mierla miconda at gmail.com
Mon Oct 27 08:21:08 CET 2008



On 10/27/08 09:08, arif.zaman wrote:
> Use the following config:
>
> $var(temp) = $ruri;
> $ruri = $fu;		
> if(registered("location")) {		
> 	sl_send_reply("699", "User Not Found");
> 	xlog("L_NOTICE","ARIF: Already Registered\n");
> 	exit;
> }
> $ruri = $var(temp)
this is not right. That registration might be an update for the existing 
registration. You have to check the contact address, maybe the source IP 
address and port and other attributes of the location record.

All these are available by using truck (development version to be 
released as 1.5.0), see here some examples that can be reused at some 
extent:

http://openser.blogspot.com/2008/10/registrar-enhancements.html

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com





More information about the Users mailing list