We have an extension for a door intercom, the problem is that some users forget to disconnect the call and/or place a call on hold after they’ve done.
This timeout would only effect calls to / from specific internal extension(s) (not a trunk wide rule as described elsewhere). Any help would be greatly appreciated.
Thanks @dicko, I’ve saw it mentioned for calls on the trunk level. Can you suggest the best way (which config file needs to be edited) to apply the setting on the channel level?
It prevails for all calls if added to the context in which they are made, likely you will need a custom context for such calls as they are ‘exceptional’ to regular calls that are better constrained.
So, it seems that I’ll need to somehow modify the from-internal context to apply the timeout in case the destination matches the door extension. Do I understand this correctly? Creating a custom context for the door itself should apply timeout to the call from the door, but not visa versa (such as secretary calling the door to talk to the person knocking).
Thanks @lgaetz, your suggestion may have been just what was needed, I’ve added the following to extensions_custom.conf:
[macro-dialout-one-predial-hook]
exten => s,1,Noop(Checking for calls to the door)
; calls to the door extension (250 as an example) would get 25 second timeout
exten => s,n,GotoIf($[“${EXTTOCALL}”=“250”]?s25)
; calls from the door would get a longer timeout to allow time to pick up
exten => s,n,GotoIf($[“${AMPUSER}”=“250”]?s45)
exten => s,n,MacroExit
exten => s,n(s25),NoOp(Limiting maximum call duration to 25 seconds)
exten => s,n,Set(TIMEOUT(absolute)=25)
exten => s,n,MacroExit
exten => s,n(s45),NoOp(Limiting maximum call duration to 45 seconds)
exten => s,n,Set(TIMEOUT(absolute)=45)
exten => s,n,MacroExit
I’ve checked (via log), and it seems that my “macro-dialout-one-predial-hook” was a simple exit before this change, that being said asterisk does complain that method already exists, thus original could not be loaded. Would be nice to know where the original hook was, as to verify that contents where not needlessly lost.
Does anyone have a suggestion as to what can be added so that the call would be dropped as soon as it was placed on hold? In our case, putting the door on hold is usually done by mistake and I would like it to work almost like an end call button.
@danardf We are using 8028 SIP Doorphone (G2) and the setting was staring me in the face in Basic Settings > Features tab. There is indeed a “Maximum Call Duration” setting which I somehow kept missing (don’t I feel silly). I’m still glad I’ve reached out to the community as I can now define timeout to a much greater degree (door controller only allows time limit to be defined in 30 second intervals).
@lgaetz, thank you for all of your input. The hook is working as expected and it’s great that time can be adjustable independently depending if the call goes to or coming from the door.