[SR-Users] Using static entries with usrloc
Henning Westerholt
hw at skalatan.de
Fri Sep 20 17:00:34 CEST 2019
Am 20.09.19 um 16:52 schrieb Daniel Tryba:
On Fri, Sep 20, 2019 at 04:37:20PM +0300, George Diamantopoulos wrote:
>> Am I right in thinking that merely INSERTing respective rows in kamailio's
>> location DB backend will do the trick? Is there anything I need to worry
>> about, like contacts being periodically purged? If yes, how do I prevent
>> that from happening? And will kamailio always query the DB when performing
>> location lookup or do I need to restart upon inserting new records (to
>> purge caches, for example)?
> I did the same (as in clients can choose to setup their endpoints this
> way, but nobody is doing it at this moment).
>
> This depends on what dbmode you have set. db_mode 3 will cache nothing
> and do a DB lookup for all actions. This is also safe for what you are
> wanting to to (in my experience).
>
>> Lastly, I'm not sure how to treat some fields present in usrloc tables like
>> ruid, expires (can I set this to NULL?), callid and cseq (which is
>> irrelevant since there's no REGISTER), flags, cflags and methods.
> ruid: doesn't matter (I set it to username)
> expires: I have it set to just before the end of the current unix time,
> 2018-01-01 00:00:00
Hello,
you mean probably end of unix time at 03:14:07 UTC on 19 January 2038.
Henning
> callid: a unique random string (substr(md5(time().rand()),0,16))
> cseq: 1
> flags: 0 (?)
> cflag: 128 (?)
> methods: 6879 (?)
>
> But doing it through kamcmd might be the better answer that is already
> given.
--
Kamailio Merchandising - https://skalatan.de/merchandising/
Kamailio services - https://skalatan.de/services
Henning Westerholt - https://skalatan.de/blog/
More information about the sr-users
mailing list