Not answering your (new) question - but using the flag "4" for save(..) does not work for you? Do you need to have a dynamic limit?
--
Henning Westerholt –
https://skalatan.de/blog/
Kamailio services –
https://gilawa.com
-----Original Message-----
From: sr-users
sr-users-bounces@lists.kamailio.org On Behalf Of Benoit Panizzon
Sent: Tuesday, August 16, 2022 4:09 PM
To: Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
Subject: Re: [SR-Users] How to enforce max_contacts at registration?
Hi List
After some more google research and finding this thread
https://www.mail-archive.com/sr-dev@lists.kamailio.org/msg18728.html
and some more testing, I think I can conclude that setting
$xavp(reg=>max_contacts) = $anyvalue
is just not working as described in the documentation:
https://kamailio.org/docs/modules/5.1.x/modules/registrar.html#idp47250596
So I went ahead and pulled:
reg_fetch_contacts("location", "$var(saveuri)", "caller") to get $(ulc(caller=>count))
But now I face a new problem: When I get a registration, I don't know if this a legitimate update for a existing registration or the insertion of a new registration which would exceed the numbers of registration I want to allow for that specific AOR.
Any hint how to solve that challenge or how $xavp(reg=>max_contacts) could be made to work as documented?
Mit freundlichen Grüssen
-Benoît Panizzon-
--
I m p r o W a r e A G - Leiter Commerce Kunden
______________________________________________________
Zurlindenstrasse 29 Tel +41 61 826 93 00
CH-4133 Pratteln Fax +41 61 826 93 01
Schweiz Web
http://www.imp.ch
______________________________________________________
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
*
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users