Different Outbound Routes for different extensions

I have a few extensions and have one outbound route with the dial pattern configured. This allows outbound calls to be routed through our service provider. However, I am looking to lock down some extensions to calling internal extensions only, and some extensions from calling internal and emergency only.

Any ideas how I can achieve this?

Thanks

Have you tried setting an outbound route with dial pattern matching for each of these scenarios? Use the caller ID in the dial pattern area to match the caller id e.g. extension number of the extension you want to allow to dial that pattern.

-Eric

basically extension routes module will do what you need.
set up different outbound routes to your liking and assign them per extension

Create an outbound route for each extension you want to block and place it at the very top (after your emergency route if you want the extension to be able to call 911). The dial pattern will be…

()+|./extensionumber.

Direct that route to a trunk that is disabled. I always create a trunk called “DEADRESTRICTED” and leave it disabled for such purposes.

Please help guys… my incoming calls is ok but in my outgoing calls is invalid call… Can you check what is my problem… thank you in advance…

[2016-01-14 16:49:04] VERBOSE[20144][C-00000040] netsock2.c: == Using SIP RTP TOS bits 184
[2016-01-14 16:49:04] VERBOSE[20144][C-00000040] netsock2.c: == Using SIP RTP CoS mark 5
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] Macro(“SIP/502-0000003c”, “user-callerid,LIMIT”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] Set(“SIP/502-0000003c”, “TOUCH_MONITOR=1452761344.101”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Set(“SIP/502-0000003c”, “AMPUSER=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/502-0000003c”, “0?report”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:4] ExecIf(“SIP/502-0000003c”, “1?Set(REALCALLERIDNUM=502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:5] Set(“SIP/502-0000003c”, “AMPUSER=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:6] GotoIf(“SIP/502-0000003c”, “0?limit”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] Set(“SIP/502-0000003c”, “AMPUSERCIDNAME=Edward Cedrick Malihan”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:8] GotoIf(“SIP/502-0000003c”, “0?report”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:9] Set(“SIP/502-0000003c”, “AMPUSERCID=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:10] Set(“SIP/502-0000003c”, “__DIAL_OPTIONS=Ttr”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:11] Set(“SIP/502-0000003c”, “CALLERID(all)=“Edward Cedrick Malihan” <502>”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:12] GotoIf(“SIP/502-0000003c”, “0?limit”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:13] ExecIf(“SIP/502-0000003c”, “1?Set(GROUP(concurrency_limit)=502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:14] ExecIf(“SIP/502-0000003c”, “0?Set(CHANNEL(language)=)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:15] GotoIf(“SIP/502-0000003c”, “1?continue”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (macro-user-callerid,s,29)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:29] Set(“SIP/502-0000003c”, “CALLERID(number)=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:30] Set(“SIP/502-0000003c”, “CALLERID(name)=Edward Cedrick Malihan”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:31] Set(“SIP/502-0000003c”, “CDR(cnum)=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:32] Set(“SIP/502-0000003c”, “CDR(cnam)=Edward Cedrick Malihan”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:33] Set(“SIP/502-0000003c”, “CHANNEL(language)=en”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Set(“SIP/502-0000003c”, “ROUTEUSER=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/502-0000003c”, “1?notblind”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (from-internal,9892568,6)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:6] GotoIf(“SIP/502-0000003c”, “1?restrictedroute-a87ff679a2f3e71d9181a67b7542122c,9892568,2:outbound-allroutes,9892568,2”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (restrictedroute-a87ff679a2f3e71d9181a67b7542122c,9892568,2)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Gosub(“SIP/502-0000003c”, “sub-record-check,s,1(out,9892568,dontcare)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/502-0000003c”, “0?initialized”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Set(“SIP/502-0000003c”, “__REC_STATUS=INITIALIZED”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] Set(“SIP/502-0000003c”, “NOW=1452761344”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:4] Set(“SIP/502-0000003c”, “__DAY=14”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:5] Set(“SIP/502-0000003c”, “__MONTH=01”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:6] Set(“SIP/502-0000003c”, “__YEAR=2016”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] Set(“SIP/502-0000003c”, “__TIMESTR=20160114-164904”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:8] Set(“SIP/502-0000003c”, “__FROMEXTEN=502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:9] Set(“SIP/502-0000003c”, “__MON_FMT=wav”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:10] NoOp(“SIP/502-0000003c”, “Recordings initialized”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:11] ExecIf(“SIP/502-0000003c”, “0?Set(ARG3=dontcare)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:12] Set(“SIP/502-0000003c”, “REC_POLICY_MODE_SAVE=”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:13] ExecIf(“SIP/502-0000003c”, “0?Set(REC_STATUS=NO)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:14] GotoIf(“SIP/502-0000003c”, “3?checkaction”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (sub-record-check,s,17)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:17] GotoIf(“SIP/502-0000003c”, “1?sub-record-check,out,1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (sub-record-check,out,1)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/502-0000003c”, “Outbound Recording Check from 502 to 9892568”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Set(“SIP/502-0000003c”, “RECMODE=dontcare”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/502-0000003c”, “1?Goto(routewins)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (sub-record-check,out,7)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] Gosub(“SIP/502-0000003c”, “recordcheck,1(dontcare,out,9892568)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/502-0000003c”, “Starting recording check against dontcare”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Goto(“SIP/502-0000003c”, “dontcare”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (sub-record-check,recordcheck,3)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] Return(“SIP/502-0000003c”, “”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:8] Return(“SIP/502-0000003c”, “”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/502-0000003c”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:4] Set(“SIP/502-0000003c”, “MOHCLASS=default”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:5] ExecIf(“SIP/502-0000003c”, “1?Set(TRUNKCIDOVERRIDE=<3173502>)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:6] Set(“SIP/502-0000003c”, “_NODEST=”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] Macro(“SIP/502-0000003c”, “dialout-trunk,1,9892568,off”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] Set(“SIP/502-0000003c”, “DIAL_TRUNK=1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] GosubIf(“SIP/502-0000003c”, “0?sub-pincheck,s,1()”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/502-0000003c”, “0?disabletrunk,1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:4] Set(“SIP/502-0000003c”, “DIAL_NUMBER=9892568”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:5] Set(“SIP/502-0000003c”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:6] Set(“SIP/502-0000003c”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] GotoIf(“SIP/502-0000003c”, “1?nomax”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (macro-dialout-trunk,s,9)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/502-0000003c”, “0?skipoutcid”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:10] Set(“SIP/502-0000003c”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:11] Macro(“SIP/502-0000003c”, “outbound-callerid,1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] ExecIf(“SIP/502-0000003c”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] ExecIf(“SIP/502-0000003c”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/502-0000003c”, “0?Set(REALCALLERIDNUM=502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:4] GotoIf(“SIP/502-0000003c”, “1?normcid”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (macro-outbound-callerid,s,7)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:7] Set(“SIP/502-0000003c”, “USEROUTCID=3173502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:8] Set(“SIP/502-0000003c”, “EMERGENCYCID=”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:9] Set(“SIP/502-0000003c”, “TRUNKOUTCID=”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:10] GotoIf(“SIP/502-0000003c”, “1?trunkcid”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Goto (macro-outbound-callerid,s,15)
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/502-0000003c”, “0?Set(CALLERID(all)=)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:16] ExecIf(“SIP/502-0000003c”, “1?Set(CALLERID(all)=3173502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:17] ExecIf(“SIP/502-0000003c”, “1?Set(CALLERID(all)=<3173502>)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:18] ExecIf(“SIP/502-0000003c”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:19] ExecIf(“SIP/502-0000003c”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:20] Set(“SIP/502-0000003c”, “CDR(outbound_cnum)=3173502”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:21] Set(“SIP/502-0000003c”, “CDR(outbound_cnam)=”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:12] GosubIf(“SIP/502-0000003c”, “1?sub-flp-1,s,1()”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] ExecIf(“SIP/502-0000003c”, “0?Return()”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:2] Return(“SIP/502-0000003c”, “”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:13] Set(“SIP/502-0000003c”, “OUTNUM=9892568”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:14] Set(“SIP/502-0000003c”, “custom=DAHDI/g0”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/502-0000003c”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:16] ExecIf(“SIP/502-0000003c”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:17] Macro(“SIP/502-0000003c”, “dialout-trunk-predial-hook,”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] MacroExit(“SIP/502-0000003c”, “”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:18] GotoIf(“SIP/502-0000003c”, “0?bypass,1”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:19] ExecIf(“SIP/502-0000003c”, “1?Set(CONNECTEDLINE(num,i)=9892568)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:20] ExecIf(“SIP/502-0000003c”, “1?Set(CONNECTEDLINE(name,i)=CID:3173502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:21] ExecIf(“SIP/502-0000003c”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)3173502)”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:22] GotoIf(“SIP/502-0000003c”, “0?customtrunk”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:23] Dial(“SIP/502-0000003c”, “DAHDI/g0/9892568,300,Tt”) in new stack
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] sig_pri.c: – Requested transfer capability: 0x00 - SPEECH
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] app_dial.c: – Called DAHDI/g0/9892568
[2016-01-14 16:49:04] VERBOSE[10790][C-00000040] app_dial.c: – DAHDI/i1/9892568-2a is making progress passing it to SIP/502-0000003c
[2016-01-14 16:49:05] VERBOSE[10790][C-00000040] chan_dahdi.c: – Hungup ‘DAHDI/i1/9892568-2a’
[2016-01-14 16:49:05] VERBOSE[10790][C-00000040] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on ‘SIP/502-0000003c’ in macro ‘dialout-trunk’
[2016-01-14 16:49:05] VERBOSE[10790][C-00000040] pbx.c: == Spawn extension (restrictedroute-a87ff679a2f3e71d9181a67b7542122c, 9892568, 7) exited non-zero on ‘SIP/502-0000003c’
[2016-01-14 16:49:05] VERBOSE[10790][C-00000040] pbx.c: – Executing [[email protected]:1] Hangup(“SIP/502-0000003c”, “”) in new stack
[2016-01-14 16:49:05] VERBOSE[10790][C-00000040] pbx.c: == Spawn extension (restrictedroute-a87ff679a2f3e71d9181a67b7542122c, h, 1) exited non-zero on ‘SIP/502-0000003c’