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? Cheers M -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20031023/9de61e32/attachment.htm
Steven Critchfield
2003-Oct-23 07:31 UTC
[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 <critch@basesys.com>