asterisk/res/res_pjsip
Mark Michelson 0235a66532 PJSIP: Remove PJSIP parsing functions from uri length validation.
The PJSIP parsing functions provide a nice concise way to check the
length of a hostname in a SIP URI. The problem is that in order to use
those parsing functions, it's required to use them from a thread that
has registered with PJLib.

On startup, when parsing AOR configuration, the permanent URI handler
may not be run from a PJLib-registered thread. Specifically, this could
happen when Asterisk was started in daemon mode rather than
console-mode. If PJProject were compiled with assertions enabled, then
this would cause Asterisk to crash on startup.

The solution presented here is to do our own parsing of the contact URI
in order to ensure that the hostname in the URI is not too long. The
parsing does not attempt to perform a full SIP URI parse/validation,
since the hostname in the URI is what is important.

ASTERISK-25928 #close
Reported by Joshua Colp

Change-Id: Ic3d6c20ff3502507c17244a8b7e2ca761dc7fb60
2016-04-19 10:47:18 -05:00
..
include AST-2016-004: Fix crash on REGISTER with long URI. 2016-04-14 07:23:54 -05:00
config_auth.c res_pjsip: Add "like" processing to pjsip list and show commands 2015-10-24 11:02:43 -05:00
config_domain_aliases.c res_pjsip: Move internal init/destroy prototypes to private header file. 2015-03-11 16:39:29 +00:00
config_global.c res_pjsip: Fix configuration setting of "regcontext". 2016-04-06 16:29:58 -05:00
config_system.c res_pjsip: Set threadpool max size default to 50. 2015-11-02 18:24:09 -05:00
config_transport.c build: Add configure check for proto field of PJSIP TLS transport setting. 2016-03-14 09:37:42 -06:00
location.c PJSIP: Remove PJSIP parsing functions from uri length validation. 2016-04-19 10:47:18 -05:00
pjsip_cli.c chan_pjsip: Add 'pjsip show channelstats' 2016-03-29 14:35:31 -05:00
pjsip_configuration.c res_pjsip_mwi: Add voicemail extension and mwi_subscribe_replaces_unsolicited 2016-03-30 13:23:54 -05:00
pjsip_distributor.c PJSIP: Prevent deadlock due to dialog/transaction lock inversion. 2016-01-07 16:25:03 -06:00
pjsip_global_headers.c res_pjsip: Fixed invalid empty Server and User-Agent SIP headers. 2015-03-11 15:22:01 +00:00
pjsip_options.c res_pjsip: Add headers to AMI Event ContactStatusDetail 2016-04-11 22:26:37 -05:00
pjsip_resolver.c DNS: Need to use the same serializer for a pjproject SIP transaction. 2015-06-10 19:22:13 -05:00
presence_xml.c res/res_pjsip/presence_xml.c: Add missing 2nd call presence state case. 2016-01-21 16:04:39 -06:00
security_events.c git migration: Refactor the ASTERISK_FILE_VERSION macro 2015-04-13 03:48:57 -04:00