Limiting maximum call duration: have the call end 4 minutes after the agent accepts the call. Set(TIMEOUT(absolute)=240)

sajberkurajber
Joined: Sat 30 of Sep, 2017

Limiting maximum call duration: have the call end 4 minutes after the agent accepts the call. Set(TIMEOUT(absolute)=240)

Posted:Sun 01 of Oct, 2017 (10:08 UTC)
I am running an Asterisk/FreePBX with time conditions
- timecondition-1 (durin working hours)
- timecondition-2 (offhours)

timecondition-2 just runs ivr-3 that plays a message (no dial opportunities there)

timecondition-1 runs ivr-2 that plays a message for 20 seconds and transfers the call to a Ring Group (where the agents are)

(ivr-1 just plays a bussy message and returns the call to ivr-2)

I am not using Queues.

Anyway: I need to LIMIT the CALL DURATION to 4 minutes

I know this is done with:
exten => _1XX,1,NoOp(Limiting maximum call duration)
exten => _1XX,n,Set(TIMEOUT(absolute)=240)

BUT I DO NOT KNOW the proper CONTEXT to put it in 'extensions_custom.conf', for what I need.
I need to have the call end 4 minutes after the agents accepts the call.

The only way I can limit the call (from the moment it is answered by and agent from within the Ring Group) is when I put a contect from-did-direct
but this works only if and when the caller DIALS the extension number of the agent, and I can't have this.
It needs to work 'on it's own': with the call timeout trigered from the moment the call is answed by an agent from within the Ring Group.

Some excerpts from the verbocity

-- Executing XXXXXXXXXXXX@from-trunk:4 Goto("SIP/telekomout-000000df", "ext-did,s,1") in new stack
; this is where the call comes in


-- Executing s@ext-did:21 Goto("SIP/telekomout-000000df", "timeconditions,1,1") in new stack
; this is where it gets in the timecondition


-- Executing 1@timeconditions:10 GotoIf("SIP/telekomout-000000df", "1?ivr-2,s,1") in new stack
-- Executing s@ivr-2:1 Set("SIP/telekomout-000000df", "_IVR_CONTEXT_ivr-2=") in new stack
; this is where it gets into the ivr-2


-- Executing t@ivr-2:1 Goto("SIP/telekomout-000000df", "ext-group,200,1") in new stack
-- Goto (ext-group,200,1)
; this is where it gets into the Ring Group


-- Executing s@macro-auto-blkvm:5 Set("PJSIP/112-000000f0", "FORWARD_CONTEXT=from-internal") in new stack
-- Executing s@macro-auto-blkvm:6 Set("PJSIP/112-000000f0", "MASTER_CHANNEL(FORWARD_CONTEXT)=from-internal") in new stack
; where it rings (the only avaialble extension in the Ring Group)



app-fax-custom
ext-did-0001-custom
ext-did-0002-custom
ivr-2-custom
ivr-1-custom
from-did-direct-ivr
fmgrps-custom
followme-check-custom
followme-sub-custom
sub-fmsetcid-custom
from-queue-custom
from-queue-exten-only-x-custom
from-queue-exten-internal-custom
from-queue-exten-only
from-queue-exten-only-x
from-internal
from-queue-exten-only-custom
timeconditions-custom
ext-local-confirm-custom
ext-did-custom
ext-did-catchall-custom
ext-local-custom
from-did-direct-ivr-custom
from-trunk-sip-telekomout-custom
ext-trunk-custom
outbound-allroutes-custom
outrt-1-custom
from-internal-additional-custom
ivr-2
from-pstn-custom
ext-did
ext-did-post-custom
ext-did-catchall
ext-local
ext-local-confirm
ext-local-confirm-custom
timeconditions
timeconditions-custom
from-internal-noxfer
from-internal-xfer
ext-group
ext-group-custom
from-internal-additional
grps
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Getting despearte I tried all the above by placing
examples (that do not work)

ivr-2-custom
exten => _1XX,1,NoOp(Limiting maximum call duration)
exten => _1XX,2,Set(TIMEOUT(absolute)=10)


ext-group-custom
exten => 200,1,NoOp(Limiting maximum call duration)
exten => 200,n,Set(TIMEOUT(absolute)=20)


Agents extension numbers are: 101, 102, 103 - 112
The Ring Group Number is: 200

Thanks!