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:
parent
253f4f70fb
commit
bb15c2571f
|
@ -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);
|
||||
|
|
Reference in New Issue