mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Provide a channel if PRI_EVENT_RING comes without a channel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1833 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -5991,6 +5991,9 @@ static void *pri_dchannel(void *vpri)
|
||||
case PRI_EVENT_RING:
|
||||
chan = e->ring.channel;
|
||||
if (e->e==PRI_EVENT_RING) {
|
||||
/* if no channel specified find one empty */
|
||||
if (chan == -1)
|
||||
chan = pri_find_empty_chan(pri);
|
||||
if ((chan < 1) || (chan > pri->channels)) {
|
||||
ast_log(LOG_WARNING, "Ring requested on odd channel number %d span %d\n", chan, pri->span);
|
||||
chan = 0;
|
||||
|
Reference in New Issue
Block a user