Restrict Incoming Calls

This has been discussed a bit, but I haven’t found an answer that will work in my situation.

I have a small custom context I pieced together that strips the +1 from phone numbers so my caller ID plays nice. This is being stored in my extensions_custom.conf.


[from-trunk-custom]
exten => _X!,1,GotoIf($["${CALLERID(num):0:2}" != "+1"]?noplusatstart)
exten => _X.,n,NoOp(Changing Caller ID number from ${CALLERID(num)} to ${CALLERID(n$
exten => _X.,n,Set(CALLERID(num)=${CALLERID(num):2})
exten => _X.,n,Set(CALLERID(ANI)=${CALLERID(num)})
exten => _X!,n(noplusatstart),Goto(from-trunk,${EXTEN},1)

I have a single sip trunk through FlowRoute that handles incoming and outgoing calls.

I do not know how to include that context and the custom context that freepbx creates so I can limit both the number of incoming calls and outgoing calls on that single trunk.