[sr-dev] Implementation question / usrloc / registrar
lists at bock.info
Wed Feb 9 09:27:34 CET 2011
the current implementation of modules_s/usrloc does not require any
additional DB-Lookup. The data is simply kept with all the other data
of a contact.
The stored AVP's are serialized to a string and stored in an extra
column together with all the other data....
I thought about this implicit loading as well, but you should consider
the following point (which at least applies for my usecase): I need to
access those values for both originating (from the CPE to server) and
terminating (from the server to the CPE) case. So probably the
implicit loading of the AVP's might be a good thing...
I think it is not a good idea to store all AVP's automatically. In
some setups we used to make quite a lot use of the AVPs with about
having 40 AVP's for a dialog....
2011/2/8 Klaus Darilion <klaus.mailinglists at pernau.at>:
> Carsten Bock wrote:
>> In order to save a param into usrloc:
>> $test = "Something";
>> setvarflag($test, "name_of_avp_flag");
>> Restore the parameters:
>> read_reg_avps("location", "$fU")
>> (where $fU is user, for which the parameters will be loaded. It will
>> then take the modified URI of the current message, to get the contact,
>> for which the parameters will be loaded).
> Does this require additional database lookups on write and read (DB-mode 3)?
> I wonder why the AVP need to be loaded explicitly? IMO either the
> stored/restored AVPs should be configured as module parameter, or if done
> dynamically, all the stored AVPs should be restored automatically.
Mobile +49 179 2021244
Home +49 40 34927217
Büro (Verl) +49 5246 801427
Fax +49 40 34927218
mailto:carsten at bock.info
More information about the sr-dev