Hi,

To limit the number of registered contacts, see "c" flag here :
http://www.opensips.org/html/docs/modules/1.11.x/registrar.html#id294034

you can also load it from an additional field from DB and push it to the save() function.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 30.07.2014 16:23, Лытаев Антон Викторович wrote:
Bogdan thanks for the advice. I add new users like this:
"opensipsctl add [email protected] 640000"
In this case 172.16.16.16 domain enters the field in the table subscriber, hereinafter: modparam ("auth_db", "load_credentials", "$ avp (loadedip) = domain")

Next part of the CFG:
if (is_method ("INVITE")) {
topology_hiding ();
setflag (1); # Do accounting
}
Topology and to conceal:route[3] {
    if($fu=~'^sip:20.+'){
        if($fd=~'^172.+'){
            prefix("9898");
            rewritehostport("172.16.16.16:5060");
        }
        else{
            prefix("9797");
            rewritehostport("85.85.85.85:5060");
        }
    }
    if($fu=~'^sip:64.+'){
        if($fd=~'^172.+'){
            prefix("9696");
            rewritehostport("172.16.16.17:5060");
        }
        else{
            prefix("9797");
            rewritehostport("85.85.85.86:5060");
        }
    }
    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}

And it works....

one last question:
for a particular user to limit the number of registrations and the number of INVITEs? So that this parameter also was written to the database...?

28.07.2014 18:02, Bogdan-Andrei Iancu пишет:
Hi,

Simply create a new field to the subscriber table and populate it by hand after creating the subcriber (do an update on the table).

Regards,




_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to