dect
/
asterisk
Archived
13
0
Fork 0

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
This commit is contained in:
tilghman 2007-12-06 23:47:07 +00:00
parent 253f4f70fb
commit bb15c2571f
1 changed files with 12 additions and 1 deletions

View File

@ -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);