pbx/pbx_loopback: Speed up switches by avoiding unneeded lookups
authorMatthew Jordan <mjordan@digium.com>
Tue, 2 Dec 2014 17:10:57 +0000 (17:10 +0000)
committerMatthew Jordan <mjordan@digium.com>
Tue, 2 Dec 2014 17:10:57 +0000 (17:10 +0000)
commit08636aadec45e9fa77c187695be96e926e2b2ba9
tree75c4f4bba15d6a741127a741a084c30a33f08fc6
parent0c1aaa7da524eb4305d8f8c3d8762f38fcf17919
pbx/pbx_loopback: Speed up switches by avoiding unneeded lookups

This patch makes a small rearrangement to only do dialplan lookups during
loopback switches if the pattern matches. Prior to this patch, the dialplan
lookups were always performed, even when the result would be discarded.
Dialplan lookups can be very costly if remote switches - like DUNDi - are
present. In those cases extension matching is sped up considerably, making
the issue of lost digits more manageable.

As collateral damage, 6 trailing spaces were killed.

Review: https://reviewboard.asterisk.org/r/4211

ASTERISK-24577 #close
Reported by: Birger Harzenetter
patches:
  ast-loopback.patch uploaded by Birger Harzenetter (License 5870)
........

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

Merged revisions 428788 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428789 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
pbx/pbx_loopback.c