[Asterisk-Dev] FastAGI Bug/Problem/Feature Request

Jerris, Michael MI mjerris at ofllc.com
Thu Jun 16 05:21:11 MST 2005


http://bugs.digium.com/view.php?id=4029 is for this. 

> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com 
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Matt King
> Sent: Thursday, June 16, 2005 7:44 AM
> To: asterisk-dev at lists.digium.com
> Subject: [Asterisk-Dev] FastAGI Bug/Problem/Feature Request
> 
> Hello all,
> 
> Somebody advised that I should discuss this issue here first 
> before posting a bug/feature request.
> 
> So, FastAGI can be used to perform automatic call-handling 
> with a remote FastAGI server.
> 
> When the FastAGI Server is available (accepting connections), 
> the call is handled, and unless the FastAGI Server specifies 
> otherwise, Asterisk will continue at the next priority in 
> extensions.conf when the FastAGI Server closes the connection.
> 
> However, when the FastAGI server is not available (because 
> it's down, or network issues), Asterisk does *not* simply 
> proceed to the next priority
> - instead it hangs up the call.
> 
> This means that if you're supplying a service over FastAGI, 
> then when your FastAGI Server is down, Asterisk will hang up 
> on all your callers.
> 
> I'd like to suggest/request that this behaviour be changed so 
> that Asterisk prints out a warning message (indicating that 
> the server could not be found), then proceeds to the next 
> priority in extensions.conf as normal, instead of just 
> hanging up.  This would allow people who are using FastAGI to 
> build contingency plans into extensions.conf in case their 
> AGI server goes down.
> 
> If Asterisk does manage to find the FastAGI server, it can 
> easily be told to skip the next priority (to avoid the 
> contingency).  Here's an example of how one might deploy 
> graceful-fail contingency in this scheme:
> 
> In extensions.conf:
> 
> exten => 1000,1,Answer
> exten => 1000,2,agi(agi://192.168.0.1)
> 
> ; This is the contingency - AGI will skip it when found.
> exten => 1000,3,Goto(contingency, 1)
> 
> ; This is where the AGI Server continues.
> exten => 1000,4,Dial(SIP/12345,60,r)
> exten => 1000,5,Hangup
> 
> exten => 
> contingency,1,Playback(we-are-experiencing-technical-difficulties)
> exten => contingency,2,Playback(please-call-us-later)
> exten => contingency,3,Hangup
> 
> In the AGI Processor (code based on JAGIServer/OrderlyCalls):
> 
> //Do some logic and/or CTI stuff
> //Skip the contingency
> String priStr=agi.getAGIProperty("agi_priority");
> int pri=Integer.parseInt(priStr);
> pri+=2;
> agi.setPriority(""+pri);
> //Close the connection to Asterisk.
> agi.clean();      
> 
> People who do not choose to build in contingency plans would 
> be unaffected by this change, unless the next priority in 
> extensions.conf depends on a successful FastAGI call *and* 
> their FastAGI server is down.
> 
> An alternative method of doing this would be to add an 
> argument to the AGI application command to specify what 
> should happen if the FastAGI server cannot be reached.
> 
> Any thoughts before I make my bug post?
> 
> Oh, and are priorities *always* numbers?
> 
> Many thanks,
> 
> Matt King, M.A. Oxon.
> Managing Director, Orderly Software Ltd.
> Author, JAGIServer, OrderlyCalls and OrderlyQ.
> 
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> 



More information about the asterisk-dev mailing list