[Serusers] REGISTER, auth & INVITE
Lol Zimmerli
lolzim at worldcom.ch
Wed Jun 8 16:48:20 CEST 2005
Hello list!
I do have something like this in my ser.cfg:
if (method=="REGISTER") {
if (!www_authorize("domain.com", "subscriber")) {
www_challenge("domain.com", "1");
break;
};
break;
};
It works perfectly.
And if I set a line in my snom with inexistant account, of course
REGISTER fails:
[2]8/6/2005 16:29:39: Registrar 9898 at 212.xxx.xxx.xxx refused with code
401
But, with the same un-REGISTERed phone, I can phone: INVITE works :(
I then tried something like this:
if (method=="INVITE"){
if (src_ip != "212.xxx.xxx.xxx"){
if (!www_authorize("domain.com", "subscriber")) {
www_challenge("domain.com", "1");
break;
};
};
else{
route(1);
};
};
And then, SER fail to restart:
Starting SIP Express Router ERROR: bad config file (6 errors)
startproc: exit status of parent of /usr/local/sbin/ser: 255
Is my approach wrong or am I doing a little typo-like error?
Best regards
--
# Lol Zimmerli // S y s C o ® // http://www.sysco.ch/
Write clearly - don't sacrifice clarity for "efficiency".
- The Elements of Programming Style (Kernighan & Plaugher)
More information about the sr-users
mailing list