if (uri =~"^003246"){
sl_send_reply(403,"Go away");
break;
};
* Nhadie <nhadie(a)cbcpworld.com> [050423 16:12]:
Hi Sir,
I need to block country codes 246, 871-874 and 881. For my customer to dial
pstn, they simply dial 00 first then country code, etc.
Any idea why my reg exp doesn't work? thank you
regards,
nhadie
--------- Mensagem Original --------
From: Marian Dumitru <marian.dumitru(a)voice-sistem.ro>
To: Nhadie <nhadie(a)cbcpworld.com>
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] blocking certain countries
Date: 23/04/05 18:08
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 allowedn");};
> 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 Worldn");};
> # 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
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers