I found some old threads how to do this but my understanding is the script language has changed in v17. Does anyone know how I would do it in 17? From what I can tell it should be the same but I could not find any info on how to use hooks with gosub anywhere.
This is apparently how you would do it in previous versions.
in extensions_custom.conf
[from-pstn-custom]
exten => _X.,1,noop(Limiting maximum call duration)
exten => _X.,n,Set(TIMEOUT(absolute)=900)
I think this just limits inbound, which is a good start. However, I would like to try limit outbound as well.
With that being said, I like using the L Dial() option since it gives you the ability to notify the caller that this call will end in x amount of time.
Don’t use from-pstn-custom. You will find references here in the forum to its existence, but it should not be used. A supportable way of adding your own dialplan on the inbound leg of a call is to create your own context that looks something like this