]> 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:31 +0000 (11:46 -0500)
commitd70d7b2f5d7af6a919e681a7cf896dc2bc787f6c
tree2ae3cd943355b802f7d5689b86b94175bd09751f
parenta40978f865fa5bfd3bcc75ea06a628c1e57fa451
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