[asterisk-commits] tilghman: trunk r91618 - /trunk/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 6 17:47:07 CST 2007


Author: tilghman
Date: Thu Dec  6 17:47:07 2007
New Revision: 91618

URL: http://svn.digium.com/view/asterisk?view=rev&rev=91618
Log:
Add a manager event for PRI events:  this will help manager users detect when a D-channel goes down

Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=91618&r1=91617&r2=91618
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Thu Dec  6 17:47:07 2007
@@ -9851,8 +9851,19 @@
 					/* 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);




More information about the asterisk-commits mailing list