block all numbers begin by 00 and 1


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

5 Responses to “block all numbers begin by 00 and 1”

  1. Marcelo Ellmann Clemente said:

    Aug 09, 11 at 8:37 am

    You could be a little more specific about your question but…

    Just use the regex function. Any number which matches 00* || 1* goes to invalid/block/whatever extension.

  2. Marcelo Ellmann Clemente said:

    Aug 09, 11 at 10:02 am

    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.

  3. A J Stiles said:

    Aug 09, 11 at 11:21 am

    All you have to do is, just make sure that there is no extension in the
    default context which matches _00. or _1. — or, if there is one, it contains
    something other than Dial(${EXTEN}) …..

  4. Marcelo Ellmann Clemente said:

    Aug 09, 11 at 12:39 pm

    That would work as well! :)

  5. salaheddine elharit said:

    Aug 10, 11 at 6:56 am

    thanks A J stiles and thanks Marcelo for your help and support

    i have remove 1 extension begin by _00 and _1 and all function without
    issue :)

    thanks and regards.

    2011/8/9 Marcelo Ellmann Clemente