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

2017-05-26 Thread Steve Edwards

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   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


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

2017-05-26 Thread Dmitry Melekhov

Hello!

It there way to limit script execution time ?

I did something wrong writing my script yesterday , finally got it working,

but found that there are busy ISDN channels, looks like these are with 
hang scripts...


Thank you!


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users