From: Martin Pycko Date: Fri, 5 Dec 2003 23:09:24 +0000 (+0000) Subject: Provide a channel if PRI_EVENT_RING comes without a channel X-Git-Tag: 0.7.0~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eab0dfc66b77231e1a504319bcc96d2e6a3bb5f2;p=thirdparty%2Fasterisk.git 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 --- diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 6a7eed2c99..5896d42e5e 100755 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -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;