res_pjsip_session: Prevent crash during shutdown.