[asterisk-users] allowing call every 15mins

Andrew Kohlsmith akohlsmith-asterisk at benshaw.com
Wed May 2 13:36:37 MST 2007


On Wednesday 02 May 2007 3:04 pm, Goke Aruna wrote:
> I have a set up that answer my customer. and its working well,
> however, the number of call to technical dept is what i want to reduce.
> I want all call to get to voice prompt except that that enter when
> minutes is 15, 30, 45, 60(in multiples of 15 minutes).

So YOU're the guy who makes the calls to tech support so hideous!!

> how can i achieve this and what application can i use to get this done.

GotoIfTime can help you here, but it'll be a little messy:

exten => 1,1,GotoIfTime(0:01-0:14|*|*|*?toobad)
exten => 1,n,GotoIfTime(0:16-0:29|*|*|*?toobad)
exten => 1,n,GotoIfTime(0:31-0:44|*|*|*?toobad)
exten => 1,n,GotoIfTime(0:46-0:59|*|*|*?toobad)
exten => 1,1,GotoIfTime(1:01-1:14|*|*|*?toobad)
exten => 1,n,GotoIfTime(1:16-1:29|*|*|*?toobad)
exten => 1,n,GotoIfTime(1:31-1:44|*|*|*?toobad)
exten => 1,n,GotoIfTime(1:46-1:59|*|*|*?toobad)
...
exten => 1,1,GotoIfTime(23:01-23:14|*|*|*?toobad)
exten => 1,n,GotoIfTime(23:16-23:29|*|*|*?toobad)
exten => 1,n,GotoIfTime(23:31-23:44|*|*|*?toobad)
exten => 1,n,GotoIfTime(23:46-23:59|*|*|*?toobad)
exten => 1,n,Dial(SIP/techsupport)
exten => 1,n,GotoIf($[${DIALSTATUS} = BUSY]?toobad)
exten => 1,n,Hangup
exten => 1,n(toobad),VoiceMail(100 at default)

Very messy.  Alternatively:
exten => 1,1,GotoIfTime(0:00-0:00|*|*|*?woohoo)
exten => 1,n,GotoIfTime(0:15-0:15|*|*|*?woohoo)
exten => 1,n,GotoIfTime(0:30-0:30|*|*|*?woohoo)
exten => 1,n,GotoIfTime(0:45-0:45|*|*|*?woohoo)
...
exten => 1,n,GotoIfTime(23:00-23:00|*|*|*?woohoo)
exten => 1,n,GotoIfTime(23:15-23:15|*|*|*?woohoo)
exten => 1,n,GotoIfTime(23:30-23:30|*|*|*?woohoo)
exten => 1,n,GotoIfTime(23:45-23:45|*|*|*?woohoo)
exten => 1,n,VoiceMail(100 at default)
exten => 1,n,Hangup
exten => 1,n(woohoo),Dial(SIP/techsupport)
...

Pretty much equally messy.

Both of these examples assume you want to allow calls for a minute every 
quarter hour 24 hours a day, quite possibly to match policies on most vendors 
which claim they offer 24-hour tech support but implement similar 
dialplans. :-)

Honestly though this is a strange request...  Why bother offering tech support 
if you are only allowing calls for 1 minute every 15 minutes?  Why not be 
honest about it and do this:

exten => 1,1,Playback(sorry-we-dont-offer-support)
exten => 1,n,Wait(30)
exten => 1,n,Hangup

??

-A.


More information about the asterisk-users mailing list