diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-06 23:47:07 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-12-06 23:47:07 +0000 |
commit | bb15c2571fcf41787d1cab30ae68ed21fe043351 (patch) | |
tree | 0071c24722260c70ce84590993e53160e6bd2446 /channels/chan_zap.c | |
parent | 253f4f70fb359bc584c12ff5599c61ed465da300 (diff) |
Add a manager event for PRI events: this will help manager users detect when a D-channel goes down
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91618 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-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); |