[Serusers] how to restrict registration

Francesco Fondelli francesco.fondelli at gmail.com
Mon Nov 21 16:04:06 CET 2005


Hi all,

I would like to restrict registration based on IP in Contact,
something like:

foo at bar.com --> allowed contact IP are 192.168.1.10 or 192.168.1.15
boo at bar.com --> allowed contact IP are 192.168.1.20 or 192.168.1.30

I tried with permissions module:

        if (!allow_register("register.allow", "register.deny")) {
                sl_send_reply("403", "Permission denied");
                break;
        };

and

# content of register.allow
"^sip:foo at .*$" : "^sip:.*192\.168\.1\.10$"
"^sip:foo at .*$" : "^sip:.*192\.168\.1\.15$"
"^sip:boo at .*$" : "^sip:.*192\.168\.1\.20$"
"^sip:boo at .*$" : "^sip:.*192\.168\.1\.30$"


but it doesn't work. SER lets foo@ and boo@ register using
whatever IP they want to. Where is the mistake? Am I missing something?

Thank you
Ciao
FF




More information about the sr-users mailing list