mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
When a DAHDI device is removed at run-time it sends the event DAHDI_EVENT_REMOVED on each channel. This is intended to signal the userspace program to close the respective file handle, as the driver of the device will need all of them closed to properly clean-up. This event has long since been handled in chan_dahdi (chan_zap at the time). However the event that is sent on a D-Channel of a "PRI" (ISDN) span simply gets ignored. This commit adds handling for closing the file descriptor (and shutting down the span, while we're at it). It also adds a CLI command 'pri destroy span <N>' to destroy the span and its DAHDI channels. Backported from trunk/12. Review: https://reviewboard.asterisk.org/r/726/ ........ Merged revisions 394552 394567 from http://svn.asterisk.org/svn/asterisk/trunk ........ Merged revisions 407817 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@407818 65c4cc65-6c06-0410-ace0-fbb531ad65f3