[asterisk-users] Need Advice/Suggestion

Nathan Dennis Nathan.Dennis at i-solutions.net.au
Thu Jul 5 23:03:52 CDT 2007


Hi Farooq,
          I've done just that for one of our customers. All I did was
add an exten such as *56 that set a custom database value to
nightmode=true. Then as calls come in I just check the database value to
see if it is set to true or not. Note I have asterisk patched with
Bristuff so unless you do as well the hint section will not work.


See Below

exten => *56,hint,DS/56
exten => *56,1,Set(NightMode=${DB(nightmode/active)})
exten => *56,n,playback(service)
exten => *56,n,Gotoif($["${NightMode}" = "true"]?turnoff)
exten => *56,n,Set(DB(nightmode/active)=true)
exten => *56,n,devstate(56,2)
exten => *56,n,playback(activated)
exten => *56,n,hangup()
exten => *56,n(turnoff),Set(DB(nightmode/active)=false)
exten => *56,n,playback(de-activated)
exten => *56,n,devstate(56,0)
exten => *56,n,hangup

Then as a call comes in you just check the value in the database

exten => q,1,Set(NightMode=${DB(nightmode/active)})
exten => q,n,Gotoif($["${NightMode}" = "true"]?afterhoursq,q,1)
exten => q,n,GotoIfTime(8:00-17:30|mon-fri|*|*|?businesshours)


Nathan Dennis 
__________________________________________________________ 

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Farooq
Ahmed
Sent: Tuesday, 3 July 2007 5:00 PM
To: asterisk-bsd at lists.digium.com; asterisk-users at lists.digium.com
Subject: [asterisk-users] Need Advice/Suggestion

Hi all,
As we know we can configure in astersik like before 5:00pm calls go to
reception and after 5:00 pm calls go to some mobile no. One of my client
requested that he wants to manually shift the dial plan  like above as
he has flexiable timing sometime he finishes at 3:00pm some time 8pm. I
can not give him freepbx  access.
Any idea or solution.
Regards
Farooq
-- 

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list