Call only to specific number others rejected


(Nodoubt) #1

Hello,

I’ve been evaluating my configuration and found out that whenever makin outbound call, only numbers to 019357XY91 and local 8 digict numbers can pass through.

other numbers such as 019212AX00 or any other numbers failed.

I have checked all the patters, outgoing prefix/suffic, pin (no pins) but couldnt found what blocked me.

here is my dialing patteren

01XXXXXXXXX
0ZZZZZZZZZ
XXXXXXXX

logs for call out as below

====== failed through number

— Executing [019212AX00@from-internal:1] ResetCDR("SIP/5008-00000026", "") in new stack
-- Executing [019212AX00@from-internal:2] NoCDR("SIP/5008-00000026", "") in new stack
-- Executing [019212AX00@from-internal:3] Progress("SIP/5008-00000026", "") in new stack
-- Executing [019212AX00@from-internal:4] Wait("SIP/5008-00000026", "1") in new stack
   > 0x7fb9745bf3f0 -- Probation passed - setting RTP source address to 192.168.7.126:4050
-- Executing [019212AX00@from-internal:5] Playback("SIP/5008-00000026", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack
-- <SIP/5008-00000026> Playing 'silence/1.ulaw' (language 'en')
-- <SIP/5008-00000026> Playing 'cannot-complete-as-dialed.ulaw' (language 'en')
-- <SIP/5008-00000026> Playing 'check-number-dial-again.ulaw' (language 'en')
-- Executing [h@from-internal:1] Macro("SIP/5008-00000026", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/5008-00000026", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [s@macro-hangupcall:3] ExecIf("SIP/5008-00000026", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [s@macro-hangupcall:4] NoOp("SIP/5008-00000026", " montior file= ") in new stack
-- Executing [s@macro-hangupcall:5] GotoIf("SIP/5008-00000026", "1?skipagi") in new stack
-- Goto (macro-hangupcall,s,7)
-- Executing [s@macro-hangupcall:7] Hangup("SIP/5008-00000026", "") in new stack

== Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘SIP/5008-00000026’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/5008-00000026’

====== passed through number

-- Executing [019357XY91@from-internal:1] Macro("SIP/5008-00000027", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("SIP/5008-00000027", "TOUCH_MONITOR=1585206503.294") in new stack
-- Executing [s@macro-user-callerid:2] Set("SIP/5008-00000027", "AMPUSER=5008") in new stack
-- Executing [s@macro-user-callerid:3] Set("SIP/5008-00000027", "HOTDESCKCHAN=5008-00000027") in new stack
-- Executing [s@macro-user-callerid:4] Set("SIP/5008-00000027", "HOTDESKEXTEN=5008") in new stack
-- Executing [s@macro-user-callerid:5] Set("SIP/5008-00000027", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:6] ExecIf("SIP/5008-00000027", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:7] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:8] GotoIf("SIP/5008-00000027", "0?report") in new stack
-- Executing [s@macro-user-callerid:9] ExecIf("SIP/5008-00000027", "1?Set(REALCALLERIDNUM=5008)") in new stack
-- Executing [s@macro-user-callerid:10] Set("SIP/5008-00000027", "AMPUSER=5008") in new stack
-- Executing [s@macro-user-callerid:11] GotoIf("SIP/5008-00000027", "0?limit") in new stack
-- Executing [s@macro-user-callerid:12] Set("SIP/5008-00000027", "AMPUSERCIDNAME=5008") in new stack
-- Executing [s@macro-user-callerid:13] ExecIf("SIP/5008-00000027", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:14] GotoIf("SIP/5008-00000027", "0?report") in new stack
-- Executing [s@macro-user-callerid:15] Set("SIP/5008-00000027", "AMPUSERCID=5008") in new stack
-- Executing [s@macro-user-callerid:16] Set("SIP/5008-00000027", "__DIAL_OPTIONS=Ttr") in new stack
-- Executing [s@macro-user-callerid:17] Set("SIP/5008-00000027", "CALLERID(all)="5008" <5008>") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(all)=EXTERNAL)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("SIP/5008-00000027", "0?limit") in new stack
-- Executing [s@macro-user-callerid:20] ExecIf("SIP/5008-00000027", "1?Set(GROUP(concurrency_limit)=5008)") in new stack
-- Executing [s@macro-user-callerid:21] ExecIf("SIP/5008-00000027", "1?Set(CHANNEL(language)=en)") in new stack
-- Executing [s@macro-user-callerid:22] NoOp("SIP/5008-00000027", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:23] GotoIf("SIP/5008-00000027", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,24)
-- Executing [s@macro-user-callerid:24] GotoIf("SIP/5008-00000027", "1?continue") in new stack
-- Goto (macro-user-callerid,s,43)
-- Executing [s@macro-user-callerid:43] Set("SIP/5008-00000027", "CALLERID(number)=5008") in new stack
-- Executing [s@macro-user-callerid:44] Set("SIP/5008-00000027", "CALLERID(name)=5008") in new stack
-- Executing [s@macro-user-callerid:45] GotoIf("SIP/5008-00000027", "0?cnum") in new stack
-- Executing [s@macro-user-callerid:46] Set("SIP/5008-00000027", "CDR(cnam)=5008") in new stack
-- Executing [s@macro-user-callerid:47] Set("SIP/5008-00000027", "CDR(cnum)=5008") in new stack
-- Executing [s@macro-user-callerid:48] Set("SIP/5008-00000027", "CHANNEL(language)=en") in new stack
-- Executing [019357XY91@from-internal:2] Gosub("SIP/5008-00000027", "sub-record-check,s,1(out,0193576791,no)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/5008-00000027", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/5008-00000027", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/5008-00000027", "NOW=1585206503") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/5008-00000027", "__DAY=26") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/5008-00000027", "__MONTH=03") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/5008-00000027", "__YEAR=2020") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/5008-00000027", "__TIMESTR=20200326-150823") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/5008-00000027", "__FROMEXTEN=5008") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/5008-00000027", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/5008-00000027", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/5008-00000027", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/5008-00000027", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/5008-00000027", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/5008-00000027", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/5008-00000027", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("SIP/5008-00000027", "Outbound Recording Check from 5008 to 019357XY91") in new stack
-- Executing [out@sub-record-check:2] Set("SIP/5008-00000027", "RECMODE=dontcare") in new stack
-- Executing [out@sub-record-check:3] ExecIf("SIP/5008-00000027", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out@sub-record-check:7] Gosub("SIP/5008-00000027", "recordcheck,1(no,out,019357XY91)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/5008-00000027", "Starting recording check against no") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/5008-00000027", "no") in new stack
-- Goto (sub-record-check,recordcheck,12)
-- Executing [recordcheck@sub-record-check:12] Set("SIP/5008-00000027", "__REC_POLICY_MODE=NO") in new stack
-- Executing [recordcheck@sub-record-check:13] Return("SIP/5008-00000027", "") in new stack
-- Executing [out@sub-record-check:8] Return("SIP/5008-00000027", "") in new stack
-- Executing [0193576791@from-internal:3] ExecIf("SIP/5008-00000027", "0 ?Set(CDR(accountcode)=)") in new stack
-- Executing [0193576791@from-internal:4] Set("SIP/5008-00000027", "ROUTE_CIDSAVE="5008" <5008>") in new stack
-- Executing [0193576791@from-internal:5] Set("SIP/5008-00000027", "EMERGENCYROUTE=YES") in new stack
-- Executing [0193576791@from-internal:6] Set("SIP/5008-00000027", "MOHCLASS=default") in new stack
-- Executing [0193576791@from-internal:7] Set("SIP/5008-00000027", "_NODEST=") in new stack
-- Executing [0193576791@from-internal:8] Macro("SIP/5008-00000027", "dialout-trunk,2,019357XY91,,off") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("SIP/5008-00000027", "DIAL_TRUNK=2") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("SIP/5008-00000027", "0?Set(DIAL_OPTIONS=tr)") in new stack
-- Executing [s@macro-dialout-trunk:3] GosubIf("SIP/5008-00000027", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(num)=5008)") in new stack
-- Executing [s@macro-dialout-trunk:5] GotoIf("SIP/5008-00000027", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:6] Set("SIP/5008-00000027", "DIAL_NUMBER=0193576791") in new stack
-- Executing [s@macro-dialout-trunk:7] Set("SIP/5008-00000027", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("SIP/5008-00000027", "OUTBOUND_GROUP=OUT_2") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("SIP/5008-00000027", "DIAL_TRUNK_OPTIONS=T") in new stack
-- Executing [s@macro-dialout-trunk:10] GotoIf("SIP/5008-00000027", "0?nomax") in new stack
-- Executing [s@macro-dialout-trunk:11] GotoIf("SIP/5008-00000027", "0?chanfull") in new stack
-- Executing [s@macro-dialout-trunk:12] GotoIf("SIP/5008-00000027", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:13] Macro("SIP/5008-00000027", "outbound-callerid,2") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("SIP/5008-00000027", "5008") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("SIP/5008-00000027", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("SIP/5008-00000027", "all") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] Set("SIP/5008-00000027", "HOTDESCKCHAN=5008-00000027") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("SIP/5008-00000027", "HOTDESKEXTEN=5008") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("SIP/5008-00000027", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-outbound-callerid:9] ExecIf("SIP/5008-00000027", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-outbound-callerid:10] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:11] Set("SIP/5008-00000027", "ALLOWTHISROUTE=NO") in new stack
-- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/5008-00000027", "1?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/5008-00000027", "0?Hangup()") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/5008-00000027", "0?Set(REALCALLERIDNUM=5008)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("SIP/5008-00000027", "0?Set(AMPUSER=5008)") in new stack
-- Executing [s@macro-outbound-callerid:16] GotoIf("SIP/5008-00000027", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [s@macro-outbound-callerid:20] Set("SIP/5008-00000027", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:21] Set("SIP/5008-00000027", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("SIP/5008-00000027", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:23] Set("SIP/5008-00000027", "TRUNKOUTCID=0382130585") in new stack
-- Executing [s@macro-outbound-callerid:24] GotoIf("SIP/5008-00000027", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,30)
-- Executing [s@macro-outbound-callerid:30] ExecIf("SIP/5008-00000027", "1?Set(CALLERID(all)=0382XXXX85)") in new stack
-- Executing [s@macro-outbound-callerid:31] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:32] ExecIf("SIP/5008-00000027", "1?Set(CALLERID(all)=0382XXXX85)") in new stack
-- Executing [s@macro-outbound-callerid:33] ExecIf("SIP/5008-00000027", "0?Set(CALLERID(all)=5008)") in new stack
-- Executing [s@macro-outbound-callerid:34] Set("SIP/5008-00000027", "TIOHIDE=no") in new stack
-- Executing [s@macro-outbound-callerid:35] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:36] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:37] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:38] ExecIf("SIP/5008-00000027", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:39] Set("SIP/5008-00000027", "CALLERID(name)=") in new stack
-- Executing [s@macro-outbound-callerid:40] Set("SIP/5008-00000027", "CDR(outbound_cnum)=0382XXXX85") in new stack
-- Executing [s@macro-outbound-callerid:41] Set("SIP/5008-00000027", "CDR(outbound_cnam)=") in new stack

