Extension Routing Module

Asterisk 11.9.0 and CentOS 6.5

Downloaded and installed extension routing module. Used it to disallow certain extensions from accessing certain routes. Was surprised to see it is not working. Even though I have disallowed extensions in the outbound route, they don’t get blocked and my setting is ignored. Below example, 1112 can make a call out on this route…

Hi Avayax,

I am running Asterisk 11.14.2, CentOS 6.6, FPBX 12.0.19, and Ext Routes 12.0.7

I cannot replicate this, but if you can look for this in your logs, it would be helpful. Below are mine from my test extension; in my case, 0 = blocked, 1 = allowed.

-- Executing [**MyDirectLine**@from-internal:3] GotoIf("SIP/666-00000014", "1?restrictedroute-0,**MyDirectLine**,2:outbound-allroutes,**MyDirectLine**,2") in new stack
-- Goto (restrictedroute-0,**MyDirectLine**,2)

-- Executing [**MyDirectLine**@from-internal:3] GotoIf("SIP/666-00000015", "1?restrictedroute-1,**MyDirectLine**,2:outbound-allroutes,**MyDirectLine**,2") in new stack
-- Goto (restrictedroute-1,**MyDirectLine**,2)

If you grep your asterisk log you should get it; for example, if you were calling 8005554202:

grep "restrictedroute" /var/log/asterisk/full | grep "8005554202" | grep "Goto" grep "restrictedroute" /var/log/asterisk/full | grep "#YouDialed" | grep "Goto"

Paste the output in code brackets here and that’ll help identify the problem. Depending on that, the next thing we might ask for is the output of amportal a context restrictedroute-# where # is replaced by the numbers appearing in your greps. The blocked route should output nothing, and the unblocked should basically be 2 include lines (custom + your outbound route) with an exten => null blah blah blah after it.

If the grep doesn’t give us enough to go on though, we’d want the whole call: (replace your UID with that from your earlier grep)

Thanks a lot for your post.
I got the extension routing module to block an extension from accessing an outbound route if the dial pattern is composed of regular numbers. However, if I dial digits other then numbers, my extension routing roule doesn’t apply.
E.g., I want to send *102 out on the trunk and I have configured an outbound route accordingly. 5313 should not be able to access this route, but it does.

