Hello George,
You’re better off inserting a permanently, do it like:
kamctl rpc ul.add location USERNAME(a)LOCALDOMAIN.COM
sip:USERNAME@IP_PERMANENT:5060 0 1 . 0 0 13279 . .
https://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.r.add
4.6. ul.add
Adds a new contact for an user AOR.
Parameters:
-
*table name* - table where the contact will be added (Ex: location).
-
*AOR* - user AOR in username[@domain] format (domain must be supplied
only if use_domain option is on).
-
*contact* - contact string to be added
-
*expires* - expires value of the contact
-
*Q* - Q value of the contact
-
*path* value with the Path vector (use '0' or '.' if it should not be
set)
-
*flags* - internal USRLOC flags of the contact
-
*cflags* - per branch flags of the contact
-
*methods* - mask with supported requests of the contact
-
*received* (optional) value with the received-from address (source
address) (use '0' or '.' if it should not be set). Format:
sip:srcip:srcport;transport=abc
-
*socket* (optional) value with the local socket address (use '0' or
'.'
if it should not be set). Format: proto:localip:localport
Note: the position of parameters is relevant, in the case of optional
parameters, use '0' or '.' for parameters that should not be set which
are
positioned before any parameter that has to be set.
Hope that helps,
David
On Fri, 20 Sep 2019 at 14:40, George Diamantopoulos <georgediam(a)gmail.com>
wrote:
Hello,
Normally I wouldn't be asking this but I was surprised to find no
reference to anyone doing this online. I need to have a few AoRs with
static entries in kami's location table, which will always be reachable at
their contacts without ever having to register with Kamailio.
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)?
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.
Thanks,
George
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users