pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs
authorAlexei Gradinari <alex2grad@gmail.com>
Mon, 25 Mar 2019 23:05:28 +0000 (19:05 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Wed, 27 Mar 2019 16:07:47 +0000 (10:07 -0600)
commitf236377ce9ce64781a6d32e445d4510736be06f6
tree047001281c3a808df35fcbdbc9e36e80740df15b
parent24facecdd094b34293d31c34f0e942a520b8d172
pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs

The next usage of PJSIP_PARSE_URI will crash asterisk
${PJSIP_PARSE_URI(tel:+1234567890,host)}
or
${PJSIP_PARSE_URI(192.168.1.1:5060,host)}

The function pjsip_parse_uri successfully parses then, but returns
struct pjsip_other_uri *.

This patch restricts parsing only SIP/SIPS URIs.

Change-Id: I16f255c2b86a80a67e9f9604b94b129a381dd25e
channels/pjsip/dialplan_functions.c