[OpenSIPS-Devel] Duplicate entry in "location" table

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Dec 4 14:42:45 CET 2008


Hi Iñaki,


Iñaki Baz Castillo wrote:
> Hi, I've got two exact rows (*al* the fields) in "location" table,
> this shouldn't occur since a REGISTER from the same user with same
> "Contact" should replace/update the existing entry.
>   
that is correct, so:
1) are you sure *all* are the same?
2) is the DB shared by multiple opensips ?
> Well, I'm restarting OpenSIPS, maybe there is the problem.
>
> Anyway, I wonder if it makes sense an UNIQUE key in "location" table
> containing the following fields:
> - username
> - domain
> - contact
> - received
> - patch (not sure)
>
> "received" should be included in the match since the same AoR can be
> registered by two devices with same private IP but in different LAN's
> (so different "received" value).
>   
well, in this case callid must also be included  - different 
registration sessions :)

at a point I asked myself the same question and the conclusion was that 
you end up with a key over almost all fields :)
> This match should be done, theorically, by the registar without help
> from the database, but it's not the first time I see two exact rows in
> location table.
>
> PD: I use modparam("usrloc", "db_mode", 3).
>   
Oh...I start hating myself for adding this mode :D



Regards,
Bogdan



More information about the Devel mailing list