The complete call:
[2014-12-19 17:04:51] VERBOSE[12031][C-000001e1] netsock2.c: == Using SIP VIDEO CoS mark 6
[2014-12-19 17:04:51] VERBOSE[12031][C-000001e1] netsock2.c: == Using SIP RTP TOS bits 184
[2014-12-19 17:04:51] VERBOSE[12031][C-000001e1] netsock2.c: == Using SIP RTP CoS mark 5
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:1] Macro(“SIP/5313-00000219”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] Set(“SIP/5313-00000219”, “TOUCH_MONITOR=1419026691.938”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Set(“SIP/5313-00000219”, “AMPUSER=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/5313-00000219”, “0?report”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:4] ExecIf(“SIP/5313-00000219”, “1?Set(REALCALLERIDNUM=5313)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:5] Set(“SIP/5313-00000219”, “AMPUSER=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:6] GotoIf(“SIP/5313-00000219”, “0?limit”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] Set(“SIP/5313-00000219”, “AMPUSERCIDNAME=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] GotoIf(“SIP/5313-00000219”, “0?report”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:9] Set(“SIP/5313-00000219”, “AMPUSERCID=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:10] Set(“SIP/5313-00000219”, “__DIAL_OPTIONS=Ttr”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:11] Set(“SIP/5313-00000219”, “CALLERID(all)=“Johann Remote Office” <5313>”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:12] GotoIf(“SIP/5313-00000219”, “0?limit”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:13] ExecIf(“SIP/5313-00000219”, “1?Set(GROUP(concurrency_limit)=5313)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:14] GosubIf(“SIP/5313-00000219”, “7?sub-ccss,s,1(from-internal,*102)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] ExecIf(“SIP/5313-00000219”, “0?Return()”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Set(“SIP/5313-00000219”, “CCSS_SETUP=TRUE”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] GosubIf(“SIP/5313-00000219”, “0?monitor_config,1(from-internal,*102):monitor_default,1(from-internal,*102)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/5313-00000219”, “0?is_exten”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] StackPop(“SIP/5313-00000219”, “”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] Return(“SIP/5313-00000219”, “FALSE”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/5313-00000219”, “0?Set(CHANNEL(language)=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:16] GotoIf(“SIP/5313-00000219”, “1?continue”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-user-callerid,s,30)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:30] Set(“SIP/5313-00000219”, “CALLERID(number)=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:31] Set(“SIP/5313-00000219”, “CALLERID(name)=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:32] Set(“SIP/5313-00000219”, “CDR(cnum)=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:33] Set(“SIP/5313-00000219”, “CDR(cnam)=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:34] Set(“SIP/5313-00000219”, “CHANNEL(language)=en”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:2] Gosub(“SIP/5313-00000219”, “sub-record-check,s,1(out,*102,dontcare)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/5313-00000219”, “0?initialized”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Set(“SIP/5313-00000219”, “__REC_STATUS=INITIALIZED”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] Set(“SIP/5313-00000219”, “NOW=1419026691”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:4] Set(“SIP/5313-00000219”, “__DAY=19”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:5] Set(“SIP/5313-00000219”, “__MONTH=12”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:6] Set(“SIP/5313-00000219”, “__YEAR=2014”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] Set(“SIP/5313-00000219”, “__TIMESTR=20141219-170451”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] Set(“SIP/5313-00000219”, “__FROMEXTEN=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:9] Set(“SIP/5313-00000219”, “__MON_FMT=wav”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:10] NoOp(“SIP/5313-00000219”, “Recordings initialized”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:11] ExecIf(“SIP/5313-00000219”, “0?Set(ARG3=dontcare)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:12] Set(“SIP/5313-00000219”, “REC_POLICY_MODE_SAVE=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:13] GotoIf(“SIP/5313-00000219”, “3?checkaction”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (sub-record-check,s,16)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:16] GotoIf(“SIP/5313-00000219”, “1?sub-record-check,out,1”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (sub-record-check,out,1)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/5313-00000219”, “Outbound Recording Check from 5313 to *102”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Set(“SIP/5313-00000219”, “RECMODE=dontcare”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/5313-00000219”, “1?Goto(routewins)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (sub-record-check,out,7)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] Gosub(“SIP/5313-00000219”, “recordcheck,1(dontcare,out,*102)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/5313-00000219”, “Starting recording check against dontcare”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Goto(“SIP/5313-00000219”, “dontcare”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (sub-record-check,recordcheck,3)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] Return(“SIP/5313-00000219”, “”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] Return(“SIP/5313-00000219”, “”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:3] ExecIf(“SIP/5313-00000219”, “0 ?Set(CDR(accountcode)=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:4] Set(“SIP/5313-00000219”, “MOHCLASS=default”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:5] Set(“SIP/5313-00000219”, “_NODEST=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [*[email protected]:6] Macro(“SIP/5313-00000219”, “dialout-trunk,20,102,off") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]trunk:1] Set(“SIP/5313-00000219”, “DIAL_TRUNK=20”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] GosubIf(“SIP/5313-00000219”, “0?sub-pincheck,s,1()”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/5313-00000219”, “0?disabletrunk,1”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:4] Set(“SIP/5313-00000219”, "DIAL_NUMBER=102") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:5] Set(“SIP/5313-00000219”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:6] Set(“SIP/5313-00000219”, “OUTBOUND_GROUP=OUT_20”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] GotoIf(“SIP/5313-00000219”, “0?nomax”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] GotoIf(“SIP/5313-00000219”, “0?chanfull”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/5313-00000219”, “0?skipoutcid”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:10] Set(“SIP/5313-00000219”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:11] Macro(“SIP/5313-00000219”, “outbound-callerid,20”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] ExecIf(“SIP/5313-00000219”, “0?Set(CALLERPRES()=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] ExecIf(“SIP/5313-00000219”, “0?Set(REALCALLERIDNUM=5313)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] GotoIf(“SIP/5313-00000219”, “1?normcid”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:6] Set(“SIP/5313-00000219”, “USEROUTCID=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] Set(“SIP/5313-00000219”, “EMERGENCYCID=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] Set(“SIP/5313-00000219”, “TRUNKOUTCID=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:9] GotoIf(“SIP/5313-00000219”, “1?trunkcid”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-outbound-callerid,s,14)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:14] ExecIf(“SIP/5313-00000219”, “0?Set(CALLERID(all)=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/5313-00000219”, “0?Set(CALLERID(all)=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:16] ExecIf(“SIP/5313-00000219”, “0?Set(CALLERID(all)=)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:17] ExecIf(“SIP/5313-00000219”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:18] Set(“SIP/5313-00000219”, “CDR(outbound_cnum)=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:19] Set(“SIP/5313-00000219”, “CDR(outbound_cnam)=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:12] GosubIf(“SIP/5313-00000219”, “0?sub-flp-20,s,1()”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:13] Set(“SIP/5313-00000219”, "OUTNUM=102") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:14] Set(“SIP/5313-00000219”, “custom=AMP”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:15] ExecIf(“SIP/5313-00000219”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:16] ExecIf(“SIP/5313-00000219”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:17] Macro(“SIP/5313-00000219”, “dialout-trunk-predial-hook,”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] NoOp(“SIP/5313-00000219”, "
*102 ***”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:2] Set(“SIP/5313-00000219”, “num2find=102") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] Set(“SIP/5313-00000219”, “OrigCID=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:4] Set(“SIP/5313-00000219”, “OrigCNAM=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:5] Set(“SIP/5313-00000219”, "CALLERID(num)=102") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:6] Set(“SIP/5313-00000219”, “CURLOPT(httptimeout)=7”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:7] Set(“SIP/5313-00000219”, "lookupcid=102") in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:8] Set(“SIP/5313-00000219”, “CALLERID(name)=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:9] Set(“SIP/5313-00000219”, “lookupcid=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:10] Set(“SIP/5313-00000219”, “CALLERID(name)=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:11] NoOp(“SIP/5313-00000219”, "
***”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:12] Set(“SIP/5313-00000219”, “CDR(accountcode,r)=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:13] Set(“SIP/5313-00000219”, “CONNECTEDLINE(num,i)=*102”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:14] Set(“SIP/5313-00000219”, “CONNECTEDLINE(name,i)=”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:15] Set(“SIP/5313-00000219”, “CALLERID(num)=5313”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:16] Set(“SIP/5313-00000219”, “CALLERID(name)=Johann Remote Office”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:17] MacroExit(“SIP/5313-00000219”, “”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:18] GotoIf(“SIP/5313-00000219”, “0?bypass,1”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:19] GotoIf(“SIP/5313-00000219”, “1?customtrunk”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-dialout-trunk,s,23)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:23] Set(“SIP/5313-00000219”, “pre_num=AMP:ooh323/”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:24] Set(“SIP/5313-00000219”, “the_num=OUTNUM”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:25] Set(“SIP/5313-00000219”, “[email protected]”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:26] GotoIf(“SIP/5313-00000219”, “1?outnum:skipoutnum”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-dialout-trunk,s,27)
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:27] Set(“SIP/5313-00000219”, “the_num=*102”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:28] Dial(“SIP/5313-00000219”, “ooh323/*[email protected],300,Tt”) in new stack
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] app_dial.c: – Called ooh323/*[email protected]
[2014-12-19 17:04:51] VERBOSE[19933][C-000001e1] app_dial.c: – OOH323/avaya-h323-247 answered SIP/5313-00000219
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] Macro(“SIP/5313-00000219”, “hangupcall,”) in new stack
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:1] GotoIf(“SIP/5313-00000219”, “1?theend”) in new stack
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: – Goto (macro-hangupcall,s,3)
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:3] ExecIf(“SIP/5313-00000219”, “0?Set(CDR(recordingfile)=)”) in new stack
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: – Executing [[email protected]:4] Hangup(“SIP/5313-00000219”, “”) in new stack
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] app_macro.c: == Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/5313-00000219’ in macro ‘hangupcall’
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/5313-00000219’
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 28) exited non-zero on ‘SIP/5313-00000219’ in macro ‘dialout-trunk’
[2014-12-19 17:04:52] VERBOSE[19933][C-000001e1] pbx.c: == Spawn extension (from-internal, *102, 6) exited non-zero on ‘SIP/5313-00000219’
[2014-12-19 17:05:36] VERBOSE[19932] asterisk.c: – Remote UNIX connection disconnected

According to this, it’s not even CALLING the restrictedroutes context.

Try in this order (check after every amportal restart):
Linux CLI as root: amportal restart
Web GUI: Disabling the module
Web GUI: Enabling the module
Linux CLI as root: amportal restart

Followed your suggestions. Same thing.
Both extensions below behave completely equal with below setting. Call completes although 5313 should be blocked.


Looks like this module is not working if dial patterns start with (or contain) digits other than numbers, e.g.* and #. Tried both.
Can you replicate this?
Might be a bug or something that the module is just not supporting.

Let’s try this, remove the * and see if it blocks it then so we can confirm that as the cause :smile:

Confirmed.
Leaving the * in dial string *102, the call completes and no restriction rules is applied. If I remove the *, the call fails due to intended restriction:

Great, the next step would be to submit a bug and reference this thread :smile:
How to report bugs: http://wiki.freepbx.org/display/DC/Bug+Reporting

In the meantime, what if you encapsulate the * with brackets to look like this [*]
This might force a different interpretation of the dial pattern…but who knows, this might also be intended since outbound routes are meant to really meant to be full numbers and * is indicative of a feature code; I can see this being intentional/by design.

I tried [*], but it is the same thing. I will submit a bug report, but you might be right, this might be intentional.
Thanks a lot for the assistance.

Any time! If you explain what you’re trying to accomplish in more detail, I or somebody else might be able to come up with a workaround solution for you :smile:

Hi,

my two cents : you can enter only X Z N . and 0-9 in pattern matching. (as indicated in the ?)
When entering *102 PBX considers this a feature code and routes the *102 through the featurecodemodule.
You will have to setup what you wish to do differently. What exactly do you wish to do ?
Restrict some internal numbers from using an outbound route ? Or something more complex (it really was not clear).
The modules are working as intended if you ask me as what you dialed is actually saying attention PBX here follows a feature code (to be setup in that module).
So one probably will need to setup/sacript differently what you need/wish to do.

regards,

Thanks.
I have my Asterisk connected to a legacy PBX over H.323 trunks. *102 is a feature code for my legacy PBX, that I would like to be able to use from an Asterisk phone. That is why I would like to send these digits out on a trunk. This does work, however not in conjunction with the extension route module’s ability to block an Asterisk extension from accessing this outbound route.
This means, *102 gets sent out on the H.323 trunk, but when I try to block an extension from getting to this route via the extension route module it doesn’t work. The digits get sent anyway.
Certain extensions on Asterisk I don’t want to be able to dial *102.
Hope that is clearer.