[SR-Users] How to enforce max_contacts at registration?

Benoit Panizzon benoit.panizzon at imp.ch
Thu Aug 18 09:10:21 CEST 2022


Hi Daniel

> what actually happens? New registrations are accepted with different
> contact headers? Have you run with debug=3 to see if you can spot any
> hint in the logs?

Well I did a different test, which I think hints where the problem is:

== Test 1 ==

modparam("registrar", "max_contacts", 10)
modparam("registrar", "xavp_cfg", "reg")

[...]

$xavp(reg=>max_contacts) = 2;
$var(result) = save("location","0x00","$var(saveuri)");

Result with 3 clients: AOR contains 3 Addresses.

$var(result) is positive.

== Test 2 ==

modparam("registrar", "max_contacts", 2)
modparam("registrar", "xavp_cfg", "reg")

[...]

$xavp(reg=>max_contacts) = 3;
$var(result) = save("location","0x00","$var(saveuri)");

Result with 3 clients: 3rd client is being rejected by save operation with:

[save.c:631]: test_max_contacts(): too many contacts for AOR

$var(result) is -2 as per documentation.

== Conclusion ==

Setting $xavp(reg=>max_contacts) on the fly in the config seems not
work in Version 5.5.4

I will also increase the debug level to 3 and re-test to see if setting
$xavp(reg=>max_contacts) generates any debug output hinting to the cause of the problem.

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
______________________________________________________



More information about the sr-users mailing list