Fix issue where SIP devices were not notified when custom devices changed to "ringing".
authorMark Michelson <mmichelson@digium.com>
Tue, 4 Sep 2012 15:50:30 +0000 (15:50 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 4 Sep 2012 15:50:30 +0000 (15:50 +0000)
commita40f702aef6f9cc779bd718475175e53154147da
tree3598580893c26d16e8c77dbe62eaa0293be8fab0
parent1b6cf69e7bcdeaab2a0243ddfe5ae7aa8d3642db
Fix issue where SIP devices were not notified when custom devices changed to "ringing".

The problem had to do with logic used when checking for what the oldest ringing channel
was. The problem was that if no channel was found, then no notification would be sent.
For custom device states, there is no associated channel, so no notification would get
sent. This fixes the issue by still sending the notification even if no associated
channel can be found for a ringing device state change.

(closes issue ASTERISK-20297)
Reported by Noah Engelberth
........

Merged revisions 372137 from http://svn.asterisk.org/svn/asterisk/branches/11

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@372138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_sip.c