[OpenSER-Users] Usrloc lookup ad parallel forking

Edoardo Serra eserra at exsorsa.it
Mon Oct 15 09:29:47 CEST 2007


Hi Bogdan,
	a very dirty workaround could be disabling the memory cache of usrloc 
module (db_mode = 3) and implement a MySQL trigger to verify if the user 
is 'allowed' to register more than 1 client. If the user is not allowed 
the trigger can block the insert or remove the second registration.

Do you think it's gonna work ? Apart from the performance impact...

A clean solution would be implement a 'max_contacts' parameter on a 
per-user basis that can be looked up in the underlying authenticaion module.

Another useful feature would be adding a registrar parameter to be used 
in conjunction with max_contacts to define if an 'extra' registration 
should be allowed (deleting one of the existing, ordered by Q value or 
by time if desc_time_order is set) or rejected (as now)

What do you think about it ?

Tnx in advance

Regards

Bogdan-Andrei Iancu ha scritto:
> Hi Edoardo,
> 
> AFAIK it is not possible to decide this at runtime, per user - it is a 
> global option.
> 
> regards,
> bogdan
> 
> Edoardo Serra wrote:
>> Tnx, I'd like to allow it only for certain users.
>>
>> I see in 1.3 roadmap that it will be possibile to store some extra 
>> flags for users that would be optimal for my solution, but do you have 
>> an idea on how to do it in openser 1.2 ?
>>
>> Tnx in advance
>>
>> Rebards
>>
>>
>> Marcello Lupo ha scritto:
>>> Hi,
>>> i think it can be possible making some scripting or avp usage in some 
>>> way.
>>> I think it depend most on what event you want to decide if append 
>>> branches or not. It may be user based or something else.
>>> Before you have to decide on what to take the decision and after you 
>>> can start thinking a way to do it.
>>> Bye,o Bogdan
>>> Marcello
>>>
>>> Edoardo Serra wrote:
>>>> Tnx Marcello,
>>>>     sorry for the stupid question, I thought it would have been 
>>>> necessary to also modify the routing script.
>>>>
>>>> Is there a way to decide at runtime to append branches or not ?
>>>>
>>>> Tnx in advance
>>>>
>>>> Edoardo
>>>>
>>>> Marcello Lupo ha scritto:
>>>>> Hi,
>>>>> try to check to modparam("registrar", "append_branches", 0) .
>>>>> It is at 1 by default, but if you keep it to 0 it relay only to one 
>>>>> contact.
>>>>> Hope to help.
>>>>> Bye,
>>>>> Marcello
>>>>>
>>>>>
>>>>> Edoardo Serra wrote:
>>>>>> Hi all,
>>>>>>     I have OpenSER (1.2.2) acting as registrar server.
>>>>>>
>>>>>> If the same user hase more than one AOR I'd like to do parallel 
>>>>>> forking and send the INVITE to every contact I have for that user.
>>>>>>
>>>>>> At the moment my configuration file looks like:
>>>>>>
>>>>>> if (!lookup("location")) {
>>>>>>         sl_send_reply("404", "Not Found");
>>>>>>         exit;
>>>>>> };
>>>>>>
>>>>>> t_on_reply("1");
>>>>>> if (!t_relay()) {
>>>>>>         sl_reply_error();
>>>>>> };
>>>>>> exit;
>>>>>>
>>>>>> but it rely only to the AOR with the highest q value
>>>>>>
>>>>>> It should be a common situation but I cannot find any doc about it.
>>>>>>
>>>>>> Tnx in advance
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> Edoardo Serra
>>>>>>
>>>>>>





More information about the sr-users mailing list