[OpenSER-Users] AVPOPS Issue-Changed to groups
Ali Jawad
ali.jawad at splendor.net
Mon Jun 9 13:43:28 CEST 2008
Adding to the below I am getting
Jun 9 11:49:53 [13850] DBG:group:is_user_in: user is in group 'blocked'
In the log file
And I changed
if (is_user_in("Request-URI", "blocked")) {
xlog("L_INFO", "xxxxxxxx");
exit();
};
To
if (is_user_in("Request-URI", "blocked")) {
xlog("L_INFO", "xxxxxxxx");
exit();
}
There was a semi colon after the } of the if statement. But still getting the same result
Dear Inaki
This is my route statement, the is_user_in is matching true, since I can see the xxxxx in the log. However the script does notexit using the exit(); function instead it moves on to the register and allows the softphone to register. Anything wrong you can see here ? Thanks
route
{
if (is_user_in("Request-URI", "blocked")) {
xlog("L_INFO", "xxxxxxxx");
exit();
};
if(is_method("REGISTER")){
if(!www_authorize("sero.ahwar.net", "subscriber")){
www_challenge("sero.ahwar.net", "1");
return;
}
save("location");
return;
}
if(does_uri_exist()){
# local uri does exist, is probably a user.
xlog("L_INFO","User Exists
if(lookup("location")){
route(1);
return;
}
else {
if(src_ip!=87.236.144.9)
{
rewritehost("87.236.144.9");
route(1);
}
else
{
sl_send_reply("404", "Shi Bi Hayij");
exit;
}
}
}
else {
# # probably a call to pstn....
route(2);
return;
}
}
}
-----Original Message-----
From: users-bounces at lists.openser.org [mailto:users-bounces at lists.openser.org] On Behalf Of Iñaki Baz Castillo
Sent: Monday, June 09, 2008 2:15 PM
To: users at lists.openser.org
Subject: Re: [OpenSER-Users] AVPOPS Issue-Changed to groups
El Monday 09 June 2008 12:54:55 Ali Jawad escribió:
> I mean is exit supposed to terminate the session or just exit the if
> statement. Because my registration script part is just below this if
> statement. Thx
The exit terminates all the script.
If you reply a 403 and do a "exit" the register process must finish.
--
Iñaki Baz Castillo
ibc at in.ilimit.es
_______________________________________________
Users mailing list
Users at lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
_______________________________________________
Users mailing list
Users at lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Users
mailing list