Description

I'd like to reduce the number of contacts per AOR for certain UAs, while maintaining a default higher limit.

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

route[REGISTRAR] {
    if($ua=~"^Yealink") {
        $xavp(reg=>max_contacts)=1;
    }

    if(!save("location")) {
        sl_reply_error();
    }
    exit;
}

Expected behavior

https://www.kamailio.org/docs/modules/stable/modules/registrar#registrar.p.xavp_cfg states:

I expect that the UA will register with the new contact and have all others removed.

Actual observed behavior

$xavp(reg=>max_contacts) set to a value lower than the max_contacts modparam does not achieve the overwrites expectation from the documentation.

Log Messages

INFO: registrar [save.c:619]: test_max_contacts(): too many contacts for AOR <user@example.com>

Additional Information

version: kamailio 5.4.1-1.gite1d4ddcb6c.fc32 (x86_64/linux) 09fd6a
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 09fd6a 
compiled on 00:00:00 Sep  5 2020 with gcc 10.2.1
Fedora 32, kernel-5.8.4-200.fc32.x86_64


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.