Summary: | ASTERISK-16373: [patch] Add CHANNEL(checkhangup) function | ||
Reporter: | Mark Murawski (kobaz) | Labels: | |
Date Opened: | 2010-07-15 11:46:34 | Date Closed: | 2010-09-07 16:14:55 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) func_channel.patch | |
Description: | Currently there's no good way to check if your channel is being hung up on you from within AGI. Sometimes you'll get responses from AGI like 'HANGUP200', but that's not always the case when the channel is being ripped away. Patch for trunk attached | ||
Comments: | By: Mark Murawski (kobaz) 2010-07-15 11:49:08 Documentation adjustment <enum name="checkhangup"> <para>R/0 is the channel hanging up (1/0)</para> </enum> By: Mark Murawski (kobaz) 2010-07-16 10:31:51 also... that should be R/O not R/0 (zero).... heh By: Olle Johansson (oej) 2010-07-16 11:20:55 Can't you just check DIALSTATUS or another STATUS? Or possibly HANGUPCAUSE? By: Mark Murawski (kobaz) 2010-07-16 11:36:40 dialstatus is usable if you're Dial()ing.. hangupcause only gets set when a device hangs up... not when you get a softhangup. I'm sure there's other cases in where hangupcause doesn't get set either... checkhangup would be the surefire way to check for hangup. By: Olle Johansson (oej) 2010-07-16 15:25:54 Then we really need to find the places where you don't get hangup cause and fix them. By: Mark Murawski (kobaz) 2010-07-19 16:15:20 I really like having checkhangup in my own personal branch, but that would indeed be an issue if some things don't set hangupcause. Personally, I like the idea of having an 'official' way to check for things via a function. Rather than having to rely on checking obscure variables for obscure values. This of course can be argued that the hangup causes are documented in the headers and etc... but even if hangupcause was set in all possible cases where it should be, it seems like it's a hacky way to check. By: Digium Subversion (svnbot) 2010-09-07 16:14:04 Repository: asterisk Revision: 285373 U branches/1.8/funcs/func_channel.c ------------------------------------------------------------------------ r285373 | tilghman | 2010-09-07 16:14:04 -0500 (Tue, 07 Sep 2010) | 7 lines Add CHANNEL(checkhangup) to check whether a channel is in the process of being hanged up. (closes issue ASTERISK-16373) Reported by: kobaz Patches: func_channel.patch uploaded by kobaz (license 834) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=285373 By: Digium Subversion (svnbot) 2010-09-07 16:14:54 Repository: asterisk Revision: 285374 _U trunk/ U trunk/funcs/func_channel.c ------------------------------------------------------------------------ r285374 | tilghman | 2010-09-07 16:14:54 -0500 (Tue, 07 Sep 2010) | 14 lines Merged revisions 285373 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r285373 | tilghman | 2010-09-07 16:14:03 -0500 (Tue, 07 Sep 2010) | 7 lines Add CHANNEL(checkhangup) to check whether a channel is in the process of being hanged up. (closes issue ASTERISK-16373) Reported by: kobaz Patches: func_channel.patch uploaded by kobaz (license 834) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=285374 |