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@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