On 13-05 12:48, Andrzej Radke wrote:
You right ! But if I remove this "break"
command nothing is happend
Nobody from gda.pl and gdynia.pl is registered. :(
I'd like a support for 2 different domains. What can I do ?
I think the problem is in my config script, not in database tables, which
I created
OK, to achieve this you will need a condition to differentiate the
domains. For example something like this:
if (uri=~".*gda\.pl") {
if (method=="REGISTER") {
if (!www_authorize("gda.pl", "subscriber")) {
www_challenge("gda.pl", "0");
break;
};
save("location");
break;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
} else if (uri=~".*gdynia\.pl") {
if (method=="REGISTER") {
if (!www_authorize("gdynia.pl", "subscriber2")) {
www_challenge("gdynia.pl", "0");
break;
};
save("location2");
break;
};
if (!lookup("location2")) {
sl_send_reply("404", "Not Found");
break;
};
};
if (!t_relay()) {
sl_reply_error();
};
This is easy if you have a small number of domains that you want to
handle and you don't change it very often.
If you need multidomain support and the domains are created often or
automatically then it is also possible to do this without
modifications of the script and restarting the server. But only CVS
version of ser supports that.
Jan.