[SR-Users] expired record not removed from location table

Daniel-Constantin Mierla miconda at gmail.com
Mon Apr 8 10:35:11 CEST 2013


Hello,

On 4/8/13 10:13 AM, Juha Heinanen wrote:
> Juha Heinanen writes:
>
>> i'm not sure if it is related, but today i noticed too that there is an
>> old record in my location table which has expired couple of hours ago.
>> the record does not show up with ul_dump command, so it has been removed
>> from memory.  usrloc db_mode=1.
> after restart of kamailio, the expired record disappeared after some
> time after restart, but looks like it would never have disappeared
> without restart.

I started a discussion with subject "SIP contact matching - location db 
ops" at the end of March, following a report on tracker.

The problem showed up very likely because the UA changed the call-id -- 
there are different matching algorithms, but seems they are only for 
in-memory lookup, the database operations (update/delete) seem to be 
always matching on contact address and call-id. That means in memory 
records are fine, but database can get some old records not deleted.

After analysis the best solution seems to be to match on ruid for 
database operations, because matching on path will be very inefficient 
(contact or contact+callid should still be quite ok). But I didn't have 
any time to code it, not sure I will find some spare time during the 
next two weeks, maybe someone else can look into it -- it has to review 
if ruid is updated in any case (which I don't think so, but should be 
double-checked) and the big part will be actually testing, as coding 
should even simplify the sql queries. I haven't looked at DB only mode 
to see if it requires some special care.

Cheers,
Daniel

Cheers,
Daniel

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -




More information about the sr-users mailing list