[Asterisk-Users] My AGI is not detecting hangups on outgoing calls

Steven Critchfield critch at basesys.com
Wed Sep 8 13:24:03 MST 2004


On Wed, 2004-09-08 at 15:03, Lee Allen wrote:
> I have set up an application which records incoming calls (customer
> problems), and then places outgoing calls (handing the problems to
> support people).  I have written some AGI programs (in C) to implement
> parts of the functionality.
> 
> So far I am very pleased with the overall application.
> 
> But I have one very annoying, very nasty problem:
> 
> The C AGI is handling a dialog with a user on an outgoing call.  The
> person at the other end hangs up.  The AGI does not detect this.  The
> "result" codes don't indicate it.  "channel status" commands also fail
> to indicate the hangup.
> 
> This is nasty because the AGI program waits forever, leaving the line
> off-hook.
> 
> I realize I could sense this indirectly via timeouts.  Is there a
> cleaner way?

Two potential problems. One is your app isn't correctly identifying the
hangup event. In that case you need to look over the result handling of
the samples and make sure you handle them properly. Second is that your
asterisk install isn't detecting the hangup and therefore can't signal
to the AGI that a hangup occurred. 

Either way, you need to produce information about the types of
interfaces you are testing with, and possibly a snippit of your code for
us to decide if you are doing it right.

My company has our own AGI script that records dictation and we have no
problem detecting and reacting to a hangup, but then again we are on a
PRI circuit with positive hangup detection.
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-users mailing list