From f9ca0afb39d91da4e9c05384d53fe822775c1f9a Mon Sep 17 00:00:00 2001
From: Gerald Schnabel <gs@starface.de>
Date: Tue, 22 Jan 2019 22:03:22 +0100
Subject: [PATCH] manager_channels: Fix throwing of HangupHandler manager
 events

The type value extracted from stasis message data in channel_hangup_handler_cb
isn't compared against the valid values "run", "pop" and "push". Thus the
manager events HangupHandlerPush, HangupHandlerPop and HangupHandlerRun are
never thrown.

This regression was introduced by ASTERISK_21462.

ASTERISK-28252

Change-Id: I9956e35e18da1873113644df1ddc3c7cd37bf524
---
 main/manager_channels.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main/manager_channels.c b/main/manager_channels.c
index edbc770a07..646bbd7291 100644
--- a/main/manager_channels.c
+++ b/main/manager_channels.c
@@ -971,11 +971,11 @@ static void channel_hangup_handler_cb(void *data, struct stasis_subscription *su
 		return;
 	}
 
-	if (!strcmp(action, "type")) {
+	if (!strcmp(action, "run")) {
 		event = "HangupHandlerRun";
-	} else if (!strcmp(action, "type")) {
+	} else if (!strcmp(action, "pop")) {
 		event = "HangupHandlerPop";
-	} else if (!strcmp(action, "type")) {
+	} else if (!strcmp(action, "push")) {
 		event = "HangupHandlerPush";
 	} else {
 		return;
-- 
GitLab