Hi there How do I change the dialplan runtime, if I for example wants all calls on the main number to be answered by a voicemail (when it is out-of-office hours). I want to be able to change the configuration by pressing a DTMF combination e.g. *82. Can't figure out whether it is necessary to change contexts or how to do it. I have read a lot of examples and config documentation, but I can't figure out how to do it. I know there are commands from the CLI to include and not include contexts but I can't get them to work. If i write 'include context in default' I can see by 'show dialplan' that 'context' is included in default. But if I want to include a context named office by typing 'include office in default' I just get 'No such command 'include office' (type 'help for help) regards Mickey Binder
I have the same problem ----- Original Message ----- From: "Mickey Binder" <mickey@comflex.dk> To: "Asterisk maillist (E-mail)" <asterisk-users@lists.digium.com> Sent: Monday, September 01, 2003 10:51 AM Subject: [Asterisk-Users] Change include contexts runtime> Hi there > > How do I change the dialplan runtime, if I for example wants all calls on > the main number to be answered by a voicemail (when it is out-of-office > hours). > I want to be able to change the configuration by pressing a DTMFcombination> e.g. *82. Can't figure out whether it is necessary to change contexts orhow> to do it. > > I have read a lot of examples and config documentation, but I can't figure > out how to do it. > > I know there are commands from the CLI to include and not include contexts > but I can't get them to work. > If i write 'include context in default' I can see by 'show dialplan' that > 'context' is included in default. But if I want to include a context named > office by typing 'include office in default' I just get 'No such command > 'include office' (type 'help for help) > > regards > Mickey Binder > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users
On Monday 01 September 2003 03:51, Mickey Binder wrote:> How do I change the dialplan runtime, if I for example wants all > calls on the main number to be answered by a voicemail (when it is > out-of-office hours). > I want to be able to change the configuration by pressing a DTMF > combination e.g. *82. Can't figure out whether it is necessary to > change contexts or how to do it. > > I have read a lot of examples and config documentation, but I can't > figure out how to do it. > > I know there are commands from the CLI to include and not include > contexts but I can't get them to work. > If i write 'include context in default' I can see by 'show dialplan' > that 'context' is included in default. But if I want to include a > context named office by typing 'include office in default' I just get > 'No such command 'include office' (type 'help for help)Use the DB routines and GotoIf. Example: exten => 999,1,DBPut(mystore/isopen=1) exten => *82,1,DBPut(mystore/isopen=0) exten => s,1,DBGet(amiopen=mystore/isopen) exten => s,2,GotoIf($[${amiopen} = 0]?closed|s|1) Obviously, you'll want to put the extensions that turn the system on and off in a context which is not referenced by incoming calls. -Tilghman
>>Mickey Binder wrote: >> >>That sounds like a brilliant idea, I will try it right away! >> >> >> >Did it work out all right? > >/t >It looks like it. With DBput and DBget im able to change the variable values and then branch to different contexts with GotoIf. Now I just need to implement the right logic for the different situations. regards Mickey Binder
Mickey Binder wrote:>It looks like it. With DBput and DBget im able to change the variable values >and then branch to different contexts with GotoIf. Now I just need to >implement the right logic for the different situations. > > >And maybe be able to get some sort of feedback to the users. Change of dialtone or visual indication? /t
-----Original Message----- From: Tomas Prybil [mailto:tomas@prybil.se] Sent: 2. september 2003 10:50 To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] Change include contexts runtime Mickey Binder wrote:>>It looks like it. With DBput and DBget im able to change the variablevalues>>and then branch to different contexts with GotoIf. Now I just need to >>implement the right logic for the different situations. > >> >> >And maybe be able to get some sort of feedback to the users. >Change of dialtone or visual indication? > > >/t >Yeah...I thought of making a voice response telling the user whether he turned "out-of-office" voicemail on or off, and then hangup afterwards.
Here is an example I stole off the list awhile back exten => *5,1,DBget($Night=GlobalSettings/Night) ; if not night then set it exten => *5,2,DBdel(GlobalSettings/Night) exten => *5,3,Playback(night_off) exten => *5,4,Hangup exten => *5,102,DBput(GlobalSettings/Night=true) exten => *5,103,Playback(night_on) exten => *5,104,Hangup Set Night and then have a voice response saying "Night on" or "Night Off" accordingly... On Tuesday, September 2, 2003, at 04:50 AM, Mickey Binder wrote:> -----Original Message----- > From: Tomas Prybil [mailto:tomas@prybil.se] > Sent: 2. september 2003 10:50 > To: asterisk-users@lists.digium.com > Subject: Re: [Asterisk-Users] Change include contexts runtime > > > Mickey Binder wrote: > >>> It looks like it. With DBput and DBget im able to change the variable > values >>> and then branch to different contexts with GotoIf. Now I just need to >>> implement the right logic for the different situations. >> >>> >>> >> And maybe be able to get some sort of feedback to the users. >> Change of dialtone or visual indication? >> >> >> /t >> > > Yeah...I thought of making a voice response telling the user whether he > turned "out-of-office" voicemail on or off, and then hangup afterwards. > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users