[asterisk-commits] branch oej/test-this-branch r10665 -
/team/oej/test-this-branch/channels/
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Feb 21 12:36:21 MST 2006
Author: oej
Date: Tue Feb 21 13:36:19 2006
New Revision: 10665
URL: http://svn.digium.com/view/asterisk?rev=10665&view=rev
Log:
New peer matching algorithm from the "peermatch" branch
Modified:
team/oej/test-this-branch/channels/chan_sip.c
Modified: team/oej/test-this-branch/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/channels/chan_sip.c?rev=10665&r1=10664&r2=10665&view=diff
==============================================================================
--- team/oej/test-this-branch/channels/chan_sip.c (original)
+++ team/oej/test-this-branch/channels/chan_sip.c Tue Feb 21 13:36:19 2006
@@ -7347,16 +7347,17 @@
}
if (!user) {
- /* If we didn't find a user match, check for peers */
- if (sipmethod == SIP_SUBSCRIBE)
- /* For subscribes, match on peer name only */
- peer = find_peer(of, NULL, 1);
- else
+ /* Secondly, match on peer name */
+ peer = find_peer(of, NULL, 1);
+
+ /* Thirdly match on IP/port */
+ if (!peer) {
/* Look for peer based on the IP address we received data from */
/* If peer is registered from this IP address or have this as a default
IP address, this call is from the peer
*/
peer = find_peer(NULL, &p->recv, 1);
+ }
if (peer) {
if (debug)
More information about the asterisk-commits
mailing list