asterisk/third-party
Richard Mudgett 76d52dc228 Bundled pjproject: Fix finding SIP transactions.
Occasionally SIP message transactions are not found when they should be.
In the particular case an incoming INVITE transaction is CANCELed but the
INVITE transaction cannot be found so a 481 response is returned for the
CANCEL.  The problematic calls have a '_' character in the Via branch
parameter.

The problem is in the pjproject PJ_HASH_USE_OWN_TOLOWER feature's code.
The problem with the "own tolower" code is that it does not calculate the
same hash value as when the pj_tolower() function is used.  The "own
tolower" code will erroneously modify the ASCII characters '@', '[', '\\',
']', '^', and '_'.  Calls to pj_hash_calc_tolower() can use the
PJ_HASH_USE_OWN_TOLOWER substitute algorithm when enabled.  Calls to
pj_hash_get_lower(), pj_hash_set_lower(), and pj_hash_set_np_lower() call
find_entry() which never uses the PJ_HASH_USE_OWN_TOLOWER algorithm.  As a
result you may not be able to find a hash tabled entry because the
calculated hash values would differ.

* Simply disable PJ_HASH_USE_OWN_TOLOWER.

ASTERISK-26490 #close

Change-Id: If89bfdb5f301b8b685881a9a2a6e0c3c5af32253
2016-12-07 06:16:48 -06:00
..
pjproject Bundled pjproject: Fix finding SIP transactions. 2016-12-07 06:16:48 -06:00
Makefile build-system: Allow building with static pjproject 2016-03-01 09:30:43 -07:00
Makefile.rules pjproject_bundled: Improve reliability of pjproject download 2016-11-18 08:01:36 -05:00
configure.m4 bundled_pjproject: Add tests for programs used by the Makefile, et al. 2016-10-09 21:25:20 -06:00
versions.mak pjproject_bundled: Update for pjproject 2.5.5 2016-07-28 08:07:21 -05:00