[asterisk-users] cmd AGI(), maximum script time.

Steve Edwards asterisk.org at sedwards.com
Fri May 26 09:18:56 CDT 2017


On Fri, 26 May 2017, Dmitry Melekhov wrote:

> It there way to limit script execution time ?

Set a handler and an alarm:

// trap SIGALRM -- the process is taking too long
         signal(SIGALRM, (void (*)(int))(int)hung_process);

// set an alarm
         alarm(900);

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
             https://www.linkedin.com/in/steve-edwards-4244281



More information about the asterisk-users mailing list