I want to limit the call time of a trunk both inbound and outbound
I put this in the registration string both inbound and outbound of the trunk that I want to limit:
“context = from-pstn-toheader”
I have when edited:
“vi /etc/asterisk/sip_custom.conf”
And I inserted these lines:
[from-pstn-toheader]
exten = _.,1,noop(Limiting maximum call duration)
exten = _.,n,Set(TIMEOUT(absolute)=3600)
exten = _.,n,Goto(from-pstn,${EXTEN},1)
I then rebooted with:
“rasterisk -x” core reload "
I need to limit the time a call remains active, and I have to do it for the trunks I want, it doesn’t seem complicated yet I can’t.
Possible that no one has already dealt with it …
Your technique in post one will work for inbound provided you use a different name for your context. For outbound calls, you will need to use a dialplan hook and filter for specific trunk name.
Everything is struggling to manage the outgoing and incoming thing makes me want to pass
Probably because I’m more capable in one way and less in another … But I prefer to do it via AMI:
I create a small program in memory that will monitor the open calls and if they exceed a certain amount of time I will send a command to close the call “Action: Hangup”
Thank you very much for your collaboration, if I decide to make the software I will put more information here