<p>Hi, i am trying to remove a specific contact from memroy but to no avail. Here is what I had tried.<br>
root@debian:/usr/local/kamailio/sbin# ./kamctl ul show<br>
Domain:: location table=1024 records=1 max_slot=1<br>
AOR:: 1040@192.168.1.10<br>
Contact:: sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp Q=<br>
Expires:: 3366<br>
Callid:: J2MpU81af1hZ7bj2eLBAHQ..<br>
Cseq:: 2<br>
User-agent:: Z 3.9.32144 r32121<br>
State:: CS_SYNC<br>
Flags:: 0<br>
Cflag:: 0<br>
Socket:: tcp:192.168.1.10:5060<br>
Methods:: 5087<br>
Ruid:: uloc-5891af42-b58-3<br>
Reg-Id:: 0<br>
Last-Keepalive:: 1485943492<br>
Last-Modified:: 1485943492</p>
<p>./kamctl fifo ul_rm_contact location 1040@191.168.1.10 sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp<br>
404 AOR not found</p>
<p>root@debian:/usr/local/kamailio/sbin# ./kamctl ul show<br>
Domain:: location table=1024 records=1 max_slot=1<br>
AOR:: 1040@192.168.1.10<br>
Contact:: sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp Q=<br>
Expires:: 3064<br>
Callid:: J2MpU81af1hZ7bj2eLBAHQ..<br>
Cseq:: 2<br>
User-agent:: Z 3.9.32144 r32121<br>
State:: CS_SYNC<br>
Flags:: 0<br>
Cflag:: 0<br>
Socket:: tcp:192.168.1.10:5060<br>
Methods:: 5087<br>
Ruid:: uloc-5891af42-b58-3<br>
Reg-Id:: 0<br>
Last-Keepalive:: 1485943492<br>
Last-Modified:: 1485943492</p>
<p>I had tried to unregister with ruid. Code snippet.</p>
<p>if(reg_fetch_contacts("location", "$fu", "caller"))<br>
{<br>
xlog("caller=>aor: $(ulc(caller=>aor))\n");<br>
xlog("caller=>domain: $(ulc(caller=>domain))\n");<br>
xlog("caller=>aorhash $(ulc(caller=>aorhash))\n");<br>
xlog("caller=>count $(ulc(caller=>count))\n");<br>
xlog("caller=>ruid $(ulc(caller=>ruid))\n");<br>
$var(i) = 0;<br>
while($var(i) < $(ulc(caller=>count)))<br>
{<br>
xlog("--- contact [$var(i)]\n");<br>
if ($(ulc(caller=>user_agent)[$var(i)]) == 'Jitsi2.10.5550Windows 10') {<br>
xlog("found the culpit now removing it");<br>
unregister("location", "", "$(ulc(caller=>ruid)[$var(i)])");<br>
}<br>
xlog("caller=>addr:       $(ulc(caller=>addr)[$var(i)])\n");<br>
xlog("caller=>path:       $(ulc(caller=>path)[$var(i)])\n");<br>
xlog("caller=>received:   $(ulc(caller=>received)[$var(i)])\n");<br>
xlog("caller=>expires:    $(ulc(caller=>expires)[$var(i)])\n");<br>
xlog("caller=>callid:     $(ulc(caller=>callid)[$var(i)])\n");<br>
xlog("caller=>q:          $(ulc(caller=>q)[$var(i)])\n");<br>
xlog("caller=>cseq:       $(ulc(caller=>cseq)[$var(i)])\n");<br>
xlog("caller=>flags:      $(ulc(caller=>flags)[$var(i)])\n");<br>
xlog("caller=>cflags:     $(ulc(caller=>cflags)[$var(i)])\n");<br>
xlog("caller=>user_agent: $(ulc(caller=>user_agent)[$var(i)])\n");<br>
xlog("caller=>socket:     $(ulc(caller=>socket)[$var(i)])\n");<br>
xlog("caller=>modified:   $(ulc(caller=>modified)[$var(i)])\n");<br>
xlog("caller=>methods:    $(ulc(caller=>methods)[$var(i)])\n");<br>
$var(i) = $var(i) + 1;<br>
}<br>
}<br>
}</p>
<p>This is what I got in logs.</p>
<p><strong>usrloc [urecord.c:634]: delete_urecord_by_ruid(): delete_urecord_by_ruid currently available only in db_mode=3</strong></p>
<p>I am having default script having below usrloc settings</p>
<p>/* enable DB persistency for location entries */<br>
#!ifdef WITH_USRLOCDB<br>
modparam("usrloc", "db_url", DBURL)<br>
modparam("usrloc", "db_mode", 2)<br>
modparam("usrloc", "use_domain", MULTIDOMAIN)<br>
modparam("usrloc", "matching_mode", 0)<br>
#!endif</p>
<p>I want to remove a specific contact from memory and using default cfg file.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1027">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZRkNOIAZqYOx55TZ-44iPkyROD31ks5rkV3fgaJpZM4MZcYc">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZUCINsPFrRfSAx8G26jmvoXyGcsgks5rkV3fgaJpZM4MZcYc.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/1027"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"could not make ul_rm_contact work (#1027)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1027"}}}</script>