]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip_message_filter: Fix regression causing bad contact address
authorGeorge Joseph <gjoseph@digium.com>
Tue, 26 Sep 2017 16:01:48 +0000 (10:01 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 26 Sep 2017 16:46:53 +0000 (11:46 -0500)
commitab154815535d5e993f0cd4cd89efc09bdd7a6755
tree21346c1a59fb5388cf8287aaad94472289ad45bd
parent4e4520854a3ac9862e1165c520154f729b157361
pjsip_message_filter: Fix regression causing bad contact address

The "res_pjsip:  Filter out non SIP(S) requests" commit moved the
filtering of messages to pjproject's PJSIP_MOD_PRIORITY_TRANSPORT_LAYER
in order to filter out incoming bad uri schemes as early as possible.
Since the change affected outgoing messages as well and the TRANSPORT
layer is the last to be run on outgoing messages, we were overwriting
the setting of external_signaling_address (which is set earlier by
res_pjsip_nat) with an internal address.

* pjsip_message_filter now registers itself as a pjproject module
twice.  Once in the TSX layer for the outgoing messages (as it was
originally), then a second time in the TRANSPORT layer for the
incoming messages to catch the invalid uri schemes.

ASTERISK-27295
Reported by: Sean Bright

Change-Id: I2c90190c43370f8a9d1c4693a19fd65840689c8c
res/res_pjsip/pjsip_message_filter.c