]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip.c: wrong peer searched in sip_report_security_event 77/1077/3
authorKevin Harwell <kharwell@digium.com>
Wed, 12 Aug 2015 17:59:53 +0000 (12:59 -0500)
committerKevin Harwell <kharwell@digium.com>
Thu, 13 Aug 2015 20:02:22 +0000 (15:02 -0500)
commit430db4333e25d4d1c101ed4a3473af320abb0145
tree0e79c43ed3536a51727864742ac0f5008e282b6f
parent06b464ab1b7c42e3c1b5b05463d5bc73c112dd76
chan_sip.c: wrong peer searched in sip_report_security_event

In chan_sip, after handling an incoming invite a security event is raised
describing authorization (success, failure, etc...). However, it was doing
a lookup of the peer by extension. This is fine for register messages, but
in the case of an invite it may search and find the wrong peer, or a non
existent one (for instance, in the case of call pickup). Also, if the peers
are configured through realtime this may cause an unnecessary database lookup
when caching is enabled.

This patch makes it so that sip_report_security_event searches by IP address
when looking for a peer instead of by extension after an invite is processed.

ASTERISK-25320 #close

Change-Id: I9b3f11549efb475b6561c64f0e6da1a481d98bc4
channels/chan_sip.c
channels/sip/include/security_events.h
channels/sip/security_events.c