Answers ( 5 )

  1. Marcelo Ellmann Clemente
    +1
    August 9, 2011 at 08:37 am
    Reply

    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.

  2. Marcelo Ellmann Clemente
    +1
    August 9, 2011 at 10:02 am
    Reply

    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
    +1
    August 9, 2011 at 11:21 am
    Reply


    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
    +1
    August 9, 2011 at 12:39 pm
    Reply

    That would work as well! :)

  5. salaheddine elharit
    +1
    August 10, 2011 at 06:56 am
    Reply

    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

 Prev question

Next question