AGI & Autodestruct on dialog

I need to perform some time consuming tasks at hangup, on an AGI script. In older versions, I would have used DeadAGI, but AGI is now supposed to be able to handle this situation. While the scripts works fine, I am getting messages on the CLI ‘Warning: Autodestruct on dialog … with owner SIP/… in place (Method: BYE). Rescheduling destruction for 10000 ms’

I know these messages are caused by the fact that I trap the SIGHUP and do my long processing, but is there a way to avoid them - though they are just warnings, I am not to keen on seeing them.


Nope. Not without removing the log message from the chan_sip source code, or not enabling warnings in output.

thanks - I’ve implemented a fork of the AGI script to release correctly the channel,

HI, cerien.jean:
can you help me,I have also encountered the problem of Autodestruct now. How do you implement it?

As he said, he put the long running code into the background, using the fork() system call or his scripting language’s interface to that.

OK,thanks david:
This gives me some ideas. I plan to use a shell script to monitor my agi script. When an Autodestruct fault occurs, I can use the shell to monitor the long execution of the agi script, or let asterisk return to normal. ?