[SR-Users] Registrar, usrloc and duplicate keys

Alex Hermann alex at speakup.nl
Tue Jul 16 14:47:46 CEST 2013


Hello,

I'm upgrading a 1.5 install to 4.0 and encounter a problem with registrations 
from a phone. The phone lost power and after rebooting it starts a new 
registration while the old registration hasn't expired yet. The phone uses the 
same aor and contact but a different call-id (and cseq) which all seems ok and 
used to work with 1.5.x.

Problem 1) When receiving this new registration, kamailio is trying to update 
the old registration even though the new registration doesn't match the old 
one. The database responds with 0 rows updated because the call-id is 
different.

Problem 2) To try to circumvent problem 1, i have usrloc configured to try an 
insert instead when the update fails. That insert fails because kamailio is 
trying to insert with the same ruid as the old registration.

Combining those, the real problem seems to be that kamailio is assigning the 
same ruid to both registrations. How could that be prevented?

The config parameters are set so that it matches my old 1.5 config as much as 
possible. No need for outbound, gruu, etc.

(Phone does send an +sip.instance, which happens to be identical in both 
registrations. I have gruu_enabled set to 0, so i would expect kamailio to 
ignore it as it did in 1.5. The outbound module is not loaded).

modparam("registrar", "min_expires", 60)
modparam("registrar", "default_expires", 1800)
modparam("registrar", "default_q", 0)
modparam("registrar", "path_mode", 0)
modparam("registrar", "use_path", 1)
modparam("registrar", "path_use_received", 1)
modparam("registrar", "gruu_enabled", 0)

modparam("usrloc", "db_mode", 2)
modparam("usrloc", "timer_interval", 20)
#modparam("usrloc", "db_obs_ruid", 0) # param does not really exist
modparam("usrloc", "db_check_update", 1)
modparam("usrloc", "timer_procs", 2)
modparam("usrloc", "hash_size", 14)
modparam("usrloc", "matching_mode", 0)

-- 
Greetings,

Alex Hermann





More information about the sr-users mailing list