Outbound Routes and dialplan issue

Hello All,

When I have mutliple outbound caller ID’s I tend to make it where you dial prefix 9 for one ID, 8 for another and so on.
I have a situation where there is no prefix for one of the numbers and we do have a prefix for the other.

I move the number with a prefix to the top of the outbound rules so that if it matches it takes that route first, however no matter what I do ( even placing that rule at the end ) it comes up with all circuits busy.

Any suggestions?

Anyone?

What does asterisk show it is dialing for a number and what cause code is it returning when the call fails.

Hi Tony,

I setup the first outbound route with 10 digit dialing and a 7 prefix and the second route with no prefix.

I do see in the logging that when dialing the 7 prefix only 10 numbers are accepted so the 11th number gets truncated. Result is all circuits are busy.
As you can see we modified the numbers, but all are in the right place.
Trying to dial 203 777 1234 with the 7 prefix.

Thanks!

Results:

– Executing [7203777123@from-internal:1] Macro(“SIP/4600-00000e3e”, “user-callerid,LIMIT,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/4600-00000e3e”, “AMPUSER=4600”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/4600-00000e3e”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/4600-00000e3e”, “1?Set(REALCALLERIDNUM=4600)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/4600-00000e3e”, “AMPUSER=4600”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/4600-00000e3e”, “AMPUSERCIDNAME=Operator”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/4600-00000e3e”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/4600-00000e3e”, “AMPUSERCID=4600”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/4600-00000e3e”, “CALLERID(all)=“Operator” <4600>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/4600-00000e3e”, “0?limit”) in new stack
– Executing [s@macro-user-callerid:10] ExecIf(“SIP/4600-00000e3e”, “1?Set(GROUP(concurrency_limit)=4600)”) in new stack
– Executing [s@macro-user-callerid:11] GosubIf(“SIP/4600-00000e3e”, “7?sub-ccss,s,1(from-internal,7203777123)”) in new stack
– Executing [s@sub-ccss:1] ExecIf(“SIP/4600-00000e3e”, “0?Return()”) in new stack
– Executing [s@sub-ccss:2] Set(“SIP/4600-00000e3e”, “CCSS_SETUP=TRUE”) in new stack
– Executing [s@sub-ccss:3] GosubIf(“SIP/4600-00000e3e”, “0?monitor_config,1(from-internal,7203777123):monitor_default,1(from-internal,7203777123)”) in new stack
– Executing [monitor_default@sub-ccss:1] GotoIf(“SIP/4600-00000e3e”, “0?is_exten”) in new stack
– Executing [monitor_default@sub-ccss:2] StackPop(“SIP/4600-00000e3e”, “”) in new stack
– Executing [monitor_default@sub-ccss:3] Return(“SIP/4600-00000e3e”, “FALSE”) in new stack
– Executing [s@macro-user-callerid:12] ExecIf(“SIP/4600-00000e3e”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:13] GotoIf(“SIP/4600-00000e3e”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,26)
– Executing [s@macro-user-callerid:26] Set(“SIP/4600-00000e3e”, “CALLERID(number)=4600”) in new stack
– Executing [s@macro-user-callerid:27] Set(“SIP/4600-00000e3e”, “CALLERID(name)=Operator”) in new stack
– Executing [s@macro-user-callerid:28] Set(“SIP/4600-00000e3e”, “CHANNEL(language)=en”) in new stack
– Executing [7203777123@from-internal:2] Set(“SIP/4600-00000e3e”, “MOHCLASS=default”) in new stack
– Executing [7203777123@from-internal:3] ExecIf(“SIP/4600-00000e3e”, “1?Set(TRUNKCIDOVERRIDE=“Company Name”<1111111111>)”) in new stack
– Executing [7203777123@from-internal:4] Set(“SIP/4600-00000e3e”, “_NODEST=”) in new stack
– Executing [7203777123@from-internal:5] Gosub(“SIP/4600-00000e3e”, “sub-record-check,s,1(out,7203777123,)”) in new stack
– Executing [s@sub-record-check:1] GotoIf(“SIP/4600-00000e3e”, “1?check”) in new stack
– Goto (sub-record-check,s,3)
– Executing [s@sub-record-check:3] Set(“SIP/4600-00000e3e”, “MON_FMT=wav”) in new stack
– Executing [s@sub-record-check:4] GotoIf(“SIP/4600-00000e3e”, “1?next”) in new stack
– Goto (sub-record-check,s,7)
– Executing [s@sub-record-check:7] ExecIf(“SIP/4600-00000e3e”, “0?Return()”) in new stack
– Executing [s@sub-record-check:8] GotoIf(“SIP/4600-00000e3e”, “0?out,1”) in new stack
– Executing [s@sub-record-check:9] Set(“SIP/4600-00000e3e”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [s@sub-record-check:10] ExecIf(“SIP/4600-00000e3e”, “0?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [s@sub-record-check:11] Set(“SIP/4600-00000e3e”, “NOW=1333730448”) in new stack
– Executing [s@sub-record-check:12] Set(“SIP/4600-00000e3e”, “__DAY=06”) in new stack
– Executing [s@sub-record-check:13] Set(“SIP/4600-00000e3e”, “__MONTH=04”) in new stack
– Executing [s@sub-record-check:14] Set(“SIP/4600-00000e3e”, “__YEAR=2012”) in new stack
– Executing [s@sub-record-check:15] Set(“SIP/4600-00000e3e”, “__TIMESTR=20120406-124048”) in new stack
– Executing [s@sub-record-check:16] Set(“SIP/4600-00000e3e”, “__FROMEXTEN=4600”) in new stack
– Executing [s@sub-record-check:17] Set(“SIP/4600-00000e3e”, “__CALLFILENAME=out-7203777123-4600-20120406-124048-1333730448.7120”) in new stack
– Executing [s@sub-record-check:18] Goto(“SIP/4600-00000e3e”, “out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [out@sub-record-check:1] ExecIf(“SIP/4600-00000e3e”, “1?Set(__REC_POLICY_MODE=)”) in new stack
– Executing [out@sub-record-check:2] GosubIf(“SIP/4600-00000e3e”, “0?record,1(exten,7203777123,4600)”) in new stack
– Executing [out@sub-record-check:3] Return(“SIP/4600-00000e3e”, “”) in new stack
– Executing [7203777123@from-internal:6] Macro(“SIP/4600-00000e3e”, “dialout-trunk,5,7203777123,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK=5”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/4600-00000e3e”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/4600-00000e3e”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/4600-00000e3e”, “DIAL_NUMBER=7203777123”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/4600-00000e3e”, “OUTBOUND_GROUP=OUT_5”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/4600-00000e3e”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/4600-00000e3e”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/4600-00000e3e”, “outbound-callerid,5”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/4600-00000e3e”, “0?Set(REALCALLERIDNUM=4600)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/4600-00000e3e”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/4600-00000e3e”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/4600-00000e3e”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/4600-00000e3e”, “TRUNKOUTCID=“Company Name”<1111111111>”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/4600-00000e3e”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/4600-00000e3e”, “1?Set(CALLERID(all)=“Company Name”<1111111111>)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/4600-00000e3e”, “1?Set(CALLERID(all)=Company Name<1111111111>)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/4600-00000e3e”, “0?sub-flp-5,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/4600-00000e3e”, “OUTNUM=7203777123”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/4600-00000e3e”, “custom=SIP/TRUNK-1”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/4600-00000e3e”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/4600-00000e3e”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/4600-00000e3e”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/4600-00000e3e”, “”) in new stack
pbxCLI>
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/4600-00000e3e”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/4600-00000e3e”, “1?Set(CONNECTEDLINE(num,i)=7203777123)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/4600-00000e3e”, “1?Set(CONNECTEDLINE(name,i)=CID:1111111111)”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/4600-00000e3e”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:22] Dial(“SIP/4600-00000e3e”, “SIP/TRUNK-1/7203777123,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/TRUNK-1/7203777123
– Got SIP response 503 “No Circuit Available” back from 64.136.174.30:5060
– SIP/TRUNK-1-00000e3f is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/4600-00000e3e”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in new stack
– Executing [s@macro-dialout-trunk:24] Goto(“SIP/4600-00000e3e”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/4600-00000e3e”, “RC=34”) in new stack
– Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/4600-00000e3e”, “34,1”) in new stack
– Goto (macro-dialout-trunk,34,1)
– Executing [34@macro-dialout-trunk:1] Goto(“SIP/4600-00000e3e”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/4600-00000e3e”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/4600-00000e3e”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:4] Set(“SIP/4600-00000e3e”, “CALLERID(number)=4600”) in new stack
– Executing [7203777123@from-internal:7] Macro(“SIP/4600-00000e3e”, “dialout-trunk,2,7203777123,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK=2”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/4600-00000e3e”, “0?sub-pincheck,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/4600-00000e3e”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/4600-00000e3e”, “DIAL_NUMBER=7203777123”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/4600-00000e3e”, “OUTBOUND_GROUP=OUT_2”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/4600-00000e3e”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/4600-00000e3e”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/4600-00000e3e”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/4600-00000e3e”, “outbound-callerid,2”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/4600-00000e3e”, “0?Set(REALCALLERIDNUM=4600)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/4600-00000e3e”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/4600-00000e3e”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/4600-00000e3e”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/4600-00000e3e”, “TRUNKOUTCID=“Company Name”<1111111111>”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/4600-00000e3e”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/4600-00000e3e”, “1?Set(CALLERID(all)=“Company Name”<1111111111>)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/4600-00000e3e”, “1?Set(CALLERID(all)=Company Name<1111111111>)”) in new stack
– Executing [s@macro-outbound-callerid:15] ExecIf(“SIP/4600-00000e3e”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] GosubIf(“SIP/4600-00000e3e”, “0?sub-flp-2,s,1()”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/4600-00000e3e”, “OUTNUM=7203777123”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/4600-00000e3e”, “custom=SIP/TRUNK-12”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/4600-00000e3e”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default))”) in new stack
– Executing [s@macro-dialout-trunk:16] ExecIf(“SIP/4600-00000e3e”, “0?Set(DIAL_TRUNK_OPTIONS=M(confirm))”) in new stack
– Executing [s@macro-dialout-trunk:17] Macro(“SIP/4600-00000e3e”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/4600-00000e3e”, “”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/4600-00000e3e”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:19] ExecIf(“SIP/4600-00000e3e”, “1?Set(CONNECTEDLINE(num,i)=7203777123)”) in new stack
– Executing [s@macro-dialout-trunk:20] ExecIf(“SIP/4600-00000e3e”, “1?Set(CONNECTEDLINE(name,i)=CID:1111111111)”) in new stack
– Executing [s@macro-dialout-trunk:21] GotoIf(“SIP/4600-00000e3e”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:22] Dial(“SIP/4600-00000e3e”, “SIP/TRUNK-12/7203777123,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/TRUNK-12/7203777123
pbx
CLI>
– Got SIP response 503 “No Circuit Available” back from 164.3.54.138:5060
– SIP/TRUNK-12-00000e40 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:23] NoOp(“SIP/4600-00000e3e”, “Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 34”) in new stack
– Executing [s@macro-dialout-trunk:24] Goto(“SIP/4600-00000e3e”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] Set(“SIP/4600-00000e3e”, “RC=34”) in new stack
– Executing [s-CONGESTION@macro-dialout-trunk:2] Goto(“SIP/4600-00000e3e”, “34,1”) in new stack
– Goto (macro-dialout-trunk,34,1)
– Executing [34@macro-dialout-trunk:1] Goto(“SIP/4600-00000e3e”, “continue,1”) in new stack
– Goto (macro-dialout-trunk,continue,1)
– Executing [continue@macro-dialout-trunk:1] GotoIf(“SIP/4600-00000e3e”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,continue,3)
– Executing [continue@macro-dialout-trunk:3] NoOp(“SIP/4600-00000e3e”, “TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 34 - failing through to other trunks”) in new stack
– Executing [continue@macro-dialout-trunk:4] Set(“SIP/4600-00000e3e”, “CALLERID(number)=4600”) in new stack
– Executing [7203777123@from-internal:8] Macro(“SIP/4600-00000e3e”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Progress(“SIP/4600-00000e3e”, “”) in new stack
– Executing [s@macro-outisbusy:2] GotoIf(“SIP/4600-00000e3e”, “0?emergency,1”) in new stack
– Executing [s@macro-outisbusy:3] GotoIf(“SIP/4600-00000e3e”, “0?intracompany,1”) in new stack
– Executing [s@macro-outisbusy:4] Playback(“SIP/4600-00000e3e”, “all-circuits-busy-now&pls-try-call-later, noanswer”) in new stack
– <SIP/4600-00000e3e> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
– <SIP/4600-00000e3e> Playing ‘pls-try-call-later.ulaw’ (language ‘en’)

The problem is your phone is not passing the whole number. It is only passing 10 digits. You need to look at why your phone is cutting off the last digit.

Hi Tony,

Verified my dial plan looks good:

(xxx|xxxx|xx|xxx|xxx|xxxx|xxxx*[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)

Compared that to others I use and they are identical.

Actually am I confusing the 2-9 and the 3469 ?

I verified not only does the dial plan work properly by testing on a phone system, but also through this nice tool I found http://supremeit.com/voip/dialplan.php

Any ideas?