Re: [asterisk-users] AGI timeout option

2018-09-14 Thread Eric Wieling
I don't know AGIspeedy, but I have some PHP scripts where I set a 
connect timeout using streams.


Example using https, but should be easily adaptable to non-s http.:

$pbxsh_bin = @file_get_contents("https://blah.blah.blah;, FALSE, 
@stream_context_create(array('https' => array('timeout' => 5, 
"verify_peer"=>false, "verify_peer_name"=>false;


On 09/14/2018 01:40 PM, Carlos Chavez wrote:

On 9/13/2018 8:04 PM, Patrick Wakano wrote:


Hello list,
Hope you all doing  well!

Recently, I had an issue with a FastAGI PHP script, which under some 
specific situation would run into an infinity loop, consuming all CPU 
resources. This also was preventing Asterisk to terminated the call 
properly because it was waiting for the AGI to return... The 
application uses AGIspeedy to process the AGI calls, not sure if this 
can be affecting this situation somehow
Due to this problem I started looking for some option to timeout the 
AGI call and return to the dialplan after XYZ seconds and so this 
would protect Asterisk preventing the dialplan to get stuck due to 
some external script problem that is actually outside of Asterisk 
control. Does Asterisk provide some control of this sort? I searched 
around and could not find any.

Any idea is appreciated!

Kind regards
Patrick Wakano



I think this is what you may be looking for:

http://php.net/manual/en/function.set-time-limit.php



--
http://help.nyigc.net/

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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

Re: [asterisk-users] AGI timeout option

2018-09-14 Thread Carlos Chavez

On 9/13/2018 8:04 PM, Patrick Wakano wrote:


Hello list,
Hope you all doing  well!

Recently, I had an issue with a FastAGI PHP script, which under some 
specific situation would run into an infinity loop, consuming all CPU 
resources. This also was preventing Asterisk to terminated the call 
properly because it was waiting for the AGI to return... The 
application uses AGIspeedy to process the AGI calls, not sure if this 
can be affecting this situation somehow
Due to this problem I started looking for some option to timeout the 
AGI call and return to the dialplan after XYZ seconds and so this 
would protect Asterisk preventing the dialplan to get stuck due to 
some external script problem that is actually outside of Asterisk 
control. Does Asterisk provide some control of this sort? I searched 
around and could not find any.

Any idea is appreciated!

Kind regards
Patrick Wakano



I think this is what you may be looking for:

http://php.net/manual/en/function.set-time-limit.php

--
Telecomunicaciones Abiertas de México S.A. de C.V.
Carlos Chávez
+52 (55)8116-9161


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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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

Re: [asterisk-users] AGI timeout option

2018-09-14 Thread Tech Support
Hello;

I’ve been using AGISpeedy for Perl for years. I just works, and it works 
really well. I’m a Perl programmer, not a PHP programmer, but it seems to me 
that you need the PHP equivalent of Perl’s ‘alarm’ command.  Just a thought.

Regards;

John V.

 

From: asterisk-users [mailto:asterisk-users-boun...@lists.digium.com] On Behalf 
Of Patrick Wakano
Sent: Thursday, September 13, 2018 09:05 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion 

Subject: [asterisk-users] AGI timeout option

 

Hello list,

Hope you all doing  well!

 

Recently, I had an issue with a FastAGI PHP script, which under some specific 
situation would run into an infinity loop, consuming all CPU resources. This 
also was preventing Asterisk to terminated the call properly because it was 
waiting for the AGI to return... The application uses AGIspeedy to process the 
AGI calls, not sure if this can be affecting this situation somehow

Due to this problem I started looking for some option to timeout the AGI call 
and return to the dialplan after XYZ seconds and so this would protect Asterisk 
preventing the dialplan to get stuck due to some external script problem that 
is actually outside of Asterisk control. Does Asterisk provide some control of 
this sort? I searched around and could not find any. 

Any idea is appreciated!

 

Kind regards

Patrick Wakano

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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