Asterisk Dial plan Help me

Dear All ,
I want to deny some PSTN and Mobiles Calls by using Custom Context and in which making Dial rules.

In my Scenario i have installed the Custom Context Module & Add new Custom Context with name of Office Calls Only,in this scenario i want to make only 4 Digit Asterisk Extension only.
My Extension Range are from 2000 To 8000 They are all 4 digit Extension.

Custom Context OfficeCallsOnly
Description OfficeCallsOnly

Dail Rules
X (One Digit Extension for Operation)
XXXX (4 Digit local Extension)

Then In
Set ALL To (Allow Rules)
ENTIRE Basic Internal Dial plan (Allow Rules)
I have Give Allow Rule to All Extension
ALL OUTBOUND ROUTES (Allow Rules)

Outbound Rules (Deny) As i have deny all Outbound Routes so my users can’t make any PSNT or Mobile Dialing


Its mean i can dial easy All 4 digit Exteions But Some of my calls are made and some of not ,As all are 4 digits…

when i check log its shows.
id: device 9000") in new stack
– Executing [s@macro-user-callerid:2] Set(“SIP/9000-087b5b68”, “AMPUSER=9000”) in new stack
– Executing [s@macro-user-callerid:3] GotoIf(“SIP/9000-087b5b68”, “0?report”) in new stack
– Executing [s@macro-user-callerid:4] ExecIf(“SIP/9000-087b5b68”, “1|Set|REALCALLERIDNUM=9000”) in new stack
– Executing [s@macro-user-callerid:5] NoOp(“SIP/9000-087b5b68”, “REALCALLERIDNUM is 9000”) in new stack
– Executing [s@macro-user-callerid:6] Set(“SIP/9000-087b5b68”, “AMPUSER=9000”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/9000-087b5b68”, “AMPUSERCIDNAME=Farrukh Nadeem”) in new stack
– Executing [s@macro-user-callerid:8] GotoIf(“SIP/9000-087b5b68”, “0?report”) in new stack
– Executing [s@macro-user-callerid:9] Set(“SIP/9000-087b5b68”, “AMPUSERCID=9000”) in new stack
– Executing [s@macro-user-callerid:10] Set(“SIP/9000-087b5b68”, “CALLERID(all)=“Farrukh Nadeem” <9000>”) in new stack
– Executing [s@macro-user-callerid:11] Set(“SIP/9000-087b5b68”, “REALCALLERIDNUM=9000”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/9000-087b5b68”, “0|Set|CHANNEL(language)=”) in new stack
– Executing [s@macro-user-callerid:13] NoOp(“SIP/9000-087b5b68”, “TTL: ARG1: SKIPTTL”) in new stack
– Executing [s@macro-user-callerid:14] GotoIf(“SIP/9000-087b5b68”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,23)
– Executing [s@macro-user-callerid:23] NoOp(“SIP/9000-087b5b68”, “Using CallerID “Farrukh Nadeem” <9000>”) in new stack
– Executing [2@Officeonly_C_rulematch:2] Set(“SIP/9000-087b5b68”, “_NODEST=”) in new stack
– Executing [2@Officeonly_C_rulematch:3] Macro(“SIP/9000-087b5b68”, “record-enable|9000|OUT|”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/9000-087b5b68”, “0?2:4”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/9000-087b5b68”, “recordingcheck|20090410-064230|1239360150.352”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck|20090410-064230|1239360150.352: Outbound recording enabled.
recordingcheck|20090410-064230|1239360150.352: CALLFILENAME=OUT9000-20090410-064230-1239360150.352
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:999] MixMonitor(“SIP/9000-087b5b68”, “OUT9000-20090410-064230-1239360150.352.wav”) in new stack
– Executing [2@Officeonly_C_rulematch:4] Macro(“SIP/9000-087b5b68”, “dialout-trunk|4|2||”) in new stack
== Begin MixMonitor Recording SIP/9000-087b5b68
– Executing [s@macro-dialout-trunk:1] Set(“SIP/9000-087b5b68”, “DIAL_TRUNK=4”) in new stack
– Executing [s@macro-dialout-trunk:2] ExecIf(“SIP/9000-087b5b68”, “0|Authenticate|”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/9000-087b5b68”, “0?disabletrunk|1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/9000-087b5b68”, “DIAL_NUMBER=2”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/9000-087b5b68”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/9000-087b5b68”, “GROUP()=OUT_4”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/9000-087b5b68”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/9000-087b5b68”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/9000-087b5b68”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/9000-087b5b68”, “outbound-callerid|4”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/9000-087b5b68”, “0|SetCallerPres|”) in new stack
– Executing [s@macro-outbound-callerid:2] GotoIf(“SIP/9000-087b5b68”, “1?start”) in new stack
– Goto (macro-outbound-callerid,s,4)
– Executing [s@macro-outbound-callerid:4] NoOp(“SIP/9000-087b5b68”, “REALCALLERIDNUM is 9000”) in new stack
– Executing [s@macro-outbound-callerid:5] GotoIf(“SIP/9000-087b5b68”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,10)
– Executing [s@macro-outbound-callerid:10] Set(“SIP/9000-087b5b68”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:11] Set(“SIP/9000-087b5b68”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:12] Set(“SIP/9000-087b5b68”, “TRUNKOUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:13] GotoIf(“SIP/9000-087b5b68”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,17)
– Executing [s@macro-outbound-callerid:17] GotoIf(“SIP/9000-087b5b68”, “1?usercid”) in new stack
– Goto (macro-outbound-callerid,s,19)
– Executing [s@macro-outbound-callerid:19] GotoIf(“SIP/9000-087b5b68”, “1?report”) in new stack
– Goto (macro-outbound-callerid,s,23)
– Executing [s@macro-outbound-callerid:23] NoOp(“SIP/9000-087b5b68”, “CallerID set to “Farrukh Nadeem” <9000>”) in new stack
– Executing [s@macro-dialout-trunk:12] AGI(“SIP/9000-087b5b68”, “fixlocalprefix”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
– AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/9000-087b5b68”, “OUTNUM=2”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/9000-087b5b68”, “custom=SIP/EMPTY”) in new stack
– Executing [s@macro-dialout-trunk:15] GotoIf(“SIP/9000-087b5b68”, “1?gocall”) in new stack
– Goto (macro-dialout-trunk,s,17)
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/9000-087b5b68”, “dialout-trunk-predial-hook|”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/9000-087b5b68”, “0?bypass|1”) in new stack
– Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/9000-087b5b68”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:20] Dial(“SIP/9000-087b5b68”, “SIP/EMPTY/2|300|”) in new stack
– Called EMPTY/2
– SIP/EMPTY-0885f828 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:21] Goto(“SIP/9000-087b5b68”, “s-CONGESTION|1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf(“SIP/9000-087b5b68”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,3)
– Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp(“SIP/9000-087b5b68”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
– Executing [2@Officeonly_C_rulematch:5] Macro(“SIP/9000-087b5b68”, “outisbusy|”) in new stack
– Executing [s@macro-outisbusy:1] Playback(“SIP/9000-087b5b68”, “all-circuits-busy-now|noanswer”) in new stack
– <SIP/9000-087b5b68> Playing ‘all-circuits-busy-now’ (language ‘en’)
== Parsing ‘/etc/asterisk/manager.conf’: Found
== Parsing ‘/etc/asterisk/manager_additional.conf’: Found
== Parsing ‘/etc/asterisk/manager_custom.conf’: Found
== Manager ‘admin’ logged on from 127.0.0.1
– Executing [s@macro-outisbusy:2] Playback(“SIP/9000-087b5b68”, “pls-try-call-later|noanswer”) in new stack
– <SIP/9000-087b5b68> Playing ‘pls-try-call-later’ (language ‘en’)
== Manager ‘admin’ logged off from 127.0.0.1
– Executing [s@macro-outisbusy:3] Macro(“SIP/9000-087b5b68”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] ResetCDR(“SIP/9000-087b5b68”, “w”) in new stack
– Executing [s@macro-hangupcall:2] NoCDR(“SIP/9000-087b5b68”, “”) in new stack
– Executing [s@macro-hangupcall:3] GotoIf(“SIP/9000-087b5b68”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,6)
– Executing [s@macro-hangupcall:6] GotoIf(“SIP/9000-087b5b68”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] GotoIf(“SIP/9000-087b5b68”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,11)
– Executing [s@macro-hangupcall:11] Hangup(“SIP/9000-087b5b68”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/9000-087b5b68’ in macro ‘hangupcall’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/9000-087b5b68’ in macro ‘outisbusy’
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on ‘SIP/9000-087b5b68’
== End MixMonitor Recording SIP/9000-087b5b68

Further more i have to make dialplane for mobile Ans pstn and these Custom Context will be allow to that users.

Help Me…