You could also define an ACL in serctl, if an appropriate one
doesn't already exist, then check then use the "is_user_in"
function to decide if the PSTN call should be completed or
not.
For example I've defined the ACL "oncampus". When a
call hits the proxy I use something like:
if (is_user_in("Request-URI", "oncampus")) {
setflag(5);
};
The do something (whatever is appropriate) with flag #5.
-Steve
Ronald Ramos wrote:
Hi All,
I have defined extension 2000 - 8000 on my SIP server.
All of them can make calls to PSTN, but my boss wants now, to block all 2XXX
extensions to call PSTN but they should still be able to call other extensions
from 2000 - 8000.
I was thinking of adding something like this line,
if ((uri=~"^(sip:)?001[0-9]*@([a-z]+\.)?mydomain\.com") ||
(uri=~"^(sip:)?001[0-9]*@123\.45\.67\.89"))
but the condition will be if calls originated from 2XXX going to pstn, which
would look like 00XXXXXXXXX, it's more like this line
if (((uri=~"^(sip:)?001[0-9]*@([a-z]+\.)?mydomain\.com") ||
(uri=~"^(sip:)?001[0-9]*@123\.45\.67\.89")) &&
(((uri=~"^(sip:)?001[0-9]*@([a-z]+\.)?mydomain\.com") ||
(uri=~"^(sip:)?001[0-9]*@123\.45\.67\.89")))
but here I compare the destination uri, where should I compare the source?
hope you understand my question, as I'm having a hard time explaining in english.
Regards
Ron
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
--
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
voice: 215-573-8396
215-746-8001
fax: 215-898-9348
sip:blairs@upenn.edu