[Asterisk-Users] RE: AGI Flakyness *sigh*
Douglas Garstang
dgarstang at oneeighty.com
Thu Feb 16 12:19:41 MST 2006
Andrew.
Thanks for the reply. I'm using AGI, not DeadAGI. I don't see how I can do post call processing if Asterisk never returns a return code. My script is blocking, waiting on input from stdin, which it never gets. Actually, now that I think about it, what I think is happening, is that when the caller hangs up the call (instead of the callee) Asterisk immediately ceases execution of the script. Now, why would it do that?
There is an AGI command 'CHANNEL STATUS' which you can use to check the status of an open call. If the dial command (even when the caller hangs up) doesn't return a return code to the script until after the call is disconnected, how can I perform a CHANNEL STATUS agi command? The script is still reading from stdin, waiting for a response. Asterisk doesn't send it until the call is disconnected, and which point, my script continues execution and the CHANNEL STATUS command is no longer relevant.
Doug.
-----Original Message-----
From: Andrew Kohlsmith [mailto:akohlsmith-asterisk at benshaw.com]
Sent: Thursday, February 16, 2006 11:48 AM
To: asterisk-users at lists.digium.com
Subject: Re: [Asterisk-Users] RE: AGI Flakyness *sigh*
On Thursday 16 February 2006 13:18, Douglas Garstang wrote:
> As you can quite clearly see, Asterisk sends no return code back to the AGI
> script. I really want to understand why this happens. I also don't like the
Are you using AGI() or DeadAGI() ?
> until after the call is Hung up. Also, another annoyance. Why can't
> asterisk send back a return code once the dial is initiated, but before the
> call is connected? If you don't get a return code until after the call is
> hung up (and you script has to wait for the result from stdin), how are you
> supposed to a) perform post call processing and b) check the status of an
> open call with CHANNEL STATUS?
It really sounds like you are frustrated because you have assumed a number of
things about how Asterisk operates instead of testing it and understand what
the system does and does not do.
Post-call processing is VERY easy to do, and can be done several ways. You
can use the 'h' extension, or the 'g' flag to Dial() or also by using
DeadAGI() instead of AGI(). I'm not sure what you mean by "checking the
status of an open call with CHANNEL STATUS" but I'll see if anyone else on
the list can help.
We all get frustrated. It is best not to broadcast this fact to tens of
thousands of people. Collateral damage, and all that.
-A.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list