[Users] block calls

Juha Heinanen jh at tutpro.com
Thu Apr 19 16:53:42 CEST 2007


Carlos Ribas writes:

 > I need to block calls that they start with number 0.
 > i did this, but it`s not OK:
 > if (uri=~"^sip:[1-9]*@.*") {
 >    rewritehost("10.0.0.10");
 >    log("access ok");
 >    route(1);
 >    break;
 > };
 > 
 > if (uri=~"^sip:0[1-9]*@.*") {
 >    log("access deny");
 >    break;
 > };

try to replace break with something like

sl_send_reply("403", "Forbidden");
exit;

-- juha




More information about the Users mailing list