Asterisk
  1. Asterisk
  2. ASTERISK-9883

ast_check_hangup does not return true after Hangup() has been called.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Severity: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Target Release Version/s: None
    • Component/s: Channels/General
    • Labels:
      None
    • Mantis ID:
      10209
    • Regression:
      No

      Description

      ast_check_hangup does not properly return 1 (to indicate a hangup is in progress) after Hangup() has been called in the dialplan and the channel has gone into the h extension.

      I discovered this while working on a patch for res_agi.

      This bug has been confirmed with russellb and Corydon76 in #asterisk-dev

      This bug affects 1.2,1.4 and trunk.

      1. 10209-trunk.patch
        1 kB
        Donny Kavanagh
      2. 10209-trunk-2.patch
        0.5 kB
        Donny Kavanagh
      3. ast_check_hangup2.patch
        0.7 kB
        Donny Kavanagh

        Activity

        Hide
        Russell Bryant added a comment -

        Alright, I'm going to apply this to 1.4 and trunk for now. If we identify that it solves any other problems aside from the res_agi patch that Juggie is working on for 1.4 and trunk, we can put it in 1.2 as well.

        Show
        Russell Bryant added a comment - Alright, I'm going to apply this to 1.4 and trunk for now. If we identify that it solves any other problems aside from the res_agi patch that Juggie is working on for 1.4 and trunk, we can put it in 1.2 as well.
        Hide
        Donny Kavanagh added a comment -

        Russ,

        ast_check_hangup looks to be used quite alot in 1.2 from a quick grep. I dont know if any of them could be affected by the same requested by the application hangup issue but it certainly is possible. I agree that it has the possibility to change behavior though so we should proceed with caution.

        Show
        Donny Kavanagh added a comment - Russ, ast_check_hangup looks to be used quite alot in 1.2 from a quick grep. I dont know if any of them could be affected by the same requested by the application hangup issue but it certainly is possible. I agree that it has the possibility to change behavior though so we should proceed with caution.
        Hide
        Donny Kavanagh added a comment -

        Based on irc discussion patch updated, then updated again after we realized the first ast_softhangup was redundant.

        Show
        Donny Kavanagh added a comment - Based on irc discussion patch updated, then updated again after we realized the first ast_softhangup was redundant.
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 75403

        ------------------------------------------------------------------------
        r75403 | russell | 2007-07-17 14:44:17 -0500 (Tue, 17 Jul 2007) | 12 lines

        (closes issue ASTERISK-9883)
        Reported by: juggie
        Patches:
        10209-trunk-2.patch uploaded by juggie
        Tested by: juggie, blitzrage

        In ast_pbx_run(), mark a channel as hung up after an application returned -1,
        or when it runs out of extensions to execute. This is so that code can detect
        that this channel has been hung up for things like making sure DeadAGI is used
        on actual dead channels, and is beneficial for other things, like making sure
        someone doesn't try to start spying on a channel that is about to go away.

        ------------------------------------------------------------------------

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 75403 ------------------------------------------------------------------------ r75403 | russell | 2007-07-17 14:44:17 -0500 (Tue, 17 Jul 2007) | 12 lines (closes issue ASTERISK-9883 ) Reported by: juggie Patches: 10209-trunk-2.patch uploaded by juggie Tested by: juggie, blitzrage In ast_pbx_run(), mark a channel as hung up after an application returned -1, or when it runs out of extensions to execute. This is so that code can detect that this channel has been hung up for things like making sure DeadAGI is used on actual dead channels, and is beneficial for other things, like making sure someone doesn't try to start spying on a channel that is about to go away. ------------------------------------------------------------------------
        Hide
        Digium Subversion added a comment -

        Repository: asterisk
        Revision: 75404

        ------------------------------------------------------------------------
        r75404 | russell | 2007-07-17 14:44:57 -0500 (Tue, 17 Jul 2007) | 20 lines

        Merged revisions 75403 via svnmerge from
        https://origsvn.digium.com/svn/asterisk/branches/1.4

        ........
        r75403 | russell | 2007-07-17 15:01:12 -0500 (Tue, 17 Jul 2007) | 12 lines

        (closes issue ASTERISK-9883)
        Reported by: juggie
        Patches:
        10209-trunk-2.patch uploaded by juggie
        Tested by: juggie, blitzrage

        In ast_pbx_run(), mark a channel as hung up after an application returned -1,
        or when it runs out of extensions to execute. This is so that code can detect
        that this channel has been hung up for things like making sure DeadAGI is used
        on actual dead channels, and is beneficial for other things, like making sure
        someone doesn't try to start spying on a channel that is about to go away.

        ........

        ------------------------------------------------------------------------

        Show
        Digium Subversion added a comment - Repository: asterisk Revision: 75404 ------------------------------------------------------------------------ r75404 | russell | 2007-07-17 14:44:57 -0500 (Tue, 17 Jul 2007) | 20 lines Merged revisions 75403 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r75403 | russell | 2007-07-17 15:01:12 -0500 (Tue, 17 Jul 2007) | 12 lines (closes issue ASTERISK-9883 ) Reported by: juggie Patches: 10209-trunk-2.patch uploaded by juggie Tested by: juggie, blitzrage In ast_pbx_run(), mark a channel as hung up after an application returned -1, or when it runs out of extensions to execute. This is so that code can detect that this channel has been hung up for things like making sure DeadAGI is used on actual dead channels, and is beneficial for other things, like making sure someone doesn't try to start spying on a channel that is about to go away. ........ ------------------------------------------------------------------------

          People

          • Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development