[Serusers] blocking certain extensions

Ronald Ramos ron at silverbackasp.com
Thu Dec 16 16:19:15 CET 2004



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




More information about the sr-users mailing list