[2020-03-26 15:08:23] WARNING[13537]: func_cdr.c:377 cdr_write_callback: CDR requires a value (CDR(variable)=value)
– Executing [s@macro-dialout-trunk:14] GosubIf(“SIP/5008-00000027”, “1?sub-flp-2,s,1()”) in new stack
– Executing [s@sub-flp-2:1] ExecIf(“SIP/5008-00000027”, “0?Return()”) in new stack
– Executing [s@sub-flp-2:2] ExecIf(“SIP/5008-00000027”, “1?Return()”) in new stack
– Executing [s@macro-dialout-trunk:15] Set(“SIP/5008-00000027”, “OUTNUM=019357XY91”) in new stack
– Executing [s@macro-dialout-trunk:16] Set(“SIP/5008-00000027”, “custom=DAHDI/1”) in new stack
– Executing [s@macro-dialout-trunk:17] ExecIf(“SIP/5008-00000027”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
– Executing [s@macro-dialout-trunk:18] ExecIf(“SIP/5008-00000027”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:19] Macro(“SIP/5008-00000027”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/5008-00000027”, “”) in new stack
– Executing [s@macro-dialout-trunk:20] GotoIf(“SIP/5008-00000027”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:21] ExecIf(“SIP/5008-00000027”, “1?Set(CONNECTEDLINE(num,i)=019357XY91)”) in new stack
– Executing [s@macro-dialout-trunk:22] ExecIf(“SIP/5008-00000027”, “1?Set(CONNECTEDLINE(name,i)=CID:0382XXXX85)”) in new stack
– Executing [s@macro-dialout-trunk:23] ExecIf(“SIP/5008-00000027”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)0382130585)”) in new stack
– Executing [s@macro-dialout-trunk:24] GotoIf(“SIP/5008-00000027”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:25] ExecIf(“SIP/5008-00000027”, “0?Set(DIAL_TRUNK_OPTIONS=)”) in new stack
– Executing [s@macro-dialout-trunk:26] Dial(“SIP/5008-00000027”, “DAHDI/1/019357XY91,300,Tb(func-apply-sipheaders^s^1,(2))”) in new stack
– DAHDI/1-1 Internal Gosub(func-apply-sipheaders,s,1(2)) start
– Executing [s@func-apply-sipheaders:1] NoOp(“DAHDI/1-1”, “Applying SIP Headers to channel DAHDI/1-1”) in new stack
– Executing [s@func-apply-sipheaders:2] Set(“DAHDI/1-1”, “TECH=DAHDI”) in new stack
– Executing [s@func-apply-sipheaders:3] Set(“DAHDI/1-1”, “SIPHEADERKEYS=”) in new stack
– Executing [s@func-apply-sipheaders:4] While(“DAHDI/1-1”, “0”) in new stack
– Jumping to priority 12
– Executing [s@func-apply-sipheaders:13] Return(“DAHDI/1-1”, “”) in new stack
== Spawn extension (from-analog, 019357XY91, 1) exited non-zero on ‘DAHDI/1-1’
– DAHDI/1-1 Internal Gosub(func-apply-sipheaders,s,1(2)) complete GOSUB_RETVAL=
– Called DAHDI/1/01935XY791
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’


