From: Russell Bryant Date: Sat, 6 May 2006 00:05:27 +0000 (+0000) Subject: ensure that the appropriate manager events are sent in all of the places where X-Git-Tag: 1.2.8~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb19888db5076dc645e3ebcbf65839c2f88521ec;p=thirdparty%2Fasterisk.git ensure that the appropriate manager events are sent in all of the places where alarms are detected or cleared (issue #6866, flefoll) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@25123 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index b7fe976632..6dae296bc9 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6340,11 +6340,17 @@ static int handle_init_event(struct zt_pvt *i, int event) i->inalarm = 0; ast_log(LOG_NOTICE, "Alarm cleared on channel %d\n", i->channel); break; + manager_event(EVENT_FLAG_SYSTEM, "AlarmClear", + "Channel: %d\r\n", i->channel); case ZT_EVENT_ALARM: i->inalarm = 1; res = get_alarms(i); ast_log(LOG_WARNING, "Detected alarm on channel %d: %s\n", i->channel, alarm2str(res)); /* fall thru intentionally */ + manager_event(EVENT_FLAG_SYSTEM, "Alarm", + "Alarm: %s\r\n" + "Channel: %d\r\n", + alarm2str(res), i->channel); case ZT_EVENT_ONHOOK: if (i->radio) break; /* Back on hook. Hang up. */