Hi,
I think i found it!
I attach three files ... the most important i think is lookup.c.registered_func.c.
It contains a modified version of registered() function in lookup.c (registrar module), in
which after obtaining the urecord from the database, all the contacts that it contains are
checked for validity (which was not done before!!). I think that this is the cause of
lookup and registered not returning the same values. Lookup() returned the correct value,
registered() did not. Now, they both return the same ... i mean ... they both return the
correct value :)
The problem was small, in the transition period (in db_mode=1) when the user deregisters
and SER still has not erased the contact from the location table (it keeps it in
CS_ZOMBIE_S in mode=1, _D in mode=2).
The other two files are a dump of the location table and a piece of the SER log file.
Version is 0.9.0.
Regards,
Cesc
>> Jan Janak <jan(a)iptel.org> 04/29/05
03:08PM >>>
On 28-04-2005 17:03, Cesc Santasusana wrote:
Hi,
After de-registration, a contact in the location table is marked as zombie, and after
some time, it is deleted from the table. Right?
You should not see any contacts in a ZOMBIE_* state. zombie states
were used for user location replication some time ago with a special
module.
If you use db_mode 2 then the contacts should appear as SYNC or DIRTY
in the location table and they will be deleted after a while by timer.
Ok, what happens when this user receives a call ... i
mean, he is in the location table (as zombie), but he is not registered really on the
phone?
He will not receive the message, because in the memory cache the
contact is marked as deleted.
What do the lookup('location") and
registered('location") in this scenario return?
If the user does not have any other contact registered then they will
return a negative value.
In my config ... a first call to lookup(loc) returns
false, and then calling registered(loc) returns true. Is that right? Shouldn't the two
functions do the same, just lookup rewrites the uri?
They should return the same value. If that does not happen then there
is a bug somewhere, in which case I would like to ask you to provide
me with more information (SER version, dump of the location table,
and so on).
Jan.
Unclassified