I haven't used this function that much, but I'm pretty sure this will work out
for you
exten => s,n,GotoIF( $[ "${REGEX("[06]*" ${VARIABLE})}" != "1" ]
?INVALID_EXTENSION,1)
That should do the work. Spend some time reading the function documentation and
eventually you should get it right.
This would send whoever ${VARIABLE} to INVALID_EXTENSION, priority 1 if the
dialed number does not begin with 06. But I can't be 100% sure since I can't
test this right now.
---
Marcelo Ellmann
Freeddom Tecnologia e Serviços S/A
+55 11 52133200 Ramal 1016
----- Original Message -----
From: "salaheddine elharit" <[email protected]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
<[email protected]>
Sent: Tuesday, 9 August, 2011 9:55:21 AM
Subject: Re: [asterisk-users] block all numbers begin by 00 and 1
Thanks for your response
i have asterisk 1.4 installed , i configure some sip accounts 222 223 and i
want to block the outbound calls numbers begins by 00 an 1 because i want to
call just the local numbers in my country (all numbers in my country begins by
06)
Could you please give me an example?
best Regards
2011/8/9 Marcelo Ellmann Clemente < [email protected] >
You could be a little more specific about your question but...
http://www.voip-info.org/wiki/view/Asterisk+func+regex
Just use the regex function. Any number which matches 00* || 1* goes to
invalid/block/whatever extension.
---
Marcelo Ellmann
Freeddom Tecnologia e Serviços S/A
+55 11 52133200 Ramal 1016
----- Original Message -----
From: "salaheddine elharit" < [email protected] >
To: "Asterisk Users Mailing List - Non-Commercial Discussion" <
[email protected] >
Sent: Tuesday, 9 August, 2011 9:16:19 AM
Subject: [asterisk-users] block all numbers begin by 00 and 1
hello
i want to know how to do in order to block all numbers bgin by 00 and all
numebrs begin by 1
i use sip account
thanks and regards
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users