I tested with git master branch (as I had it ready in my testbed and I do not recall any report that would have led to a fix that is not also backported) and both q and max contacts seem to work fine.
Config snippets (based on default kamailio.cfg, changes below):
``` modparam("registrar", "xavp_cfg", "reg") ... $xavp(reg=>max_contacts) = 1; $xavp(reg[0]=>q) = 450; if (!save("location")) { sl_reply_error(); } ```
Result:
``` # kamctl ul show
{ "jsonrpc": "2.0", "result": { "Domains": [{ "Domain": { "Domain": "location", "Size": 1024, "AoRs": [{ "Info": { "AoR": "alice", "HashID": 1834153949, "Contacts": [{ "Contact": { "Address": "sip:127.0.0.1:53186;transport=udp", "Expires": 40, "Q": 0.450000, "Call-ID": "f6f80aa2-151c-4727-9bcc-f2c5e45f31dc", ```
I tested with sipexer, first command to register got 200ok, second one 503 (with the info header):
``` SIP/2.0 503 Service Unavailable Via: SIP/2.0/UDP 127.0.0.1:59194;rport=59194;branch=z9hG4bKSG.8ac6cb19-e990-4585-b10e-634cb9163a0d;received=127.0.0.1 From: sip:alice@127.0.0.1;tag=b6c8b02b-af5e-4e56-b459-2cc2b225e2a4 To: sip:alice@127.0.0.1;tag=9dd61ff61e802d8e2bef5f14621ef3c2.d4946a05 Call-ID: 35b348de-a40e-4bb2-8404-aaa2d341390f CSeq: 181716 REGISTER Contact: sip:127.0.0.1:53186;transport=udp;q=0.45;expires=57 P-Registrar-Error: Too many registered contacts Server: kamailio (6.0.0-dev3 (aarch64/linux)) Content-Length: 0 ````
Kamailio log:
``` 2(3443748) INFO: {1 181716 REGISTER 35b348de-a40e-4bb2-8404-aaa2d341390f} registrar [save.c:663]: test_max_contacts(): too many contacts for AOR <alice> (n:2 max:1) ```
Can you test your config with master and see if with it works? If yes, then it has to be tracked what is different with the older version.