Is it possible to execute lines in a script when the caller disconnects? I.e. to check when the last person leaves a conference room so you know it is safe to move the recording file. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130829/37108347/attachment.htm>
On Thu, 29 Aug 2013, John Doe wrote:> Is it possible to execute lines in a script when the caller disconnects? > I.e. to check when the last person leaves a conference room so you know > it is safe to move the recording file.Your question is a little bit vague, and a few details like what version of Asterisk and what language you are fluent in would help. If you are asking if you can execute an AGI in the 'h' extension, yes. If you are asking if you can continue executing an AGI when a caller hangs up, yes. Asterisk will deliver a SIGHUP. If you have established a signal handler (man sigaction or man signal) to 'catch' or 'trap' the signal, you can do as you please. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
On Friday 30 August 2013, John Doe wrote:> Is it possible to execute lines in a script when the caller disconnects? > I.e. to check when the last person leaves a conference room so you know it > is safe to move the recording file.When a person hangs up their phone, Asterisk jumps to the "h" extension in the current context. From there, you can do any of the normal dialplan stuff that doesn't require a call to be bridged; including AGI scripts and shell commands using System(). -- AJS Answers come *after* questions.