![]() |
Think you're approaching it from the wrong direction. Check out destctrls: [0-9]{11,} RejectNotice = "too many digits" That's off the top of my head, and untested. See the destctrls manpage. -Alan rdrouin wrote: > > Hi, > > I have to write some dialrules and i've got a problem, how can I block all > phone number with more then 11 digits? I have seen that it's possible to do > it from the destcontrols file, but i'd like to put it in the dialrules > itself, (in the dialstring section). > > here what i've tried: > ... > ! > DialString := [ > [-${WS}.]+ = ! Strip syntactic sugar > ^[+]${Country} = ! Its in North America > ^${LDPrefix}(9.*) = ! Block 1-9zz-xxx-yyyy calls > ^9......... = ! Block 1-9zz-yyyy calls > ^${LDPrefix} = ! Cut the LDPrefix, for test ! use > ^.$ = ! Block all phone number > ^..$ = ! with less then 7 digits > ^...$ = ! including 911, 611, 411, ! etc. > ^....$ = > ^.....$ = > ^......$ = > ^[2-9]......$ = ${LDPrefix}${Area}& ! Default AC for 7-digit > Nos. > ^........$ = ! Block phone number with 8 > ^.........$ = ! and 9 digits > ^[2-9].........$ = ${LDPrefix}& ! If the number is 10-digits > ! and does not start with a 1 > ^..........* = ! Block phone numbers with ! more then 10 digits > ! > ... > So, if you have any suggestion, go ahead, I will be an happy guy. > > Thanks > > Roch Drouin