[SR-Users] Using static entries with usrloc

Daniel Tryba d.tryba at pocos.nl
Fri Sep 20 16:52:58 CEST 2019


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
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.



More information about the sr-users mailing list