Hi, i am trying to remove a specific contact from memroy but to no avail. Here is what I had tried.
root@debian:/usr/local/kamailio/sbin# ./kamctl ul show
Domain:: location table=1024 records=1 max_slot=1
AOR:: 1040@192.168.1.10
Contact:: sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp Q=
Expires:: 3366
Callid:: J2MpU81af1hZ7bj2eLBAHQ..
Cseq:: 2
User-agent:: Z 3.9.32144 r32121
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: tcp:192.168.1.10:5060
Methods:: 5087
Ruid:: uloc-5891af42-b58-3
Reg-Id:: 0
Last-Keepalive:: 1485943492
Last-Modified:: 1485943492

./kamctl fifo ul_rm_contact location 1040@191.168.1.10 sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp
404 AOR not found

root@debian:/usr/local/kamailio/sbin# ./kamctl ul show
Domain:: location table=1024 records=1 max_slot=1
AOR:: 1040@192.168.1.10
Contact:: sip:1040@192.168.1.8:45573;rinstance=5494290a28b07472;transport=tcp Q=
Expires:: 3064
Callid:: J2MpU81af1hZ7bj2eLBAHQ..
Cseq:: 2
User-agent:: Z 3.9.32144 r32121
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: tcp:192.168.1.10:5060
Methods:: 5087
Ruid:: uloc-5891af42-b58-3
Reg-Id:: 0
Last-Keepalive:: 1485943492
Last-Modified:: 1485943492

I had tried to unregister with ruid. Code snippet.

if(reg_fetch_contacts("location", "$fu", "caller"))
{
xlog("caller=>aor: $(ulc(caller=>aor))\n");
xlog("caller=>domain: $(ulc(caller=>domain))\n");
xlog("caller=>aorhash $(ulc(caller=>aorhash))\n");
xlog("caller=>count $(ulc(caller=>count))\n");
xlog("caller=>ruid $(ulc(caller=>ruid))\n");
$var(i) = 0;
while($var(i) < $(ulc(caller=>count)))
{
xlog("--- contact [$var(i)]\n");
if ($(ulc(caller=>user_agent)[$var(i)]) == 'Jitsi2.10.5550Windows 10') {
xlog("found the culpit now removing it");
unregister("location", "", "$(ulc(caller=>ruid)[$var(i)])");
}
xlog("caller=>addr: $(ulc(caller=>addr)[$var(i)])\n");
xlog("caller=>path: $(ulc(caller=>path)[$var(i)])\n");
xlog("caller=>received: $(ulc(caller=>received)[$var(i)])\n");
xlog("caller=>expires: $(ulc(caller=>expires)[$var(i)])\n");
xlog("caller=>callid: $(ulc(caller=>callid)[$var(i)])\n");
xlog("caller=>q: $(ulc(caller=>q)[$var(i)])\n");
xlog("caller=>cseq: $(ulc(caller=>cseq)[$var(i)])\n");
xlog("caller=>flags: $(ulc(caller=>flags)[$var(i)])\n");
xlog("caller=>cflags: $(ulc(caller=>cflags)[$var(i)])\n");
xlog("caller=>user_agent: $(ulc(caller=>user_agent)[$var(i)])\n");
xlog("caller=>socket: $(ulc(caller=>socket)[$var(i)])\n");
xlog("caller=>modified: $(ulc(caller=>modified)[$var(i)])\n");
xlog("caller=>methods: $(ulc(caller=>methods)[$var(i)])\n");
$var(i) = $var(i) + 1;
}
}
}

This is what I got in logs.

usrloc [urecord.c:634]: delete_urecord_by_ruid(): delete_urecord_by_ruid currently available only in db_mode=3

I am having default script having below usrloc settings

/* enable DB persistency for location entries */
#!ifdef WITH_USRLOCDB
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", MULTIDOMAIN)
modparam("usrloc", "matching_mode", 0)
#!endif

I want to remove a specific contact from memory and using default cfg file.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.