Skip to main content

Timeout on Huntlist or Ring-all

Posted by eherr on Thu, 06/14/2012

I have not found a way so I am trying to rewrite a script that allows the Hunt Group to have an absolute timeout.

Currently, the timeout variable is for each line, so on a 5 line system, with 10 seconds each line would mean if no one was on the phone or answered the call, the caller would cycle through all lines for 50 seconds before reaching the end.

I want the ability to call a hunt group for 30 seconds, regardless of which line its ringing and pull the call back after the 30 seconds before it even finished the cycle of the huntgroup.

I though I this would do it:
[CODE]
exten => s,1,Set(TIMEOUT(absolute)=15)
exten => s,n,Set(CALLERID(name)=${ARG2}${CALLERID(name)})
exten => s,n,Goto(${ARG1},s,1)

exten => reject,1,Playback(all-circuits-busy-now)
exten => reject,n,Playback(please-try-again-later)
exten => reject,n,Hangup

exten => T,1,NoOp(TIMEOUT REACHED)
exten => T,n,Playback(hello-world)
exten => T,n,Hangup

exten => h,1,NoOp(TIMEOUT REACHED)
exten => h,n,Playback(hello-world)
exten => h,n,Hangup
[/CODE]

but neither h, nor t, picked up the timeout extension.

Is there any way to accomplish this feature?


Submitted by eherr on Mon, 06/18/2012 Permalink

everything I tried so far has been unsuccessful.

The CLI looks like the TIMEOUT(absolute) throws the next sequence to hangup in the from-inside-redirect context but I still cant manipulate from there either.

any thoughts?

Submitted by eeman on Wed, 06/20/2012 Permalink

timeout absolute is well.. absolute.. if you set it on a channel you are going to drop the call. At the end of the timeout(absolute) the channel is torn down. btw it should be 't' not 'T' for the extension, but thats not the sort of extension that plays when timeout(absolute) is used.. that would get used when using something like timeout(digit) etc. timeout(absolute) is something you use on pre-paid calling cards so that you can look up time remaining and drop the damn call if they talk longer than there is time remaining on the card.

Submitted by eherr on Thu, 06/21/2012 Permalink

I figured as much but I was hoping to find a work-around.

Is there some way to create a dialplan that will pull back the ringing of a huntgroup after X seconds if the call was not answered?

Submitted by eeman on Fri, 06/22/2012 Permalink

a few ways to skin that cat.. technically the timeout value of Dial() does exactly that. What end-result are you trying to accomplish?

Submitted by eherr on Mon, 06/25/2012 Permalink

I have a client who has a old 5 line key system without voicemail.

Currently, I can set up a huntgroup and ring each line for 15 seconds and after the 5th line has reached its limit, the call goes to voicemail.

The problem with this is that the caller will hear roughly 1m15s worth of ringing.

I trying to give them the same ability to always ring the huntgroup, starting with line 1, and hunting only if the line is busy or the timeout is reached.

The modification needed is to only ring the huntgroup for 25 seconds ( roughly 5 rings ) and then pull the call back and send it to voicemail if the call was not answered.

Submitted by eeman on Wed, 06/27/2012 Permalink

so why not create a queue with static members with the ring strategy you want, then add that queue in the huntlist with the appropriate timeout. So then you could ring each extension for 15s but have the queue itself time out after say 45 seconds.

but if you're just feeding trunk lines to a key system then you should probably use a GotoIF when the dialstatus of the last dial command was NOANSWER skipping the other lines entirely.

exten => s,1,dial(sip/line1,60)
exten => s,n,GotoIF($["${DIALSTATUS}" = "NOANSWER"]?fail)
exten => s,n,dial(sip/line2,60)
exten => s,n,GotoIF($["${DIALSTATUS}" = "NOANSWER"]?fail)
exten => s,n,dial(sip/line3,60)
exten => s,n,GotoIF($["${DIALSTATUS}" = "NOANSWER"]?fail)
exten => s,n,dial(sip/line4,60)
exten => s,n,GotoIF($["${DIALSTATUS}" = "NOANSWER"]?fail)
exten => s,n,dial(sip/line5,60)
exten => s,n(fail),Voicemail(200@tenant,u)