Lee Allen
2004-Sep-08 13:03 UTC
[Asterisk-Users] My AGI is not detecting hangups on outgoing calls
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? Lee Allen Computer Generated Solutions, Inc. Leadtec Division Email: Lee@Leadtec.com
Eric Wieling
2004-Sep-08 13:23 UTC
[Asterisk-Users] My AGI is not detecting hangups on outgoing calls
Practically all AGI examples using asterisk-perl out there show you how to set up a callback function that gets called when a channel hangs up. www.fnords.org/~eric/asterisk/downloads 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? > > Lee Allen > Computer Generated Solutions, Inc. > Leadtec Division > Email: Lee@Leadtec.com > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Eric Wieling * BTEL Consulting * 504-899-1387 x2111 "In a related story, the IRS has recently ruled that the cost of Windows upgrades can NOT be deducted as a gambling loss."
Steven Critchfield
2004-Sep-08 13:24 UTC
[Asterisk-Users] My AGI is not detecting hangups on outgoing calls
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@basesys.com>