<div dir="ltr"><div><div dir="auto">Hello George,</div></div><div dir="auto"><br></div><div dir="auto">You’re better off inserting a permanently, do it like:</div><div dir="auto"><br></div><div dir="auto"><font face="monospace">kamctl rpc ul.add location <a href="mailto:USERNAME@LOCALDOMAIN.COM">USERNAME@LOCALDOMAIN.COM</a> sip:USERNAME@IP_PERMANENT:5060 0 1 . 0 0 13279 . .<br></font></div><div dir="auto"><br></div><div dir="auto"><a href="https://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.r.add">https://kamailio.org/docs/modules/stable/modules/usrloc.html#usrloc.r.add</a><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail-titlepage" style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:15px"><div><div><h3 class="gmail-title" style="margin:1em 0px 0.75em;padding:0px 0px 5px 5px;color:rgb(107,83,68);font-family:Scada,Helvetica,sans-serif;font-size:20px;line-height:28px;font-style:italic">4.6.  <code class="gmail-function">ul.add</code></h3></div></div></div><p style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px">Adds a new contact for an user AOR.</p><p style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px">Parameters:</p><div class="gmail-itemizedlist" style="color:rgb(0,0,0);font-family:Helvetica,Arial,sans-serif;font-size:15px"><ul class="gmail-itemizedlist" type="disc"><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>table name</em></span> - table where the contact will be added (Ex: location).</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>AOR</em></span> - user AOR in username[@domain] format (domain must be supplied only if use_domain option is on).</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>contact</em></span> - contact string to be added</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>expires</em></span> - expires value of the contact</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>Q</em></span> - Q value of the contact</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>path</em></span> value with the Path vector (use '0' or '.' if it should not be set)</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>flags</em></span> - internal USRLOC flags of the contact</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>cflags</em></span> - per branch flags of the contact</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>methods</em></span> - mask with supported requests of the contact</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>received</em></span> (optional) value with the received-from address (source address) (use '0' or '.' if it should not be set). Format: sip:srcip:srcport;transport=abc</p></li><li class="gmail-listitem"><p style="text-align:justify"><span class="emphasis"><em>socket</em></span> (optional) value with the local socket address (use '0' or '.' if it should not be set). Format: proto:localip:localport</p></li></ul></div><p style="font-family:Helvetica,Arial,sans-serif;text-align:justify;color:rgb(0,0,0);font-size:15px">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.</p></div><div dir="auto"><br></div><div>Hope that helps,</div><div><br></div><div>David</div><div dir="auto"><br></div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 20 Sep 2019 at 14:40, George Diamantopoulos <<a href="mailto:georgediam@gmail.com" target="_blank">georgediam@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>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.</div><div><br></div><div>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)?<br></div><div><br></div><div>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.</div><div><br></div><div>Thanks,</div><div>George<br></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>