aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-06 00:05:27 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-06 00:05:27 +0000
commita09120f59c356875913b78b1cc187134ec308920 (patch)
treedcdee931465eac267f914747c4ee486db322bb79 /channels/chan_zap.c
parentc6e9f5e9a1b3e8b3bf71ec43dda68a89c0e643ff (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.2@25123 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index b7fe97663..6dae296bc 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. */