Hi All,

I defined something like this on my config, to block pstn calls to certain countries. Unfortunately it doesn't work.

 if ((uri=~"^(sip:)?00(871-874|881|246)[0-9]*@([a-z]+\.)?mydomain\.com") || (uri=~"^(sip:)?00(871-874|881|246)[0-9]*@10\.0\.2\.200")) {
            if (isflagset(8)) {xlog("L_INFO", "Call to those locations are not allowed\n");};
            sl_send_reply("404", "Not Found");
            break;

        } else if ((uri=~"^(sip:)?00[0-9]*@([a-z]+\.)?mydomain\.com") || (uri=~"^(sip:)?00[0-9]*@10\.0\.2\.200")) {
     if (isflagset(8)) {xlog("L_INFO", "Call to anywhere in the World\n");};
                         # Strip first to digits (00)
                         strip(2);
                         # Prefix with 12345#
                         prefix("12345#");
                         rewritehostport("123.123.123.123:5060");
                         # Remove credentials
                         consume_credentials();
                         # Route call
                         t_relay_to_udp("123.123.123.123", "5060");
                         break;
                         }
      } else {
  .....
  .....
  .....
  .....

can anyone tell my error here? thank you in advance

regards,
nhadie