On 20.09.19 16:52, Daniel Tryba wrote:
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)
Just a note: the ruid should be unique per record, it is fine if you
have one registration per username. It might not have impact if you do
not use gruu extensions of some functions that need the ruid (e.g.,
unregister by ruid, location record attribtues), but it would be safer
to just set it to a unique random value.
Cheers,
Daniel
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.
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla --
www.asipto.com
www.twitter.com/miconda --
www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany --
https://asipto.com/u/kat