/etc/asterisk/extensions_custom.conf:
https://community.freepbx.org/t/how-to-limit-call-duration/22284/3
from-pstn-limited]
exten => .,1,noop(Limiting maximum call duration)
exten => .,n,Set(TIMEOUT(absolute)=3600)
exten => _.,n,Goto(from-pstn,${EXTEN},1)
Then set the trunk context to from-pstn-limited in the trunk peer details with the line:
context=from-pstn-limited
[limit-calls-3mins]
exten => _X.,1,Dial(local/600@from-internal,60,S(180))
- X. ;; says pattern match, X is a number from 0 to 9, and . is anything
- 1 is the priority - always starts with 1, subsequent lines are numbered n
- Local is the channel to use
- 600 is the extension to call
- from-internal is the context where internal extensions live
- 60 is how long to ring out for
- S(180) is how long to keep the call up when answered.
https://pbxinaflash.com/community/threads/limiting-inbound-call-length-to-3-mins-only.19764/