[Serusers] blocking certain countries

Marian Dumitru marian.dumitru at voice-sistem.ro
Sat Apr 23 12:26:55 CEST 2005


Hi Nhadie,

Most probably there is something wrong with the regular express and the 
dialled RURI doesn't match.
What RURI suppose to match and doesn't?

Best regards,
Marian

Nhadie wrote:
> 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

-- 
Voice System
http://www.voice-system.ro




More information about the sr-users mailing list