[SR-Users] Keep one registration per device(src_ip+port)

Zhan Bazarov chiefkeeft at gmail.com
Tue Jul 7 14:54:55 CEST 2020


Hello. 
I'd like to keep one registration per device in usrloc table, for other
cases I want to store and maintain one contact per AoR. 
Does kamailio support it out of the box?

For second case save("location", "0x01"); working fine.  But how about first
case? for example, if one of device located at home, and second located at
office. - there are two different network and NAT - how I can make both
devices ringing when INVITE is sent? If I do classic multiAor scenario - it
can lead to issues caused by multiple contacts in 200OK response for a
single device and devices are confusing sometimes.

So, what I did now:
        if (nat_uac_test("19")) {
            if (is_method("REGISTER")) {
                fix_nated_register();
                add_contact_alias();
}

[REGISTRAR] {
                if (nat_uac_test(64)) {
                    if (!save("location", "0x04")) {
                        sl_reply_error();
                    }
                } else {
                    if (!save("location")) {
                        sl_reply_error();
                    }
                }
}

    modparam("usrloc", "db_url", DBURL)
    modparam("usrloc", "db_mode", 3)
    modparam("usrloc", "use_domain", MULTIDOMAIN)
    modparam("usrloc", "xavp_contact", "usrlocattrs")
    modparam("usrloc", "desc_time_order", 1)
    modparam("usrloc", "db_timer_clean", 1)
    modparam("usrloc", "close_expired_tcp", 1)
    modparam("usrloc", "db_insert_update", 1)
    modparam("usrloc", "expires_type", 1)
    modparam("usrloc", "matching_mode", 1)

    modparam("registrar", "method_filtering", 1)
    modparam("registrar", "max_expires", 3530)
    modparam("registrar", "min_expires", 1800)
    modparam("registrar", "received_avp", "$avp(s:rcv)")
    modparam("registrar", "gruu_enabled", 0)
    modparam("registrar", "use_path", 1)
    modparam("registrar", "path_check_local", 1)
    modparam("registrar", "path_mode", 1)
    modparam("path", "use_received", 1)


How do u think, maybe modparam("registrar", "append_branches", 0) will make
some help? 



--
Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html



More information about the sr-users mailing list