We should change this function to take a pjsip_rx_data* instead of both a pjsip_msg* and a pj_pool_t*.  The pool is largely incidental (it's only used for an intermediate result of the message parsing) so should always be the pool associated with the rx_data - so it would be better for the API to enforce that rather than suggest that any pool could be used.