This avoids noise on some Local channel situations where we don't use /n.
Thanks to Alec Davis for the suggestion.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@288746
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
p->chan = newchan;
/* Do not let a masquerade cause a Local channel to be bridged to itself! */
- if (p->owner->_bridge == p->chan || p->chan->_bridge == p->owner) {
+ if (!ast_check_hangup(newchan) && (p->owner->_bridge == p->chan || p->chan->_bridge == p->owner)) {
ast_log(LOG_WARNING, "You can not bridge a Local channel to itself!\n");
ast_mutex_unlock(&p->lock);
ast_queue_hangup(newchan);