I am wanting to prevent all inbound calls at certain times for a particular trunk. I can see how to do this for all calls but at a loss on how do do it for only a selected trunk.
Hi, thanks for that. I have downloaded and install the CustomContext module but am at a loss as to whereto from here.
it’s nothing to do with custom context module,
you need to create a context (in extensions_custom.conf) where you want the calls to go, use the context= setting in the trunk configuration to point the trunk there, and then write some dialplan that catches the call in that custom context, assigns the DID, and sends the call along its way.
You can always send calls from a particular trunk to a custom context you create, e.g.
from-pstn-mytrunk
then assign a ‘DID’ in that context (makeup a “fictitious DID” and send the call into from-pstn where it will be routed as normal with that DID and thus you can control just those calls.
This is similar to what the Zap Channel DIDs does accept in that case, the trunk channel information is decoded in order to assign the proper DID.
If the trunk you want to restrict has a unique did you can set up a different inbound route for that trunk which takes the call to a unique time condition from which you can manipulate the behavior as you wish.
Unfortunately I don’t have free DDI’s for this… but thanks that makes sense