#2

019212AX00 doesn’t match
01XXXXXXXXX because the pattern requires 9 digits after the 01 and you have only 8.

It also doesn’t match
0ZZZZZZZZZ because Z matches any digit other than 0, and your number has zeros at the end.

And it doesn’t match your local number pattern
XXXXXXXX because the pattern is 8 digits and your number has 10.

What country are you in? What kinds of numbers are you trying to match?

Assuming that local numbers don’t begin with 0, you could match all non-local numbers with
0X.


(Nodoubt) #3

I am in Malaysia.

funny thing is that

019212AX00 doesn’t match
01XXXXXXXXX because the pattern requires 9 digits after the 01 and you have only 8.

019357XY91 matches 01XXXXXXXXX ?

for local number patters there will be 8 digits number

mobile numbers will have 2 types which comes with prefix
010, 011, 012, 013, 014, 016, 017, 018, 019 + 7 digits
and
011, 015 + 8 digit numbers (currently)

by the way, dialing pattern in trunks need to be defined also or just leave it blanks. just make use patterns in outbound route ?


#4

If you are not trying to restrict what can be dialed, just use
X.
which will match anything with 2 or more digits (that doesn’t conflict with extension numbers or feature codes).

If you want to allow only specific destinations, see


and construct your patterns accordingly.

In any case, make sure that 112 and 999 work properly.


(Nodoubt) #5

thanks very much. does 112 & 999 must be on the top most of the dialplan or it does not matter about the positioning ?