Index: funcs/func_channel.c =================================================================== --- funcs/func_channel.c (revision 276729) +++ funcs/func_channel.c (working copy) @@ -88,6 +88,9 @@ R/O technology used for channel. + + 1/0 whether the channel is hanging up + R/W language for sounds played. @@ -296,7 +299,13 @@ locked_copy_string(chan, buf, ast_state2str(chan->_state), len); else if (!strcasecmp(data, "channeltype")) locked_copy_string(chan, buf, chan->tech->type, len); - else if (!strcasecmp(data, "accountcode")) + else if (!strcasecmp(data, "checkhangup")) { + if (ast_check_hangup(chan)) { + locked_copy_string(chan, buf, "1", len); + } else { + locked_copy_string(chan, buf, "0", len); + } + } else if (!strcasecmp(data, "accountcode")) locked_copy_string(chan, buf, chan->accountcode, len); else if (!strcasecmp(data, "peeraccount")) locked_copy_string(chan, buf, chan->peeraccount, len);