diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-06 23:47:07 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-12-06 23:47:07 +0000 |
commit | 258f3caf0f0a27693d0ff04b00cffb4612dbd3e8 (patch) | |
tree | 0071c24722260c70ce84590993e53160e6bd2446 | |
parent | 5a5f7ab2d85310c5c3d3c719c8ccaf65ca860d20 (diff) |
Add a manager event for PRI events: this will help manager users detect when a D-channel goes down
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | channels/chan_zap.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 62830235d..63b24143f 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -9851,8 +9851,19 @@ static void *pri_dchannel(void *vpri) /* Check for an event */ x = 0; res = ioctl(pri->fds[which], ZT_GETEVENT, &x); - if (x) + if (x) { ast_log(LOG_NOTICE, "PRI got event: %s (%d) on %s D-channel of span %d\n", event2str(x), x, pri_order(which), pri->span); + manager_event(EVENT_FLAG_SYSTEM, "PRIEvent", + "PRIEvent: %s\r\n" + "PRIEventCode: %d\r\n" + "D-channel: %s\r\n" + "Span: %d\r\n", + event2str(x), + x, + pri_order(which), + pri->span + ); + } /* Keep track of alarm state */ if (x == ZT_EVENT_ALARM) { pri->dchanavail[which] &= ~(DCHAN_NOTINALARM | DCHAN_UP); |