Problem with excluding numbers

Hi, I have some SIP-Account which allows me to phone the landline of some EU contries and Germany. As mobile calls and special numbers are very expensive, I do not want Asterisk to let those calls through. This is my config (shortened):

[code][denied] ;being excuted when call is not allowed
exten => s,1,Playback(accessdenied)
exten => s,2,Busy()

[sperrnummern-deu]
exten => _9998090.,1,GoTo(denied,s,1) ;number 090 is being blocked

[sperrnummern-int]
exten => _99980041090.,1,GoTo(denied,s,1) ;number 0041090 is being blocked

[sipgate]
include => sperrnummern-deu
include => sperrnummern-int

exten => _99980043.,1,GoTo(10) ; that country is being allowed

exten => _99980[2-9].,1,GoTo(10) ; numbers 02-09 are allowed

;# dialplan:

exten => _9998X.,1,GoTo(denied,s,1) ; forbid everything which is not mentioned

exten => _9998.,16,Dial(SIP/${EXTEN:4}@sipgate,180,) ; dial
exten => _9998.,17,Hangup ; [/code]

If someone could tell me what is wrong I’d be very gratefull. I am using Asterisk 1.2.x

Are the calls going through or not going through ? The only think I see wrong here is:

exten => _9998.,16,Dial(SIP/${EXTEN:4}@sipgate,180,)   ; dial
exten => _9998.,17,Hangup

exten => _99980[2-9].,1,GoTo(10)    
  1. Why do you have there pioroty 16 and 17 ? Shouldn’t it be 1 and 2 ?
  2. Where do you have extension _99980[2-9] with priority 10 ?

i’m sorry but I cutted it too much. actually i have soemthing like this:

   exten => _9998.,10,Set(CALLERID(name)=anonymous)
   exten => _9998.,11,Set(LANGUAGE()=en)           
   exten => _9998.,12,Set(GROUP()=sipgate_anrufe)         
   exten => _9998.,13,NoOp(${GROUP_COUNT()})             
   exten => _9998.,14,GoToIf($[${GROUP_COUNT()} > 2]?120)
   exten => _9998.,15,NoOp                        
   exten => _9998.,16,Dial(SIP/${EXTEN:4}@sipgate,180,)  
   exten => _9998.,17,Hangup                         
   exten => _9998.,117,Busy()    
   exten => _9998.,120,GoTo(denied,s,1)