On Thu, 2003-10-23 at 10:51, Muhammad Nasim wrote: > Thanks for your reply. It seems I may be proceeding in the wrong direction. > I have a context with time arguments e.g. include > somecontext|18:00-9-00|mon-fri So the system behaves according to standard > office hours. > I want to be able to leave the office in office hours e.g at 13:00, dial a > number and move straight to an office closed behaviour. I want to come back > to the office at 16:00 and dial another number and move back to my original > scenario. > > What you say makes sense to me now. However I am new to this so a bit dense > :). > > I suppose I could have an agi script that did a DBput and stored a different > value for a 'switch' variable based on the number dialled. The gotoif would > then work based on the value obtained by DBget which would be different > based on what the 'switch' variable value was set to. > > Have I understood what you are saying correctly and am I making sense?
You have understood it. I would probably use a global variable and leave it at that, but dbput/dbget will make sure if your machine unexpectedly reboots while in a specified state that it will remain in that state. > ----- Original Message ----- > From: "Steven Critchfield" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 23, 2003 3:31 PM > Subject: Re: [Asterisk-Users] agi script forcing asterisk reload > > > > On Thu, 2003-10-23 at 08:44, Muhammad Nasim wrote: > > > Hi. I am using #include to include a file in extensions.conf. I have > > > an agi perl script which modifies the #included file and then forces > > > an asterisk reload with 'system("asterisk -rx reload")'; > > > > > > After the reload I use set_context, set_extension and set_priority to > > > tell asterisk where I want it to carry on from which is line 2 of the > > > following. > > > > > > exten => *80,1,AGI(bla.pl, ${EXTEN}) > > > exten => *80,2,Background(please_wait_while) > > > exten => *80,3,Hangup > > > > > > This works some of the time. However at other times the sip channel > > > remains active and somehow asterisk doesn't find its way to line 2 > > > after the reload (although the reload still happens). So I don't get > > > by Background or Hangup being executed some of the time. > > > > > > Can anyone point me in some direction with how to debug this > > > intermittent behaviour further? > > > Does anyone know of any issues with an agi script forcing a reload in > > > this way? > > > > Well, I wonder why you are doing the above actions. IF it is for a user > > selectable dialplan like a day/night operation, maybe you should look > > into setting those dialplans up in their own context and doing gotoif > > based switching on a known variable. This is a lot better than changing > > the in memory dialplan for this. > > > > -- > > Steven Critchfield <[EMAIL PROTECTED]> > > > > _______________________________________________ > > Asterisk-Users mailing list > > [EMAIL PROTECTED] > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > _______________________________________________ > Asterisk-Users mailing list > [EMAIL PROTECTED] > http://lists.digium.com/mailman/listinfo/asterisk-users -- Steven Critchfield <[EMAIL PROTECTED]> _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users